Skip to content

Commit

Permalink
Update some comments/docs and bump version to 1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamheins committed Sep 19, 2023
1 parent 0d4f595 commit e83abd5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,15 @@ example:
(0.0, 0.0, 0.0)
```
The functions we've wrapped in this way are `getClosestPoints`,
`getConstraintInfo`, `getContactPoints`, `getDynamicsInfo`, and `getJointInfo`.
The one difference from the PyBullet API is that in pyb_utils `getJointInfo`
also accepts an optional argument `decode`, which will convert the byte strings
`getConstraintInfo`, `getContactPoints`, `getDynamicsInfo`, `getJointInfo`,
`getJointState(s)`, and `getLinkState(s)`. There are two differences from the
vanilla PyBullet API. The first is that in pyb_utils `getJointInfo` also
accepts an optional argument `decode`, which will convert the byte strings
returned by PyBullet to the specifed encoding. For example, `decode="utf8"`.
The second difference is that in pyb_utils `getLinkState(s)` will always return
`LinkState` tuples with 8 fields, even if `computeLinkVelocity=False`. When
`computeLinkVelocity=False`, then `worldLinkLinearVelocity` and
`worldLinkAngularVelocity` are both set to `None`.

And there's more! You can find example scripts of all of this package's
utilities in the `examples/` directory:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
author = 'Adam Heins'

# The short X.Y version
version = '1.1.0'
version = '1.2.0'
# The full version, including alpha/beta/rc tags
release = '1.1.0'
release = '1.2.0'


# -- General configuration ---------------------------------------------------
Expand Down
19 changes: 15 additions & 4 deletions pyb_utils/robots.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ def get_link_frame_pose(self, link_idx=None):
)

def get_link_com_velocity(self, link_idx=None):
"""Get the velocity of a link's center of mass.
The velocity is computed about the link's center of mass with respect
to the world frame.
"""Get the velocity of a link's center of mass with respect to the world.
Parameters
----------
Expand All @@ -162,6 +159,20 @@ def get_link_com_velocity(self, link_idx=None):
return v_com, ω_com

def get_link_frame_velocity(self, link_idx=None):
"""Get the velocity of a link's URDF frame with respect to the world.
Parameters
----------
link_idx :
Index of the link to use. If not provided, defaults to the end
effector ``self.tool_idx``.
Returns
-------
:
A tuple containing the linear and angular velocity vectors for the
link's URDF frame with respect to the world.
"""
if link_idx is None:
link_idx = self.tool_idx
state = getLinkState(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ line-length = 80

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

0 comments on commit e83abd5

Please sign in to comment.