Basic Joint Controller¶
Joint-position controller (basic_joint_controller/BasicJointController) with a three-state FSM (HOME / HOLD / MOVEJ). Optional 灵巧手 switch/percent control and optional waist lifting/turning.
Source of truth
Documented from the package READMEs only. Topics and command types are those listed there.
English: basic_joint_controller/README.md
Chinese: README_zh.md
Repository: fiveages-sim/arms_ros2_control (controller/basic_joint_controller/)
Shared FSM types live in libraries/arms_controller_common/ (StateHome, StateHold, StateMoveJ, FSMCommandPublisher).
FSM¶
/fsm_command is std_msgs/Int32, not String.
Value |
Action |
|---|---|
|
Switch to HOME (only from HOLD) |
|
Switch to HOLD (from HOME / MOVEJ) |
|
Switch to MOVEJ (only from HOLD; canonical, same as the whole-body stack) |
|
Switch to MOVEJ (legacy alias for standalone use; on mixed OCS2/WBC stacks |
|
(HOME) Cycle to next configuration |
|
(HOME) Switch to configuration 0 |
|
(HOME) Switch to configuration 1 |
MOVEJ can only return to HOLD (2). Direct MOVEJ → HOME is rejected.
ros2 topic pub --once /fsm_command std_msgs/msg/Int32 "data: 1" # → HOME
ros2 topic pub --once /fsm_command std_msgs/msg/Int32 "data: 4" # → MOVEJ
StateHome — interpolate to one of up to 10 preset joint configurations
StateHold — hold current joint positions
StateMoveJ — interpolate to target joints; supports trajectories and prefix-based partial control
Topics¶
Command topics are namespaced to the controller name (README example: /left_hand_controller/...). The table below is the package README Topic Summary, pinned at commit 9a1da3ba. How to refresh the pin (and recompute :start-line: / :end-line:): Documentation Build.
Assuming controller name my_controller, joint name j1:
Topic |
Type |
Requires state |
Notes |
|---|---|---|---|
|
|
any |
FSM state/config switching |
|
|
MOVEJ |
Direct joint targets; tanh/linear/doubles cap speed and may extend duration |
|
|
MOVEJ |
Multi-waypoint trajectory |
|
|
MOVEJ |
Hand open/close switch |
|
|
MOVEJ |
Hand proportional control |
|
|
MOVEJ |
Waist position delta |
|
|
MOVEJ |
Waist local relative |
|
|
MOVEJ |
Absolute |
|
|
MOVEJ |
Waist velocity factor |
|
|
MOVEJ |
Waist turning velocity factor |
Hand target_command / target_percent need target_command_enabled. Waist topics need waist_lifting_enabled. Absolute-pose defaults match FiveAges W2 (base_footprint / body_base). README example for ARX Lift / Lift 2S: waist_lifting_type: single_joint with base_link / lift_link. Height-only commands (waist_lifting, waist_lifting_command, target_joint_position) do not use those frames.
On 分体, the body instance is typically /body_joint_controller/…. On 全身, API_REFERENCE maps the same waist names under /ocs2_wbc_controller/…. Cartesian EE */twist and */relative are not this controller — FSM and Topics. Waist pose also has a WaistLiftingPose action (…/waist_lifting_pose); Python prefers execute_waist_lifting_pose_*_action when a result is needed.
Demo launch (README)¶
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1 enable_body:=false
ros2 launch basic_joint_controller demo.launch.py robot:=fiveages_w1 enable_head:=false
Argument |
Default |
Description |
|---|---|---|
|
|
Description key ( |
|
empty |
EEF / topology key ( |
|
|
|
|
|
Head controllers |
|
|
Body controllers |
|
|
Launch RViz |
This demo does not declare left_type / right_type. Those first-class args come from create_robot_profile_launch_arguments() on OCS2 launches — OCS2 Arm Controller. Launch type is the same EEF / topology key as Naming Conventions; robot:= already selected the description package.
Build (README): colcon build --packages-up-to basic_joint_controller --symlink-install.