Joint configurations#

Robot state#

The robot configuration is stored in the RobotWrapper class, in the state members:

  • robot.state.q for \(q\) the joint positions, you can use the helpers:
    • get_joint: to retrieve the joint value of a given joint name,

    • set_joint: to set the joint value of a given joint name,

  • robot.state.qd for \(\dot{q}\) the joint velocities, you can use the helpers:
  • robot.state.qdd for \(\ddot{q}\) the joint accelerations, you can use the helpers:

For example:

# Sets head_pan joint to 0.5 rad
robot.set_joint("head_pan", 0.5)

Retrieving all the joint names#

All the joint names can be retrieved by calling joint_names().

Integrating#

You can call integrate to integrate the robot state. This will integrate the acceleration, velocity and position of the robot for a given dt.

Joint limits#

Limits are loaded by default from the URDF file. However, you can override the joint limits by using set_joint_limits:

# Sets head_pan joint limits to [-1.0, 1.0] rad
robot.set_joint_limits("head_pan", -1.0, 1.0)

You can also update the velocity and torque limits, by using respectively set_velocity_limit and set_torque_limit.