About this video
A full run of BALANCE: the quadruped uses its IMU and PID control to correct its balance on a tilting test platform in RoboCo on Steam.
The three-axis platform changes roll, pitch, and yaw, and the robot computes correction angles from the attitude its IMU measures.
It compares balance correction off and on, and changes the PID gains KP, KI, and KD to show how the control response differs.
Keys in this exercise
| Key | Action |
|---|---|
| W / S | Platform pitch up / down |
| A / D | Platform roll down / up |
| Q / E | Platform yaw up / down |
| 1 | Direction check: platform and robot IMU |
| 2 | Balance test |
| 3 | Compare balance off / on |
| 4 | Balance control on / off |
| 5 | Level the platform |
| 6 / 7 | Platform speed down / up |
| 8 | Sway test |
| U / J | KP up / down |
| I / K | KI up / down |
| O / L | KD up / down |
| F1 | Key help |
| F2 | Back to the stand pose and zero |
| F3 | Stop the test |
BALANCE uses two Microcontrollers. The robot's joints and sensors and the platform's servos are run by separate Python scripts.
Control structure
- Platform tilt
- IMU reading
- Filtering
- PID correction
- New joint targets
- Posture response
What to watch
- How far the body tilts with balance off versus on
- How quickly the body levels out after the platform stops
- What the console logs when KP, KI, and KD change
Exercise details
| Book | Learning Physical AI with RoboCo: Robot Structure and Gait Control (Korean edition) |
|---|---|
| Series | Physical AI with RoboCo · QUAD-01 (WALK) |
| Chapter | PART 4 · EXPERIMENT · CHAPTER 17 |
| Related chapters | CH17·20·24 |
| Practice model | Book-QUAD-01-BALANCE |
| Robot start file | q01_balance_test_start.py |
| Platform start file | q01_balance_test_platform_start.py |
| Practice files version | v3.5.0 — download |
| Video ID | Q01-17-00 |
| YouTube | youtu.be/9OVq32vbYC0 (opens in a new tab) |