Strategy

Documentation for each strategy module in the main NUbots codebase
Updated 23 Mar 2026

DiveToBall

Description

Dives when the ball is close enough on the x-axis, diving in the direction of the ball. Intended for use by a goalie to stop the ball.

Usage

Add this module to the role to dive when the ball is close enough.

Consumes

  • message::strategy::DiveToBall a Task requesting to dive to the ball when it is close enough
  • message::localisaton::Ball with the position of the ball

Emits

  • message::skill::Dive a Task requesting to dive in a specified direction

Dependencies

  • Director
  • Needs the ball location to know when to dive

FallRecovery

Description

A strategy module that handles relaxing when falling and getting up when we hit the ground and have settled. Ensures that getting up has higher priority than falling planner so it doesn't try to relax while getting up.

It is recommended that this task be given higher priority than any other running provider in the system so nothing can interrupt it.

Usage

Emit a message::strategy::FallRecovery Task in order to activate this module's provider

Consumes

  • message::strategy::FallRecovery to activate the provider

Emits

  • message::planning::GetUpWhenFalling to activate the get up planner
  • message::planning::RelaxWhenFalling to activate a relax planner

Dependencies

  • Director

FindObject

Description

Provider reactions to find objects. Currently includes a FindBall Provider to find an ball when its location is unknown.

Usage

Include this module and request a FindBall Task when needing to find the ball.

Consumes

  • message::strategy::FindBall a Task requesting to find the ball

Emits

  • message::planning::TurnOnSpot to turn around if the ball is not in view
  • message::planning::LookAround to move the head around to find the ball

Dependencies

  • Director

StandStill

Description

Makes the robot stand still and not move. It emits a zero walk command until Stability is STANDING and then emits the Stand script.

Usage

Add this module and emit a message::strategy::StandStill Task to make the robot stand still.

Consumes

  • message::strategy::StandStill a Task requesting the robot stands still
  • message::behaviour::state::Stability indicating the stability state of the robot, to check if it is standing

Emits

  • message::skill::Walk to make the walk engine stop cleanly
  • message::actuation::LimbsSequence with a Stand script loaded to make the robot stand still

Dependencies

  • Director
  • The script utility
  • The walk engine

StartSafely

Description

Use this module to make the robot move safely to a stand position.

Usage

Emit the Task on Startup at the root of the Director tree.

Consumes

  • message::strategy::StartSafely Task to request the robot to start safely.
  • message::input::Sensors to determine the position of the motors.

Emits

  • message::actuation::Body to move the whole body to the stand position.

Dependencies

  • Director

StrategiseLook

Description

LookAtBall fixates on a ball if a recent one exists. LookAtGoals fixates on a goal if a recent goal exists.

Usage

Add this module to your role to make the robot look at balls or goals when requested.

Consumes

  • message::planning::LookAtBall a Task requesting to look at the ball if there is a recent ball
  • message::planning::LookAtGoals a Task requesting to look at a goal if there is a recent goal
  • message::localisation::Ball with the position of the ball for fixation
  • message::vision::Goals with the position of the goals for fixation
  • message::input::Sensors for the world matrix to convert the goals measurement into the correct space

Emits

  • message::skill::Look a Task requesting to look in a direction (to the balls or goals)

Dependencies

  • Director
  • The coordinates utility

WalkToBall

Description

Four types of walking to the ball exist in this module.

WalkToBall is a very simple Provider directly walking to the ball without considering the goal position.

WalkToKickBall walks the ball with the robot positioned such that it will move the ball towards the goals. It will move behind the ball first if the robot is positioned between the ball and goals.

TackleBall will walk to the ball perpendicularly to the opponent robot closest to the ball, tackling it off them.

PositionBehindBall will walk behind the ball, facing the goals, and stop behind the ball without touching it. This is for penalty positioning where the ball should not be touched yet.

Usage

Add this module and emit the Task for the desired type of walk to ball.

Consumes

  • message::strategy::WalkToBall Task requesting to walk to the ball directly
  • message::strategy::WalkToKickBall Task requesting to walk to the ball with the goals aligned
  • message::strategy::TackleBall Task requesting to tackle the ball off an opponent
  • message::strategy::PositionBehindBall Task requesting to position behind the ball without touching the ball, in line with the goals
  • message::localisation::Ball information on where the ball is
  • message::support::FieldDescription to know where the goals are
  • message::input::Sensors for transforming into robot space
  • message::localisation::Field for calculations in field space
  • message::localisation::Robots used by TackleBall to find the opponent robot to tackle off

Emits

  • message::planning::WalkTo Task requesting to walk to the ball directly
  • message::strategy::WalkToFieldPosition used by all except WalkToBall to position at the ball appropriately

Dependencies

  • Director
  • utility::math::euler::pos_rpy_to_transform for creating the transform for WalkToFieldPosition

WalkToFieldPosition

Description

Walks to the field position using localisation information.

Usage

Add this module to walk to a position on the field.

Consumes

  • message::strategy::WalkToFieldPosition Task requesting to walk to position on field

Emits

  • message::planning::WalkTo Task requesting to walk to a point

Dependencies

  • Director
Modules
Skill
Modules
Support
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