Actuator PID Controller#
The pid_command_controller runs at startup and writes PID gains into the actuator’s internal control loops. It supports four independent control modes — position, velocity, current, and force — and each actuator carries its own set of gains tuned for its mechanical characteristics.
Overview#
Parameter |
Value |
|---|---|
Controller type |
|
ROS 2 node name |
|
Trigger |
Applied once at startup; gains persist until the hardware is power-cycled |
Actuator List#
The robot has different actuators across legs, pelvis, and arms based on the configuration type:
Group |
Actuators |
|---|---|
Left leg |
|
Right leg |
|
Pelvis |
|
Left arm |
|
Right arm |
|
Each name in the parameter file carries the _actuator suffix (e.g. leg_left_1_actuator).
Control Modes#
Position#
Position control is used for precise joint-angle tracking. The controller closes the loop on the measured joint position and drives the error to zero, making it suitable for holding a target pose or following a slow trajectory.
Velocity#
Velocity control is used during dynamic motions where the desired output is a joint angular rate rather than an absolute angle. It is the primary mode used by higher-level motion controllers that issue velocity commands.
Current#
Current control sits at the innermost loop and determines torque output directly by regulating motor phase current. It is the fastest control mode and serves as the foundation on which position and velocity loops are built.
Force#
Force control closes the loop on measured actuator force (or torque), allowing compliant interactions with the environment. It is used in tasks where limiting contact forces matters more than precise position tracking, such as during foot-contact phases of locomotion.
Impedance#
Impedance control operates in “impedance-current mode”, where impedance control is implemented using the underlying current control. It utilizes “stiffness” and “dumping” components to regulate the actuator’s response, allowing for tractable behavior while controlling the current directly.
Configuration Reference#
Below is an example pid_command_controller parameter block:
pid_command_controller:
ros__parameters:
type: pid_command_controller/ActuatorPIDCommandController
actuator_names:
- leg_left_1_actuator
- leg_left_2_actuator
position:
leg_left_1_actuator: {proportional: 0.0003, integral: 0.000035, derivative: 1.0e-08}
leg_left_2_actuator: {proportional: 0.0003, integral: 0.000035, derivative: 8.5e-08}
velocity:
leg_left_1_actuator: {proportional: 1.1, integral: 11.0, derivative: 8.0e-04}
leg_left_2_actuator: {proportional: 1.1, integral: 11.0, derivative: 8.0e-04}
current:
leg_left_1_actuator: {proportional: 1.47, integral: 12000.0, derivative: 0.0}
leg_left_2_actuator: {proportional: 1.47, integral: 12000.0, derivative: 0.0}
force:
leg_left_1_actuator: {proportional: 0.000815, integral: 0.7, derivative: 0.000475}
leg_left_2_actuator: {proportional: 0.000815, integral: 0.7, derivative: 0.000475}
impedance:
leg_left_1_actuator: {stiffness: 0.000815, dumping: 0.000475}
leg_left_2_actuator: {stiffness: 0.000815, dumping: 0.000475}