← All BooksKorean

Learning Physical AI with RoboCo: Robot Structure and Gait Control

Change a four-legged robot's gait and posture in RoboCo and see how walking works

QUAD-01WALKPhysical AI with RoboCo
Cover of the Korean edition of Learning Physical AI with RoboCo: Robot Structure and Gait Control, shown with English text. A yellow-and-black four-legged robot and the QUAD-01 WALK tag.

New Print · ebook (Korean edition)

Physical AI with RoboCo · QUAD-01 · WALK

From one W key press
to a twelve-joint step

A yellow body on four black legs. While you hold W, the quadruped in RoboCo lifts its diagonal legs in turn and walks forward; let go, and it settles back onto all four feet. Press a number key and the same robot sits and waves, stretches, or holds a handstand.

The book has you walk the robot first, then trace that step back one layer at a time: the gait sets a foot target for each leg, IK turns each target into three joint angles, and twelve ServoMotors make the motion. You change one value, walk again under the same conditions, and when the robot falls, you narrow down which layer to check, in order.

Hands-on quadruped practice in RoboCo's virtual world, no robot kit needed

See it walk first On YouTube

A real run of the WALK model you start in Chapter 1. It walks while a key is held, turns, side-steps, and stops when you let go. The book spends 25 chapters on the structure and values behind that single step.

Questions this book answers

What does walking on legs need that wheels don't?

Which foot lifts first, where it lands, and how the other feet hold up the body. The book starts from three questions a wheeled robot never has to ask.

How does one W key become twelve joints?

Walk key → gait → foot path per leg → IK → joint angles → ServoMotor. You read a single step as five layers.

Same angle, so why do the left and right legs move differently?

You check joint axes, turning direction, and left-right mirroring on one leg mounted on a stand, then fix a leg that turns the wrong way.

When it falls, where do you look first?

Model and start file → Port → joint direction → coordinates → IK and joint limits → foot path. You use the console log to narrow it down, fix one condition, and walk again.

Flow diagram. Bold arrows run from the W key to Gait (pattern) → Foot path (per leg) → IK (x·y·z → angles) → 12 joints (HX · HY · KN) → ServoMotor (→ one step). In a gray panel below, each column holds the practice model that shows that layer: WALK, LEG3, LEG2, LEG1, with chapter numbers.
Flow diagram From one W key press to one step, with the practice model that shows each layer in the same column.Zoom ↗ (open larger in a new tab)

The eight exercises in this book

There is one robot: a quadruped with three joints per leg, twelve ServoMotors in all. It is set up as seven practice models: standing on the floor, hung on a viewing stand, or placed on a tilting test platform. There are eight start files in total (BALANCE needs one for the robot and one for the platform).

RoboCo play screen — the Book-QUAD-01-WALK model
CH01 · 03 · 04 · 16 · 19~25

WALK

The walking model: hold a key to walk. Forward, back, turn in place, side-step, and auto modes 1–3

q01_walk_start.py

RoboCo play screen — the Book-QUAD-01-ACTION model
CH02 · 05 · 18

ACTION

One number key, one performance: from a greeting and a stretch to a handstand and a tap dance

q01_action_start.py

RoboCo play screen — the Book-QUAD-01-LEG1 model
CH06~09

LEG1

Robot on a stand, one joint at a time. See the HX, HY and KN axes and their Ports on screen

q01_leg1_joint_start.py

RoboCo play screen — the Book-QUAD-01-LEG2 model
CH10~13

LEG2

Move a foot target in x·y·z and IK works out three joint angles; FK checks the result

q01_leg2_ik_start.py

RoboCo play screen — the Book-QUAD-01-LEG3 model
CH07 · 09 · 13 · 14 · 19 · 21

LEG3

All four legs together: reach, joint limits, lifting one leg, diagonal pairs, a three-leg stance

q01_leg3_combined_start.py

RoboCo play screen — the Book-QUAD-01-ROLL_PITCH_YAW model
CH15~18

ROLL_PITCH_YAW

Feet stay planted while the body shifts and tilts: x·y·z plus roll, pitch and yaw

q01_body_pose_start.py

RoboCo play screen — the Book-QUAD-01-BALANCE model
CH17 · 20 · 24 (optional)

BALANCE

Balance on a tilting test platform with an IMU and PID; two Microcontrollers, robot and platform

q01_balance_test_start.py · q01_balance_test_platform_start.py

Screens are the author's own RoboCo runs. What to watch in each exercise, which value to change, and what to compare it with are covered in the matching chapter.

What you'll be able to do

  1. Walk a quadruped with the keyboard and pick its movesRun forward, back, turns in place, and side steps in WALK, plus nine performances in ACTION, and learn the difference between keys you hold and keys you press once.
  2. Read one leg's three joints and how all twelve servos connectCheck the HX, HY, and KN axes and their directions, how the FL, FR, HL, and HR legs pair with Ports 2–13, and the left-right mirroring settings.
  3. Shape a pose by moving foot targetsChange FOOT_X, FOOT_Y, and FOOT_Z one axis at a time, compare the IK angles with the position FK gives back, and filter out targets a leg can't reach.
  4. Change one value and compare fairlyVary body height, transition time, foot lift height, stride, and walking speed one at a time, and record distance, tilt, and number of falls.
  5. Finish and improve a walking missionStand → walk → turn → walk → stop in a target zone, repeated under the same conditions; then use the failures to change one thing and raise the completion rate.

The robot: three-joint legs × 4 = a twelve-joint quadruped

Render of the QUAD-01 quadruped: a yellow body, a black face panel with two light-blue eyes at the front, and four black legs
  • Four legs, twelve joints: each leg has HX (swings out to the side), HY (swings forward and back), and KN (the knee).
  • FL, FR, HL, HR: front left, front right, hind left, hind right, named from the direction the robot's face points, not from the screen.
  • A TextScreen on the body shows the current action, waiting state, and foot targets; the console logs lines such as [INPUT], [STATE], and [JOINT].
  • The BALANCE model carries an IMU that reads the body's roll, pitch, and yaw.

This is the entry book for the QUAD track. You don't need any wheeled-robot experience: you start from scratch with this one quadruped and widen your control step by step, from one joint → one leg → four legs → coordinates → IK → posture → gait.

How to read RoboCo results: RoboCo is a game-based robot sandbox with a physics simulation. Distances, tilt, and falls are observations under simulated conditions. Use them to learn how to check what changes when you change a value, not as measurements of real hardware.

5 PARTs · 25 chapters

  1. Run the finished robot
  2. Observe
  3. Understand the structure
  4. Change values and actions
  5. Compare results
  6. Find the cause of a failure
  7. Finish the mission
  • PART 1 · EXPERIENCETry it hands-on

    No code yet: just WALK's direction keys and ACTION's number keys. First steps; stand, sit, and stretch; six direction keys and auto modes 1–3; walk, turn, and stop; free play. CH01–05

  • PART 2 · UNDERSTANDHow twelve joints make one step

    On one leg mounted on a stand, see the three degrees of freedom and joint axes; then map four legs to twelve ServoMotors, left-right mirroring, the control layers from servo to gait, and the coordinate frame. CH06–10

  • PART 3 · CONTROLShape a pose by moving the feet

    Move a foot target, let IK compute the leg angles, compare the computed and actual pose, catch unreachable targets in advance, and change the posture of all four legs and the body together. CH11–15

  • PART 4 · EXPERIMENTFind a steadier walk

    Change body height, tilt and turn, transition speed, the foot paths of standing and moving legs, and stride, speed, and gait cycle, one at a time. The IMU and PID tilting-platform exercise is optional. CH16–20

  • PART 5 · PROJECTA walking mission

    Build the gait cycle and leg order, walk forward and back, turn left and right, get a fallen robot walking again, then repeat the final mission and record its completion rate. CH21–25

Roadmap. PART 1 Experience, PART 2 Understand, PART 3 Control, PART 4 Experiment, and PART 5 Project run left to right, with PART 5 highlighted. Below each is the practice model and chapters: WALK and ACTION CH01–05, LEG1 and LEG3 CH06–10, LEG2 and POSE CH11–15, WALK and BALANCE CH16–20, WALK CH21–25.
Roadmap Five PARTs, one quadruped, and the practice models each PART uses.Zoom ↗ (open larger in a new tab)

Final mission: stand → walk → turn → walk → stop

The last chapter comes back to the same W, A, D, and X keys you started with. You fill in a mission card with a start line and a target zone first, then run it several times under the same conditions and record whether the robot walked the whole way, stayed on its feet, and held its stop pose inside the zone. From those records you pick one problem, such as wobbling right after a turn, change one value, and compare again.

To be clear: this mission is not autonomous walking with sensors judging the destination. A person presses the keys in sequence, and a person judges success by watching the screen. Choosing a gait from sensor input comes in QUAD-02.

One step beyond the book: extras you'll only find here

The book covers only what you can check inside RoboCo. This section looks at the question that comes after you close it: how does this experience connect to real quadruped robots? Use it to judge how far the book will take you before you buy.

