ros2_control in This Stack¶
How FiveAges Sim selects a hardware plugin and loads controllers. This is not a generic ros2_control tutorial.
Source of truth
Launch
hardware:=→ xacroros2_control_hardware_type:robot_common_launchREADME andlaunch_arg_utils.build_xacro_mappings()Default
hardwareon OCS2 demo:ocs2_arm_controller/launch/demo.launch.py(mock_components)Plugin names below are from
arx_acone_description/xacro/ros2_control/robot.xacro. Other robots use the samehardwarekeys; the real plugin class is that robot’s own xacro.
Upstream lifecycle / QoS / “how Controller Manager works in general”: ros2_control documentation. This stack’s launch arguments and topics are the rows and READMEs on this page.
What the launch argument does¶
build_xacro_mappings() always sets ros2_control_hardware_type to the launch hardware string. When hardware:=gz it also sets gazebo to true. Profile YAML hardware: (serial, arm_ctrl_mode, …) is injected only when hardware:=real.
Documented launch values (robot_common_launch, Acone xacro, demo.launch.py):
|
Acone xacro plugin |
Notes |
|---|---|---|
|
|
No Gazebo / Isaac. There is no |
|
|
ocs2_arm README: install |
|
|
Acone params: |
|
Vendor plugin (Acone: |
Other brands: use the plugin class from that description’s |
REAL_HARDWARE in launch_arg_utils.py is only real.
Optional controller overlay: if <robot>_description/config/ros2_control/<hardware>.yaml exists, load_robot_config merges it. Example from the common README: arx_lift2s + hardware:=isaac merges isaac.yaml. No file → no overlay.
Controllers (this repo)¶
From arms_ros2_control READMEs / launches:
Package |
Role |
|---|---|
HOME / HOLD / MOVEJ; body/head/灵巧手 in 分体控制 ( |
|
Arm MPC; |
|
全身控制 via |
|
夹爪 ( |
分体 vs 全身: 分体控制 vs 全身控制. How-to: Use Basic Joint Controller.
Command / state interfaces (OCS2 arm README)¶
ocs2_arm_controller README — Interface Configuration: the controller detects the mode from interfaces present in the robot config.
Mode |
Command |
State |
|---|---|---|
Position (default) |
|
|
Force (auto) |
|
|
That table is the OCS2 MIX / MIT path (Panthera HT / ARX). Tianji (天玑) / Rokae (珞石) keep the controller on position commands; joint impedance is a vendor ctrl_mode on the hardware interface (JOINT_IMPEDANCE on marvin-ros2-control). VR comparison: VR Teleoperation.
There is no stack-wide /target_pose or /target_joint_positions (JointState). MoveJ on basic_joint_controller is /{controller}/target_joint_position (std_msgs/Float64MultiArray). FSM: /fsm_command (std_msgs/Int32). Action / Service types and WBC body/head topics: FSM and Topics.