Motion

Motion and how it works in the NUbots codebase.
Ysobel Sims GitHub avatarMithun Sivanesan GitHub avatar
Updated 8 Nov 2026

The Booster Robotics SDK, and the Booster K1's firmware, currently handles all locomotion and get-up routines on the Booster K1, and exposes them through the Booster Robotics SDK.

SVG diagram of a graph generated from DOT notationdigraph motion { rankdir=LR "the Booster Robotics SDK" [style=dashed] "PlanWalkPath" -> "Walk" "PlanKick" -> "VisualKick" "PlanLook" -> "Look" "GetUpPlanner" -> "GetUp" {"Walk", "VisualKick", "Look", "GetUp"} -> "Booster HardwareIO" -> "the Booster Robotics SDK" }the Booster Robotics SDKPlanWalkPathWalkBooster HardwareIOPlanKickVisualKickPlanLookLookGetUpPlannerGetUp
The K1 motion pipeline.

Motion modes

The K1 is always in one of five motion modes. The mode determines which SDK commands the robot accepts.

ModeDescription
DAMPDampens the robot's joints (used commonly as the K1's e-stop).
PREPThe robot holds a fixed standing pose.
WALKThe robot can be walked around; typically used alongside the controller.
CUSTOMDirect joint control (not currently used)
SOCCERThe robot goes into a faster gait, and can perform soccer-specific skills.

A mode change is requested by emitting a BoosterMode message. The Booster HardwareIO module turns these into SDK calls and publishes the robot's current mode as BoosterModeState.

Switching to PREP takes a moment. Changing into prep mid-stride makes the robot fall, so HardwareIO first commands a zero velocity, waits prep_settle_time seconds for the gait to stop, then switches. Another mode request during that window cancels the pending switch.

While the robot is in prep, or waiting to enter it, HardwareIO discards any movement commands.

Any mode transition invalidates the odometry track, so HardwareIO resets the SDK odometry on every mode change (see Odometry).

Walking

The Walk module provides the Walk Task in the Director system. It requests SOCCER mode when the Task starts, then forwards the commanded velocity to the SDK as a BoosterWalk message.

The walk command gives a vector [x, y, z]:

VariableDescription
xvelocity in metres per second in the direction of the x axis
yvelocity in metres per second in the direction of the y axis
zyaw in radians per second, positive is counter-clockwise. The 0 point is straight forward.

The robot's behaviour determines the walk vector, usually via PlanWalkPath.

In-walk kick

When the kick field on the Walk Task is set, Walk drives a fixed forward velocity burst for a fixed duration.

Config valueDescription
kick.velocityThe velocity [x, y, theta] held during the burst, in m/s and rad/s.
kick.durationHow long to hold that velocity before the kick reports as done, in seconds.

Kicking

The VisualKick module provides the Kick Task using the SDK's visual kick. PlanKick decides when to kick, checking that the ball measurement is recent, the ball is close enough and roughly in front, and the robot is aligned to the target.

Starting the kick requires that the robot be in SOCCER mode, and that it is in visual kick mode, which puts the robot into the mode that listens for visual kick messages through the SDK.

The reference comes from our own localisation, converted out of world space into the robot-relative terms the SDK takes:

FieldDescription
x, yThe kick reference point, a fraction of the way from the robot to the ball, set by ball_reference_fraction.
dirThe kick direction, as the angle of the Kick Task's direction vector.
powerThe magnitude of the direction vector, scaled by power_scale.
goal_x, goal_yThe kick target in robot space.
robot_theta_to_fieldThe robot's heading relative to the field.

The kick ends if the ball moves more than min_ball_move_distance from where it started, or after kick_duration seconds have elapsed. Stopping the Task stops the visual kick mode.

Getting up

The Booster Robotics SDK detects falls itself and publishes a fall state, which HardwareIO republishes as BoosterFallDownState with one of IS_READY, IS_FALLING, HAS_FALLEN or IS_GETTING_UP.

GetUpPlanner emits a GetUp Task when the angle between the torso's z axis and the world z axis exceeds fallen_angle. The GetUp module provides that Task: if the robot has fallen and the SDK reports recovery is available, it triggers the SDK's get-up routine. It reports Done once the fall state returns to IS_READY, at which point it marks the robot as standing and resets field localisation, because the get-up invalidates odometry.

Head motion

The Look module provides the Look Task. It takes a unit vector in torso space, converts it into head yaw and pitch, and emits a BoosterHeadRot for HardwareIO to send to the SDK.

HardwareIO clamps the result to the K1's limits before sending it:

AxisRange (radians)Sign
yaw[-0.785, 0.785]leftward positive
pitch[-0.3, 1.0]downward positive
Subsystems
Odometry
Subsystems
Vision
NUbots acknowledges the traditional custodians of the lands within our footprint areas: Awabakal, Darkinjung, Biripai, Worimi, Wonnarua, and Eora Nations. We acknowledge that our laboratory is situated on unceded Pambalong land. We pay respect to the wisdom of our Elders past and present.
Copyright © 2026 NUbots - CC-BY-4.0
Deploys by Netlify