Two-column comparison. Left panel, This book · RoboCo: 3 joints × 4 legs (12 ServoMotors), foot target → IK, diagonal-pair gait, IMU · PID test platform, keys for start · turn · stop. Right panel, Real robots · beyond: joint actuators (motor · gearbox · torque control), same IK + forces, gait chosen by terrain, state estimation · balance, sensing · learning (continues in QUAD-02). Dotted lines pair each row.
Comparison map What you see in RoboCo and what real quadrupeds add. The right column is not something this book reproduces.Zoom ↗ (open larger in a new tab)

1. Why a robot that walks on legs?

Wheels are fast and efficient on flat floors. Where the ground breaks up or gets rough (stairs, curbs, gravel), legs that can lift a foot and set it down somewhere else have the advantage. That is why quadrupeds keep finding work in places built for people, such as facility inspection, patrols, and research platforms. The price is that a legged robot has to decide at every moment which feet hold up the body, so there is far more to control than on a wheeled robot. That is why this book starts at the twelve joints.

2. What's the same as a real quadruped, and what's different

  • The same skeleton: three joints per leg, IK that turns a foot target into joint angles, two diagonal pairs of legs taking turns to hold the body, and an IMU reading body tilt. The ideas you change by hand in this book show up in any description of a real quadruped.
  • What real robots add: a motor and gearbox at every joint, control of force (torque) and not just angle, combining several sensors to estimate the body's state, choosing a gait from the terrain, and carrying a gait learned in simulation over to a real machine.
  • What RoboCo gives you: falling doesn't break anything, and you can restart under the same conditions as often as you like. It is a good place to build the habit of changing one value and comparing results, over and over, at no cost.

3. A look inside the practice code

The free ZIP Book_Q01_Robot contains eight start files and Q01_Lib, the author's teaching library (55 Python files). Its folders follow the same layers as the book.

FolderWhat it doesIn the book
core/IK, servo commands, the Port table, key input, console log, TextScreen, IMUThroughout PARTs 2 and 3
walk/ · auto/Gait (stride, phase speed), walk keys, auto modes 1–3CH01, 03, 19–25
action/Number-key performances and the screen state flowCH02, 05, 18
leg1_joint/ · leg2_ik/ · leg3_combined/One joint → foot coordinates → four-leg testsCH06–14, 19, 21
body_pose/Body x·y·z and roll, pitch, yawCH15–18
balance_test/IMU filter, PID, the tilting platform and its linkCH17, 20

The keys and default values are right there in the code. What the code doesn't contain is the order to run things in, what to watch, which value to change and by how much, what to compare it with, and how to read the result. That is the book's text and appendices.

4. What this book doesn't cover

Autonomous walking, where the robot sees obstacles with sensors and chooses its own gait, and learning-based decisions are in QUAD-02. Walking over to pick up and move objects with a robot arm is in QUAD-03. Real hardware issues such as wiring, power, heat, and communication delay aren't covered. QUAD-01 focuses on the ground all of those stand on: how twelve joint commands become one step.

Who this book is for

  • New to robots or code: PART 1 never opens the code; you just press keys to walk and perform. Math only shows up when it's needed, as a way to connect inputs and results.
  • High school students: see quadruped walking with your own eyes, learn how joints, coordinates, and control relate, and write an inquiry report from one-variable experiments.
  • University students and early majors: connect IK and FK for a three-joint leg, workspace and joint limits, gait cycle and leg order, and IMU/PID balance to what you see on screen and in the log.
  • Makers and developers: follow CONTROL PARAMETERS in the start files and the Q01_Lib/core and walk code, and change the gait yourself.
  • Teachers and training programs: run repeatable experiments and mission assessments with the same practice models and record tables.
Starting points by reader. New to robots and code: PART 1 from Chapter 1 (drive WALK and ACTION with keys only). Have used Python: focus on PARTs 3 and 4 (change CONTROL PARAMETERS one at a time). Robotics major or maker: IK (CH12–14) and gait (CH21–23), tracing Q01_Lib/core and walk. Teacher: course plans plus Appendix D (experiment sheet and mission checklist).
Rolestorming Where should I start? First pages chosen from each reader's point of view.Zoom ↗ (open larger in a new tab)

Book + practice files + video companion

BOOK

The book

Setup and first run; for all 25 chapters, the exercise order, what to watch, one-value experiments, comparison tables, and the order for finding a failure's cause; the final mission card; Appendices A–F (connections, key maps, IK limit sheet, experiment sheets, gait troubleshooting, terms and units).

DIGITAL PACKAGE

Practice files

The code ZIP v3.5.0 with eight start files and Q01_Lib, plus the guide to the seven Steam Workshop robot models, all on the practice files page with checksums.

