Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Speed and Acceleration Limits

Set speed and acceleration limits for the 7 joints. These affect motions such as move_j and move_p.

from realhand import A7lite

with A7lite(side="left", interface_name="can0") as arm:
    arm.enable()
    # Set the speed limit of all joints to 2.0 rad/s
    arm.set_velocities([2.0] * 7)
    # Set acceleration limits individually
    arm.set_accelerations([10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0])
MethodParameterRangeDescription
set_velocities(velocities)Velocity limits for 7 joints (rad/s)[0.0, 50.0]Default 0.5
set_accelerations(accelerations)Acceleration limits for 7 joints (rad/s²)[1.0, 50.0]Default 10.0

Exception: ValidationError (exactly 7 values are required, and all values must be within range)

PID Parameter Settings

Set PID parameters for the 7 joints.

from realhand import A7lite

with A7lite(side="left", interface_name="can0") as arm:
    arm.set_position_kps([100.0] * 7)
    arm.set_velocity_kps([0.5] * 7)
    arm.set_velocity_kis([0.01] * 7)
    arm.set_velocity_filt_gains([0.8] * 7)
MethodParameterDescription
set_position_kps(kps)Position Kp values for 7 jointsProportional gain of the position loop
set_velocity_kps(kps)Velocity Kp values for 7 jointsProportional gain of the velocity loop
set_velocity_kis(kis)Velocity Ki values for 7 jointsIntegral gain of the velocity loop
set_velocity_filt_gains(gains)Velocity filter gains for 7 jointsHigher gain means stronger filtering and slower response

Parameter Quick Reference

Parameter typeDefaultRange
Speed limit0.5 rad/s[0.0, 50.0] rad/s
Acceleration limit10.0 rad/s²[1.0, 50.0] rad/s²
move_l max linear speed0.05 m/s(0, 0.4] m/s
move_l max angular speed0.3 rad/s(0, 3.0] rad/s
move_l linear acceleration0.1 m/s²(0, 1.0] m/s²
move_l angular acceleration0.1 rad/s²(0, 1.0] rad/s²

Example

Set PID, Speed, and Acceleration Limits

from realhand import A7lite

with A7lite(side="left", interface_name="can0") as arm:
    arm.set_position_kps([80.0] * 7)
    arm.set_velocity_kps([0.4] * 7)
    arm.set_velocity_kis([0.008] * 7)
    arm.set_velocity_filt_gains([0.9] * 7)
    arm.set_velocities([1.0] * 7)
    arm.set_accelerations([5.0] * 7)