diff --git a/README.md b/README.md index a205d0f..bc71248 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/docs/src/conf.py b/docs/src/conf.py index 0f5b006..f02f1b6 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -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 --------------------------------------------------- diff --git a/pyb_utils/robots.py b/pyb_utils/robots.py index e31ab40..8b07c6e 100644 --- a/pyb_utils/robots.py +++ b/pyb_utils/robots.py @@ -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 ---------- @@ -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( diff --git a/pyproject.toml b/pyproject.toml index db08d58..caede3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT"