Pyb-utils

Latest version: v2.2.1

Safety actively analyzes 688634 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.2.1

This hotfix release fixes a bug where ghost objects' orientation was not being updated properly, thanks to blooop.

2.2.0

Additions
* Add a dedicated `GhostObject.box` constructor (thanks to ags-dy).
* Add `client_id` argument to GhostObject.
* Add `FrameRecorder` class, which is an alternative way to record videos of the simulation as a sequence of frames (images).
* Add principal rotation matrix functions `rotx`, `roty`, `rotz`, as well as `rot2d` for 2D rotation matrices. This was added because scipy is now used internally for rotations, and it does not provide these functions directly.

Changes
* Internal: use `scipy` for rotation math instead of `spatialmath`.

2.1.0

This release adds contact wrench and more quaternion utility functions.

Contact wrench utilities
* The functions `get_point_contact_wrench`, `get_points_contact_wrench`, and `get_total_contact_wrench` have been added for computing the contact wrench exerted on one object through contact with another.

Quaternion utilities
* The functions `quatx`, `quaty`, and `quatz` have been added to construct quaternions representing rotations about the major axes.
* Under the hood, the quaternion functions have all been rewritten to use `spatialmath.UnitQuaternion`.

Future
* The field `localInerialPos` of the `DynamicsInfo` named tuple is misspelled; this will be fixed in a future major release.

2.0

A new major release! (which means breaking changes!)

Breaking Changes
Robot
* The robot class now distinguishes between three sets of joints: all joints (including all fixed joints), moveable joints (excludes fixed joints), and actuated joints (the ones that the user actually wants to control). There are corresponding properties `num_total_joints`, `num_moveable_joints`, and `num_actuated_joints`, as well as `all_joint_names`, `moveable_joint_names`, and `actuated_joint_names`. The previous attribute `num_joints` has been removed, with `num_moveable_joints` being its replacement.
* The constructor argument `tool_joint_name` has been removed and is replaced with `tool_link_name` to be more intuitive: the end effector/tool is a *link*.

Collision Detector
The collision detector API has been revised to be simpler and less verbose, which also means that every method of the `CollisionDetector` class now has a slightly different signature.
* Collision pairs are now specified as plain tuples, each a pair of *collision objects*. A collision object is either a single `int` representing a body UID, a tuple `(body_uid, link_uid)`, or a tuple `(body_uid, link_name)`. This also means the verbose `NamedCollisionObject` dataclass is no longer with us.
* The `CollisionDetector` no longer takes a dictionary mapping body names to indices anymore; this was cumbersome.
* The `CollisionDetector` no longer knows anything about commanding robots. This should be handled by the user outside of the detector (see the updated example script).

Other Changes
* The `Robot` class now has the convenience methods `get_link_index` and `get_joint_index` for convenient look-up by name.
* The `Robot` class now has the property `link_names`, a list of all its link names.
* Added the `as_rotation_matrix` parameter to `BulletBody.get_pose`.
* Some additional tests and typo fixes.

1.3.1

This minor release upgrades the Pillow dependency to 10.0.1 to fix some vulnerabilities and also removes an incorrect transpose in the segmentation mask in the camera example script.

1.3.0

Not secure
This release primarily focuses on improving the `Robot` class:
* Only parse the non-fixed joints of the robot by default.
* Allow manually specifying which joints are actuated.
* Add the `set_joint_friction_force` method to enable free-moving joints.
* Add the `command_effort` method for torque joint.
* Add the `as_rotation_matrix` argument to the `get_link_pose` methods to automatically convert the quaternion to a rotation matrix before returning it.

Two new examples have also been added: an under-actuated 2-link planar pendulum and a task-space robot arm control demo.

Finally, the function `get_urdf_path` has also been added to obtain URDFs packaged with `pyb_utils` (currently only the two-link pendulum mentioned above).

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.