H12 Remote Controller Usage Development Case
1. Deployment Process
-
Run the deployment script
⚠️ Note: The h12pro remote controller program, the robot program, and the VR program all use the ROS_MASTER_URI and ROS_IP configured at deployment time. Please make sure the ROS_MASTER_URI and ROS_IP are correct at deployment time. Confirm that ROS master-slave communication is correct before deploying.
1.1 Lower-level computer deployment
cd /home/lab/kuavo-ros-opensource cd /home/lab/kuavo-ros-opensource/src/humanoid-control/h12pro_controller_node/scripts sudo su ./deploy_autostart.shAfter execution, dependencies are installed automatically and the h12pro remote controller program is started.
1.2 Upper-level computer deployment
cd ~/kuavo_ros_application cd ~/kuavo_ros_application/src/ros_audio/kuavo_audio_player/scripts ./deploy_autostart_h12pro.shAfter execution, the packages are compiled automatically, and the service that plays voice actions triggered by the H12 remote controller is set to start on boot and then started. Choose y or n as prompted in the terminal.
-
H12PRO remote controller service management
-
The
ocs2_h12pro_monitorservice is located on the lower-level computer and integrates the remote controller node and monitoring functions. It automatically manages starting and stopping the remote controller program according to system state. When the user manually starts the robot program, the h12pro remote controller program goes offline automatically.Start the service:
sudo systemctl start ocs2_h12pro_monitor.serviceStop the service:
sudo systemctl stop ocs2_h12pro_monitor.serviceRestart the service:
sudo systemctl restart ocs2_h12pro_monitor.serviceEnable on boot:
sudo systemctl enable ocs2_h12pro_monitor.serviceDisable on boot:
sudo systemctl disable ocs2_h12pro_monitor.serviceView service logs:
sudo journalctl -u ocs2_h12pro_monitor.service -f -
The
start_h12pro_play_nodeservice is located on the upper-level computer. It sets the services related to voice playback triggered by the H12 remote controller to start on boot.
- View the robot program run log
sudo su
tmux attach -t humanoid_robot- Check whether the remote controller data is normal
cd /home/lab/kuavo-ros-opensource
source devel/setup.bash
rostopic echo /h12pro_channel- Notes
- Because the
ocs2_h12pro_monitorservice has a relatively low priority, if the user manually starts theroslaunch humanoid_controllers load_kuavo_real.launchprogram, theocs2_h12pro_nodeprogram will go offline automatically, and it will only come back online automatically after the user terminates the robot program. - It is possible that after the user terminates the robot program,
ocs2_h12pro_nodestill does not come online or does not respond. In this case, first runpkill rosorsudo pkill rosto terminate all ros processes, then restart thesudo systemctl restart ocs2_h12pro_monitor.serviceservice. - If you use an external module for the remote controller (a USB device connected to the remote controller receiver) to receive remote controller data, plug the external module into the robot approximately 20-30 seconds after the robot is powered on.
- If the remote controller data cannot be received normally after restarting the robot NUC, hot-plug the external module and try again.
2. State Machine Overview
- Basic states
initial: Initial state (robot NUC powered on, program not started)calibrate: Calibration state (robot program started with calibration parameters)ready_stance: Ready stance (robot program started, not yet standing)stance: Standing posturewalk: Walk statevr_remote_control: VR remote controller control state
-
State transition diagram

Sourceindicates the current robot state, i.e. the start point of the line segment in the figure aboveTriggerindicates the state transition trigger, i.e. the text on the line segment in the figure aboveDestindicates the target robot state, i.e. the end point of the arrow in the figure above
The state transitions are as follows:
-
From the initial state:
initial_pre-> ready_stancecalibrate-> calibrate
-
From the ready_stance state:
ready_stance-> stancestop-> initial
-
From the stance state:
walk-> walkarm_pose1/2/3/4-> stance (arm posture control)customize_action_RR/LL_A/B/C/D-> stance (play voice and action)stop-> initialstart_vr_remote_control-> vr_remote_control
-
From the walk state:
stance-> stancestop-> initial
-
From the vr_remote_control state:
stop_vr_remote_control-> stancestop-> initialrecord_vr_rosbag-> vr_remote_controlstop_record_vr_rosbag-> vr_remote_control
3. Remote Controller Configuration
-
Button diagram

