Skip to content

Commit e83abd5

Browse files
committed
Update some comments/docs and bump version to 1.2.0.
1 parent 0d4f595 commit e83abd5

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,15 @@ example:
117117
(0.0, 0.0, 0.0)
118118
```
119119
The functions we've wrapped in this way are `getClosestPoints`,
120-
`getConstraintInfo`, `getContactPoints`, `getDynamicsInfo`, and `getJointInfo`.
121-
The one difference from the PyBullet API is that in pyb_utils `getJointInfo`
122-
also accepts an optional argument `decode`, which will convert the byte strings
120+
`getConstraintInfo`, `getContactPoints`, `getDynamicsInfo`, `getJointInfo`,
121+
`getJointState(s)`, and `getLinkState(s)`. There are two differences from the
122+
vanilla PyBullet API. The first is that in pyb_utils `getJointInfo` also
123+
accepts an optional argument `decode`, which will convert the byte strings
123124
returned by PyBullet to the specifed encoding. For example, `decode="utf8"`.
125+
The second difference is that in pyb_utils `getLinkState(s)` will always return
126+
`LinkState` tuples with 8 fields, even if `computeLinkVelocity=False`. When
127+
`computeLinkVelocity=False`, then `worldLinkLinearVelocity` and
128+
`worldLinkAngularVelocity` are both set to `None`.
124129

125130
And there's more! You can find example scripts of all of this package's
126131
utilities in the `examples/` directory:

docs/src/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
author = 'Adam Heins'
2626

2727
# The short X.Y version
28-
version = '1.1.0'
28+
version = '1.2.0'
2929
# The full version, including alpha/beta/rc tags
30-
release = '1.1.0'
30+
release = '1.2.0'
3131

3232

3333
# -- General configuration ---------------------------------------------------

pyb_utils/robots.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,7 @@ def get_link_frame_pose(self, link_idx=None):
133133
)
134134

135135
def get_link_com_velocity(self, link_idx=None):
136-
"""Get the velocity of a link's center of mass.
137-
138-
The velocity is computed about the link's center of mass with respect
139-
to the world frame.
136+
"""Get the velocity of a link's center of mass with respect to the world.
140137
141138
Parameters
142139
----------
@@ -162,6 +159,20 @@ def get_link_com_velocity(self, link_idx=None):
162159
return v_com, ω_com
163160

164161
def get_link_frame_velocity(self, link_idx=None):
162+
"""Get the velocity of a link's URDF frame with respect to the world.
163+
164+
Parameters
165+
----------
166+
link_idx :
167+
Index of the link to use. If not provided, defaults to the end
168+
effector ``self.tool_idx``.
169+
170+
Returns
171+
-------
172+
:
173+
A tuple containing the linear and angular velocity vectors for the
174+
link's URDF frame with respect to the world.
175+
"""
165176
if link_idx is None:
166177
link_idx = self.tool_idx
167178
state = getLinkState(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ line-length = 80
33

44
[tool.poetry]
55
name = "pyb_utils"
6-
version = "1.1.0"
6+
version = "1.2.0"
77
description = "Basic utilities for PyBullet, including collision detection, ghost (i.e. visual-only) objects, and cameras."
88
authors = ["Adam Heins <[email protected]>"]
99
license = "MIT"

0 commit comments

Comments
 (0)