Interface for enforcing joint limits.
joint_limits_interface contains data structures for representing joint limits, methods for populating them from common formats such as URDF and rosparam, and methods for enforcing limits on different kinds of joint commands.
The joint_limits_interface is not used by controllers themselves (it does not implement a HardwareInterface
) but instead operates after the controllers have updated, in the write()
method (or equivalent) of the robot abstraction. Enforcing limits will overwrite the commands set by the controllers, it does not operate on a separate raw data buffer.
There are two main elements involved in setting up a joint_limits_interface:
For effort-controlled joints, position-controlled joints, and velocity-controlled joints, two types of interfaces have been created. The first is a saturation interface, used for joints that have normal limits but not soft limits. The second is an interface that implements soft limits, similar to the one used on the PR2.
The first example shows the different ways of populating joint limits data structures.
A joint limits specification in YAML format that can be loaded to the ROS parameter server can be found here.
The second example integrates joint limits enforcing into an existing robot hardware implementation.