-
Key combinations for state transitions
- Initial (robot NUC powered on, program not started) state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| ready_stance | C_PRESS | E_LEFT + F_RIGHT |
- Ready_stance (robot program started, not yet standing) state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| stance | C_PRESS | E_LEFT + F_RIGHT |
| initial | C_LONG_PRESS + D_LONG_PRESS | Any |
- Calibrate (robot program started with calibration parameters) state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| initial | C_LONG_PRESS + D_LONG_PRESS | Any |
- Stance state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| walk | A_PRESS | E_MIDDLE + F_MIDDLE |
| arm_pose1 | A_PRESS | E_RIGHT + F_LEFT |
| arm_pose2 | B_PRESS | E_RIGHT + F_LEFT |
| arm_pose3 | C_PRESS | E_RIGHT + F_LEFT |
| arm_pose4 | D_PRESS | E_RIGHT + F_LEFT |
| customize_action_RR_A | A_PRESS | E_RIGHT + F_RIGHT |
| customize_action_RR_B | B_PRESS | E_RIGHT + F_RIGHT |
| customize_action_RR_C | C_PRESS | E_RIGHT + F_RIGHT |
| customize_action_RR_D | D_PRESS | E_RIGHT + F_RIGHT |
| customize_action_LL_A | A_PRESS | E_LEFT + F_LEFT |
| customize_action_LL_B | B_PRESS | E_LEFT + F_LEFT |
| customize_action_LL_C | C_PRESS | E_LEFT + F_LEFT |
| customize_action_LL_D | D_PRESS | E_LEFT + F_LEFT |
| start_vr_remote_control | A_LONG_PRESS | Any |
| initial | C_LONG_PRESS + D_LONG_PRESS | Any |
| toggle_head_control | B_PRESS | E_MIDDLE + F_RIGHT |
- Walk state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| stance | D_PRESS | E_MIDDLE + F_MIDDLE |
| initial | C_LONG_PRESS + D_LONG_PRESS | Any |
- VR_remote_control state transitions
| Target state | Key combination | Switch position |
|---|---|---|
| stance | B_LONG_PRESS | Any |
| initial | C_LONG_PRESS + D_LONG_PRESS | Any |
| record_vr_rosbag | C_PRESS | Any |
| stop_record_vr_rosbag | D_PRESS | Any |
NOTE
- In the remote controller key combinations, long press (LONG_PRESS) means keeping the key pressed after pressing it until the remote controller emits a beep.
- In the Stance state, the four
arm_posetarget states only support playing custom actions. The action files are stored under/home/lab/.config/lejuconfig/action_files, with the file namesarm_pose1.tact,arm_pose2.tact,arm_pose3.tact,arm_pose4.tact. - If the arm does not return to its initial position after an arm action is completed, you can return the arm to its initial position with the E_MIDDLE + F_MIDDLE + D keys.
- In the Stance state, the eight
customize_actiontarget states support playing custom voice and actions. You need to modify thearm_pose_nameaction file name (without extension) and themusic_nameaudio file name (with extension) for the corresponding target state in the configuration file at/home/lab/kuavo-ros-opensource/src/humanoid-control/h12pro_controller_node/config/customize_config.jsonon the lower-level computer. - If the upper-level computer is
WNUC12WSKI70000, place the corresponding audio files in the folder/home/kuavo/.config/lejuconfig/musicon the upper-level computer. - If the upper-level computer is
AGX-Orin/ORIN-NX, place the corresponding audio files in the folder/home/lab/.config/lejuconfig/musicon the lower-level computer. - Place
.tactaction files in the folder/home/lab/.config/lejuconfig/action_fileson the lower-level computer. - If you need to use the remote controller to execute a python program, you can modify
/home/lab/kuavo-ros-opensource/src/humanoid-control/h12pro_controller_node/config/customize_config.jsonas follows:
"customize_action_LL_A": {
"type": "shell",
"command": "python3 /home/lab/.../~.py"
},- After completing the above operations, you need to power off and restart the robot.
- After entering the VR teleoperation state, the remote controller will no longer respond to key combinations (except the emergency stop combination and the combination for exiting VR teleoperation) until the VR teleoperation state is exited.
- VR-recorded rosbag files are stored under
~/.log/vr_remote_control/rosbag, named by date and time. - The configuration file for the topics recorded by VR is stored at
/home/lab/kuavo-ros-opensource/src/humanoid-control/h12pro_controller_node/config/record_topics.json. - The specified topics to record are as follows:
-
/kuavo_arm_traj# arm joint values -
/control_robot_hand_position# fingers -
/robot_head_motion_data# head -
Depth camera
/camera/depth/image_rect_raw# depth camera image/camera/depth/camera_info# depth camera intrinsics (calibrated at the realsense factory)/camera/depth/color/points# RGB point cloud with depth (Point2D)
-
RGB camera
/camera/color/image_raw# RGB camera image/camera/color/camera_info# RGB camera intrinsics (calibrated at the realsense factory)
-
Depth aligned to RGB camera
/camera/aligned_depth_to_color/image_raw# depth image after alignment to RGB/camera/aligned_depth_to_color/camera_info# camera intrinsics after alignment to RGB
-
- Joystick configuration
-
The joysticks are supported in the following states:
- stance
- walk
-
Left joystick
- Vertical direction: X-axis movement
- Horizontal direction: Y-axis movement
-
Right joystick
- Vertical direction: torso height control
- Horizontal direction: rotation control
-
Emergency stop
- Key combination: C_LONG_PRESS + D_LONG_PRESS
- Applicable states: all states (except the initial state)
- If stop is triggered in the standing state, the robot will squat down first and then stop