Joint and velocity limits#

Joint limits#

Joint limits are enabled by default in the kinematics solver. They can be enabled/disabled by using the enable_joint_limits:

# Enables / disables the joint limits (enabled by default)
solver.enable_joint_limits(True)

Joint limits are loaded by default from the URDF file and can be overriden on the robot wrapper.

Velocity limits#

Velocity limits are disabled by default. They can be enabled/disabled by using the enable_velocity_limits:

# Enables / disables the velocity limits (disabled by default)
solver.enable_velocity_limits(True)

Velocity limits are loaded by default from the URDF file and can be overriden on the robot wrapper.

Note

When using velocity limits, you have to specify the \(\Delta t\) between two successive calls to the solver. This can be done by setting solver.dt:

# Setting solver.dt is required to use velocity limits
solver.dt = 0.01

Retrieving velocity#

The kinematics solver actually produces a \(\Delta q\) vector that is a small variation of the current joint configuration. This vector is returned by the solve method, and can be used to compute a velocity:

# Solves the kinematics problem
dq = solver.solve()

# Computes the velocity
v = dq / dt