Kuavo Docs
Feature ExamplesKuavo 5 Examplespytree Examples

case_wheel_test_head.py - Wheel-Arm Head Search Test

Function Description

  • Demonstrates the robot head's intelligent search capability
  • Searches for AprilTags at different angles by moving the head
  • Uses parallel processing to perform perception and head control simultaneously

Key Features

  • Multi-angle search strategy (yaw ±85°, pitch ±10°)
  • Executes perception and head search in parallel
  • Real-time AprilTag detection and position feedback
  • Automatically stops searching after a successful detection

Troubleshooting Runtime Issues

During operation you may encounter issues related to SDK installation and msgs. Detailed solutions are as follows: Troubleshooting

Configuration Parameters

TAG_ID = config.pick.tag_id                                    # 目标 AprilTag ID
HEAD_SEARCH_YAWS = [85°, 0°, -85°]                            # 头部搜索偏航角
HEAD_SEARCH_PITCHES = [-10°, 0°, 10°]                         # 头部搜索俯仰角

Startup Instructions

Preparation

In Gazebo simulation, if you use apriltag_ros for continuous detection, you usually need to first change the system's tag configuration to match the actual tag size in the simulation (this only needs to be done once):

sudo vim /opt/ros/noetic/share/apriltag_ros/config/tags.yaml

For a reference example, see the "Preparation" section of src/kuavo_humanoid_sdk/docs/markdown/pages/kuavo_strategy_v2.md.

Start the Wheel-Arm Lower-Level Controller Program

Start the Lower-Level Controller Main Program

  • Gazebo simulation: use load_kuavo_gazebo_sim_wheel.launch
cd ~/kuavo-ros-opensource
sudo su
source devel/setup.bash
roslaunch humanoid_controllers load_kuavo_gazebo_sim_wheel.launch

Start the Lower-Level Controller Camera Coordinate Transformation Robot Program

  • Real robot: use load_kuavo_real_wheel.launch
cd ~/kuavo-ros-opensource
sudo su
source devel/setup.bash
roslaunch humanoid_controllers load_kuavo_real_wheel.launch

Note: The two launch files above are located in src/humanoid-control/humanoid_controllers/launch/ and are used for the two different simulation environments, Gazebo and MuJoCo, respectively.

2. Start the Lower-Level Controller Camera Coordinate Transformation Robot Program

Only used when tag recognition is required:

cd ~/kuavo-ros-opensource
sudo su
source devel/setup.bash
rosrun ar_control ar_control_node.py

Start the Upper-Level Controller Program

TF Tree Republishing Program (websocket server)

Start it in a new terminal:

cd ~/kuavo_ros_application
source devel/setup.bash
roslaunch kuavo_tf2_web_republisher start_websocket_server.launch

If this program is not started, when the Python SDK/strategy obtains TF transforms via /republish_tfs, it will report an error similar to the kuavo_tf2_web_republisher node not running.

Start the Camera Program

Start it in a new terminal:

cd ~/kuavo_ros_application
source devel/setup.bash
roslaunch dynamic_biped apriltag.launch

Start the PyTree Wheel-Arm Example

Start it in another terminal (it is recommended to first cd to the repository root and source the environment):

cd ~/kuavo-ros-opensource
sudo su
source devel/setup.bash
cd src/kuavo_humanoid_sdk/kuavo_humanoid_sdk/kuavo_strategy_pytree/pick_place_box
python3 case_wheel_test_head.py

Usage

python3 case_wheel_test_head.py

Supported Environments

  • Gazebo simulation environment