Use Basic Joint Controller¶
Run the joint-position controller (HOME / HOLD / MOVEJ) — Basic Joint Controller (basic_joint_controller) — from arms_ros2_control.
Source of truth
Steps and topics below are from basic_joint_controller/README.md (and README_zh.md).
/fsm_command is std_msgs/Int32, not String.
On the public open-deploy-ws arx-lift2s branch, basic_joint_controller is in the README’s colcon build --packages-up-to list (simulation and real-hardware). Lift2S split body / full body are chosen in ./quick_start.sh — see ARX Lift 2S and 分体控制 vs 全身控制.
Prerequisites¶
Workspace that already contains
arms_ros2_control(for exampleopen-deploy-wsafter./init_repo.sh)Package built:
colcon build --packages-up-to basic_joint_controller --symlink-install
Launch (README demo)¶
source ~/open-deploy-ws/install/setup.bash # or your workspace install/
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1
# Head only
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1 enable_body:=false
# Body only
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1 enable_head:=false
Argument |
Default (README / launch) |
|---|---|
|
|
|
empty (EEF / topology; do not pass |
|
|
|
|
This demo declares type only. It does not declare left_type / right_type. Mixed L/R EEF is on OCS2 demo / split_body / full_body via robot_common_launch.
Switch FSM¶
ros2 topic pub --once /fsm_command std_msgs/msg/Int32 "data: 1" # HOLD → HOME
ros2 topic pub --once /fsm_command std_msgs/msg/Int32 "data: 2" # → HOLD
ros2 topic pub --once /fsm_command std_msgs/msg/Int32 "data: 4" # HOLD → MOVEJ (canonical)
Value |
Action (README) |
|---|---|
|
HOME (only from HOLD) |
|
HOLD (from HOME / MOVEJ) |
|
MOVEJ (only from HOLD; same canonical value as the whole-body stack) |
|
MOVEJ if this controller is standalone; on mixed OCS2/WBC stacks |
MOVEJ returns only to HOLD (2). Full table and home-config 100+ commands: Basic Joint Controller.
Command joints in MOVEJ¶
Topics are namespaced to the controller name. README example:
ros2 topic pub --once /my_controller/target_joint_position \
std_msgs/msg/Float64MultiArray "{data: [0.1, 0.2, 0.3]}"
Type is std_msgs/Float64MultiArray, not sensor_msgs/JointState. Optional trajectory: /{controller}/target_joint_trajectory (trajectory_msgs/JointTrajectory). Hand / waist topics: the reference page (README §5–6).