Joint configurations#
Robot state#
The robot configuration is stored in the RobotWrapper
class, in the
state
members:
robot.state.qd
for \(\dot{q}\) the joint velocities, you can use the helpers:get_joint_velocity
: to retrieve the joint velocity of a given joint name,set_joint_velocity
: to set the joint velocity of a given joint name.
robot.state.qdd
for \(\ddot{q}\) the joint accelerations, you can use the helpers:get_joint_acceleration
: to retrieve the joint acceleration of a given joint name,set_joint_acceleration
: to set the joint acceleration of a given joint name.
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
.