WEB

Video companion

Motion a printed page can't show: runs of all seven practice models with what to watch, web-only challenges, versions, and errata.

Two panels. Left, Open to all (book page · Workshop): seven Workshop robot models, practice code ZIP Book_Q01_Robot v3.5.0, README first run (WALK up to walking with W), seven run videos (what to watch only), version · errata. Right, The book (for readers, highlighted): exercise order · keys per chapter, what to watch in each chapter (25 chapters), one-value experiments · tables, order for finding a failure's cause (Appendices A–F), final mission card · criteria.
Role map What is where: the ZIP gets you to the first run; order, observation, and interpretation are in the book.Zoom ↗ (open larger in a new tab)

What you need

TypeItemNotes
RequiredRoboCo on SteamLoad the robots in Sandbox and run them in Live Mode.
RequiredSeven practice robot modelsSubscribe on Steam Workshop; see the practice files page
RequiredPractice code ZIPBook_Q01_Robot_release_v3.5.0_en.zip (English comments): download
Not neededA separate Python installScripts run on RoboCo's built-in Python.
OptionalA code editorFor changing CONTROL PARAMETERS in the start files.

Check RoboCo's Steam page for current OS support, system requirements, languages, and price before you buy. The game build the exercises were checked on, and compatibility notes, are recorded under verification status on the practice files page.

Where QUAD-01 fits in the series

QUAD-01 is the entry book for the quadruped track, and you can start it without reading any other volume. The series splits into a CORE path that builds the foundation (MOVE → SENSE/REACT → MANIPULATE) and a QUAD path that grows the quadruped (WALK → DECIDE → WORK). There's no required order for the six books.

BookCapabilityWhat it coversStatus
CORE-01MOVE / CONTROLDriving a four-wheel robot with independent drive and steeringPublished
CORE-02SENSE / REACTSensor input, state changes, reactions, feedbackComing soon
CORE-03MANIPULATEPicking up, moving, and placing with a mobile robot armComing soon
QUAD-01WALKJoints, foot coordinates, IK, posture, and gait of a twelve-joint quadrupedThis book · Published
QUAD-02DECIDEChoosing actions from sensors and state; rule-based vs. learning-basedComing soon
QUAD-03WORKWalking over to pick things up and move themComing soon

Pages for upcoming volumes are in Korean for now.

Series map. Top panel, CORE track: CORE-01 MOVE / CONTROL (published), CORE-02 SENSE / REACT and CORE-03 MANIPULATE (coming). Bottom panel, QUAD track: QUAD-01 WALK (this book, highlighted), QUAD-02 DECIDE and QUAD-03 WORK (coming). Books in the same column cover matching ideas.
Scenario map Where to go after QUAD-01: sensing and deciding in QUAD-02, walking to work in QUAD-03.Zoom ↗ (open larger in a new tab)

About the author, Ronnie Kim

Ronnie Kim is a full-stack software engineer and senior SW/HW architect with more than 20 years in software development. Drawing on design and build work across back end and front end, he handles technical reviews, new feature design, technical decision-making, and AI and AX transformation projects.

Robotics has been his other long-running field. He has won awards at robotics competitions and has spent over 20 years studying robot structure and control, sensors, motors, actuators, and how software and hardware connect. Lately he researches the full structure of physical AI and robot systems, from inputs and sensors through state, decisions, control, actuators, and feedback, and turns it into hands-on learning material.

In teaching robotics, he favors running a finished robot first, observing it, changing control values, and comparing results over long stretches of theory or code.

Author channels: YouTube (opens in a new tab) · Naver Blog (Korean) (opens in a new tab)

Other books: Physical AI with RoboCo · CORE-01, What Should Our Children Learn in the Age of AI?, How Long Will Developers Still Be Needed?, Arduino Environmental Sensors for Everyone

Book details

TitleLearning Physical AI with RoboCo: Robot Structure and Gait Control (Korean edition)
SubtitleChange a four-legged robot's gait and posture in RoboCo and see how walking works
PublisherPUBPLE
SeriesPhysical AI with RoboCo · QUAD-01 (WALK)
AuthorRonnie Kim
LanguageKorean (practice code also available with English comments)
PlatformRoboCo (Steam) · seven Steam Workshop practice models
Technical basisBook_Q01_Robot release v3.5.0 (Python code v3.4.9) · RoboCo Python API 0.3.1 docs
FormatPrint · ebook. Where to buy

From one W key to a walking mission

First you watch it walk. Then you split a step into layers and find out why. Finally you change one value, walk again under the same conditions, and compare. The same method carries straight on to a quadruped that decides with sensors and one that walks over to do a job.