4.5 Before Your First Run: Build the SDK
Note
Container users have already built in Develop in a Container — skip to Getting the Robot’s Current Status.
# This step can be skipped when not using a host PC / computing pack
source /opt/ros/humble/setup.bash
# Build the SDK (host PC users: place the SDK in ~/aimdk)
cd ~/aimdk && colcon build
# Load the build artifacts
source install/local_setup.bash
4.6 Run an Example Program
4.6.1 Get the Robot’s Current State
Note
Container users: enter the container first with:
podman exec -it aimdk-dev bash
# Pre-run setup (required for each new shell; skip if already done in the same shell)
cd ~/aimdk
source install/local_setup.bash
# Run the example to get the robot's current mode
# Refer to each example's documentation for more detailed instructions
# Python example
ros2 run py_examples get_mc_action
# C++ example
ros2 run examples get_mc_action
Sample Output
If you see the following output, you have successfully connected to the robot and retrieved its current Locomotion Mode.
[INFO] [1764066631.016733611] [get_mc_action_client]: ✅ GetMCAction client node created
[INFO] [1764066631.017900579] [get_mc_action_client]: 🟢 Service available, ready to send request.
[INFO] [1764066631.018566508] [get_mc_action_client]: Sending request to get robot mode
[INFO] [1764066631.021247791] [get_mc_action_client]: Current robot mode:
[INFO] [1764066631.021832667] [get_mc_action_client]: Mode name: PASSIVE_DEFAULT
[INFO] [1764066631.022396136] [get_mc_action_client]: Mode status: 100
4.6.2 Control the Robot to Wave
Switch the robot to Stable Standing Mode (Force-Control Stand). Please refer to the state transition diagram.
flowchart LR
DA("Damping Mode<br>DAMPING_DEFAULT")
PA("Zero-Torque Mode<br>PASSIVE_DEFAULT")
JD("Position-Controlled Standing<br>JOINT DEFAULT")
SD("Stable Standing<br>STAND_DEFAULT")
LD("Locomotion Mode<br>LOCOMOTION_DEFAULT")
LS("Off-Road Mode<br>LOCOMOTION_STEP")
DA --> PA
PA --> JD
JD --> SD
LD --> SD
LS --> LD
classDef highlight fill:#ffe08a,stroke:#e6a700,stroke-width:2px,color:#000;
class SD highlight;
Important
Before switching to Stable Stand (STAND_DEFAULT), ensure that the robot is standing and both its feet are firmly on the ground.
# 1. Switch to Standing Preparation Mode (Position-Control Stand)
## Python example
ros2 run py_examples set_mc_action JD
## or C++ example
ros2 run examples set_mc_action JD
# 2. Then switch to Stable Standing Mode (Force-Control Stand)
## Python example
ros2 run py_examples set_mc_action SD
## or C++ example
ros2 run examples set_mc_action SD
Once the robot has switched to Stable Standing Mode, you can trigger the wave motion:
# Python example
ros2 run py_examples preset_motion_client
# C++ example
ros2 run examples preset_motion_client
Enter the following when prompted:
Arm Area:
2(right arm)Preset Action ID:
1002(wave)
Expected Result: The robot will perform a wave gesture!