A ros2_control layer implementation for Unitree actuators. See layered_hardware to understand the layered scheme.
- sends commands to Unitree actuators within
write()
function - fetches actuators' states within
read()
function - switches actuators' operation modes within
perform_command_mode_swtich()
function when controllers using associated interfaces activate
<layer_name> (yaml, required)
- map of parameter names and values for this layer
<layer_name>.serial_interface (string, default: '/dev/ttyUSB0')
- path to USB-serial converter for Unitree actuators
<layer_name>.actuators (map<string, map>, required)
- map of parameters for each actuator
<layer_name>.actuators.<actuator_name>.id (int, required)
- id of the Unitree actuator
<layer_name>.actuators.<actuator_name>.motor_type (string, required)
- actuator's type name like 'A1', 'B1', & 'GO-M8010-6'
<layer_name>.actuators.<actuator_name>.pos_gain (double, default: 0.1)
- control gain for actuator position (Kp)
<layer_name>.actuators.<actuator_name>.vel_gain (double, default: 0.05)
- control gain for actuator velocity (Kd)
<layer_name>.actuators.<actuator_name>.operating_mode_map (map<string, string>, required)
- map to actuator's operation mode names from associated interface names (typically joint interfaces)
- possible operation mode names are 'brake', 'position', 'torque' & 'velocity'
<param name="example_unitree_actuator_layer">
serial_interface: /dev/serial/by-id/...
actuators:
example_unitree_1:
id: 1
motor_type: GO-M8010-6
operating_mode_map:
example_joint_1/position: position
...
example_unitree_2:
id: 2
...
</param>