⚠ Spotter with e-stop required throughout this entire unit. Never transition to WALK mode alone. Stand at least 2 m from the robot during all walking commands.

Understanding the Mode Sequence

The K1 must transition through modes in a specific sequence. Skipping steps causes falls. Always go through this order:

DAMP PREP WALK

And for shutdown, always return in reverse:

WALK PREP DAMP

Step 1: Controlled PREP Transition

from booster_robotics_sdk import BoosterRobot, RobotMode
import time

robot = BoosterRobot(ip="192.168.10.102")
robot.connect()

# Start from DAMP (should already be in DAMP after Unit 1)
state = robot.get_state()
assert state.mode == RobotMode.DAMP, "Must start from DAMP"

print("Entering PREP — robot will stand up slowly")
robot.set_mode(RobotMode.PREP)

# Wait for PREP to stabilize — this is mandatory
print("Waiting 5 seconds for PREP stabilization...")
time.sleep(5)

state = robot.get_state()
print(f"Mode confirmed: {state.mode}")
print(f"IMU pitch (should be near 0): {state.imu_euler[1]:.2f} deg")

Step 2: Enter WALK and Send First Velocity Command

from booster_robotics_sdk import LocomotionCommand

print("Entering WALK mode — spotter ready?")
robot.set_mode(RobotMode.WALK)
time.sleep(2)  # Stabilize in WALK

# Walk forward at 0.2 m/s for 3 seconds
print("Walking forward...")
cmd = LocomotionCommand(vx=0.2, vy=0.0, vyaw=0.0)
robot.send_locomotion_command(cmd)
time.sleep(3)

# Stop
robot.send_locomotion_command(LocomotionCommand(vx=0, vy=0, vyaw=0))
time.sleep(1)

Step 3: Lateral Movement and Yaw

# Step sideways (right)
cmd = LocomotionCommand(vx=0.0, vy=-0.2, vyaw=0.0)
robot.send_locomotion_command(cmd)
time.sleep(2)
robot.send_locomotion_command(LocomotionCommand(vx=0, vy=0, vyaw=0))
time.sleep(1)

# Rotate in place (yaw)
cmd = LocomotionCommand(vx=0.0, vy=0.0, vyaw=0.3)
robot.send_locomotion_command(cmd)
time.sleep(3)
robot.send_locomotion_command(LocomotionCommand(vx=0, vy=0, vyaw=0))
time.sleep(1)

Step 4: Safe Shutdown Sequence

# Always return to PREP before DAMP
print("Shutting down — entering PREP...")
robot.set_mode(RobotMode.PREP)
time.sleep(3)

print("Entering DAMP...")
robot.set_mode(RobotMode.DAMP)
time.sleep(1)

robot.disconnect()
print("Done — robot is in DAMP (safe to handle)")

Velocity Limits Reference

Parameter Min Max Unit
vx (forward/back)-0.50.5m/s
vy (lateral)-0.30.3m/s
vyaw (rotation)-1.01.0rad/s

Start with conservative values (50% of max) in your first sessions. The K1's balance controller handles stability, but sudden command changes near the limits can cause the robot to stumble.

Unit 2 Complete When...

You have successfully walked the K1 forward, backward, and laterally. Yaw rotation works. You have performed the safe shutdown sequence (WALK → PREP → DAMP) at least twice. No unplanned falls occurred. Log your session notes before proceeding to Unit 3.