AllRounder
Description
Play soccer in the all rounder position, which is a multi-purpose position for when only one robot is active. Either bypass GameController and force play, or uses GameController information to decide what to do.
In the ready state, makes a Ready subtask.
In the playing state (for both normal game mode and penalty shootout), finds the ball, fixates on the ball, walks to the ball, and kicks the ball.
In other states, stands still.
Usage
Add this module to play as a all rounder in soccer!
Consumes
message::input::GameState
to get information about the state of the gamemessage::input::GameState::Data::Phase
to get specific information about the current game phase (initial, ready, set, playing, etc).message::strategy::AllRounder
a Task requesting to play as a AllRoundermessage::strategy::NormalAllRounder
a Test requesting to play as a AllRounder in the normal game statemessage::strategy::PenaltyShootoutAllRounder
a Task requesting to play as a AllRounder in the penalty shootout game state
Emits
message::strategy::NormalAllRounder
a Task requesting to play as a AllRounder in the normal game statemessage::strategy::PenaltyShootoutAllRounder
a Task requesting to play as a AllRounder in the penalty shootout game statemessage::strategy::Ready
a Task requesting to walk to the ready positionmessage::strategy::StandStill
a Task requesting to stand still and not movemessage::strategy::FindBall
a Task requesting to look and move around to find the ballmessage::strategy::LookAtBall
a Task requesting to look at a known ballmessage::strategy::WalkToBall
a Task requesting to walk to a known ballmessage::strategy::AlignBallToGoal
a Task requesting to align the robot to face the goal with the ball infront of itmessage::planning::KickToGoal
a Task requesting to kick the ball towards the goal
Dependencies
Defender
Description
Play soccer in the defender position. Either bypass GameController and force play, or uses GameController information to decide what to do.
In the ready state, walks to a position on the field.
In the playing state for normal game mode, finds the ball, fixates on the ball, walks to the ball if the ball is in the defenders bounded box defensive area, and kicks the ball.
If ball is outside bounded box area and ball is in opposition half, defender is clamped to the edge of bounding box closest to ball.
If ball is outside bounded box area and ball is in own half, defender is clamped to the edge of bounding box closest to ball and position itself 1 meter behind the ball.
Usage
Add this module to play as a defender in soccer!
Consumes
message::input::GameState
to get information about the state of the gamemessage::input::GameState::Data::Phase
to get specific information about the current game phase (initial, ready, set, playing, etc).message::purpose::Defender
a Task requesting to play as a Defender
Emits
message::strategy::WalkInsideBoundedBox
a Task requesting to stay within a bounded area on the field.message::strategy::StandStill
a Task requesting to stand still and not movemessage::strategy::FindBall
a Task requesting to look and move around to find the ballmessage::strategy::LookAtBall
a Task requesting to look at a known ballmessage::strategy::WalkToBall
a Task requesting to walk to a known ballmessage::strategy::AlignBallToGoal
a Task requesting to align the robot to face the goal with the ball in front of itmessage::planning::KickToGoal
a Task requesting to kick the ball towards the goal
Dependencies
Goalie
Description
Play soccer in the goalie position. Either bypasses GameController and force playing, or uses GameController information to decide what to do.
In the ready state, walks to the goals.
In the playing state (for both normal game mode and penalty shootout), finds the ball, fixates on the ball and dives if the ball is close.
Usage
Add this module to the role and emit a Goalie Task.
Consumes
message::input::GameState
to get information about the state of the gamemessage::input::GameState::Data::Phase
to get specific information about the current game phase (initial, ready, set, playing, etc).message::strategy::Goalie
a Task requesting to play as a Goaliemessage::strategy::NormalGoalie
a Test requesting to play as a Goalie in the normal game statemessage::strategy::PenaltyShootoutGoalie
a Task requesting to play as a Goalie in the penalty shootout game state
Emits
message::strategy::NormalGoalie
a Task requesting to play as a Goalie in the normal game statemessage::strategy::PenaltyShootoutGoalie
a Task requesting to play as a Goalie in the penalty shootout game statemessage::strategy::StandStill
a Task requesting to stand still and not movemessage::planning:::LookAround
a Task requesting to look around for the ballmessage::strategy::LookAtBall
a Task requesting to look at a known ballmessage::strategy::DiveToBall
a Task requesting to dive to the ball if it is close enoughmessage::strategy::WalkToFieldPosition
Task requesting to walk to position on field
Dependencies
KeyboardWalk
Description
Starts the Director graph for the KeyboardWalk scenario.
Keyboard walk uses keyboard inputs to control the robot. The inputs available are detailed in the following table.
Command | Description |
---|---|
e | Toggles the walk on and off. Initially it is off. |
w | Adds 0.01 to the walk command x-value. This value is in meters/second. |
s | Adds -0.01 to the walk command x-value. This value is in meters/second. |
a | Adds 0.01 to the walk command y-value. This value is in meters/second. |
d | Adds -0.01 to the walk command y-value. This value is in meters/second. |
z | Adds 0.1 to the walk command rotational value. This value is in radians/second. |
x | Adds -0.1 to the walk command rotational value. This value is in radians/second. |
, | Runs the kick with the left foot. |
. | Runs the kick with the right foot. |
g | Runs the get up. |
← | Head turns to the left. |
→ | Head turns to the right. |
↑ | Head turns upwards. |
↓ | Head turns downwards. |
r | Resets keyboardwalk. Head rotation is set to 0. Walk command is set to 0. |
q | Quits keyboardwalk. |
Usage
Include this in your role to start the Director tree to run KeyboardWalk.
Consumes
Emits
message::strategy::StandStill
to make the robot still while not walkingmessage::behaviour::state::Stability
to set the robot's initial stability statemessage::strategy::FallRecovery
to enable getting up when fallenmessage::skill::Kick
to kick with left/right legmessage::skill::Look
to look in desired directionmessage::skill::Walk
to walk with desired velocity
Dependencies
Script Runner
Description
Allows scripts to be run from the command line.
Usage
ScriptRunner will attempt to run each command line parameter as a script. Once the first script has completed it will run the next, and so on until all are finished at which point it terminates the program.
Consumes
NUClear::message::CommandLineArguments
containing the list of scripts from the command line
Emits
message::actuation::LimbsSequence
through the Script utility, which populates the requested Script/s into LimbsSequences.
Dependencies
Script Tuner
Description
Provides a curses interface for creating, editing and tweaking scripts.
Usage
The program must be started with the name of a script file to edit as its sole command line argument. If the file does not exist then a new blank script is started and the file will be created when it is saved.
The keyboard controls are as follows:
- Up/Down arrow: Select servo
- Left/right arrow: Select angle or gain
- , (comma): Go to previous frame
- . (period): Go to next frame
- Enter: Edit selected field
- Space: Toggle motor lock
- : (colon): List available commands
- A: Save script as
- G: Allows multiple gain edits at once
- I: Delete current frame
- J: "jump" to frame without the robot moving
- M: Mirror script - flip about sagittal plane
- N: Insert a new frame before the current frame
- R: Refresh the view
- S: Save script
- T: edit frame duration
- X: Shutdown powerplant/stop binary
Consumes
NUClear::message::CommandLineArguments
containing the name of the script to editmodule::behaviour::tools::LockServo
(internal to this class only) to trigger servo lock eventmessage::platform::RawSensors
to get position of specific servo when locking it
Emits
message::actuation::ServoTarget
to control currently selected servo when locked or unlockedmessage::actuation::ServoTargets
to control all servos when transitioning between framesmessage::actuation::LimbsSequence
to play the scriptmodule::behaviour::tools::LockServo
(internal to this class only) to trigger servo lock event
Dependencies
- libncurses is used for the user interface
Soccer
Description
Starts the Director graph for the soccer scenario. If the robot is penalised, it will make it stand still. Otherwise, it will emit the Task corresponding to the soccer position specified in configuration.
If the configuration is set to "dynamic" it will choose the appropriate position out of Defender and Striker. The robot listens for the positions of other robots and makes its decision.
Possible positions are Striker, Goalie and Defender.
Usage
Include this in your role to start the Director tree to play soccer.
Consumes
message::purpose::FindPurpose
to find the right purpose to emitmessage::input::Robocup
to dynamically determine the robot's purposemessage::localisation::Ball
to determine the robot's distance to the ball, for comparison with other potential strikersmessage::input::Sensors
to transform the ball from world to robot spacemessage::input::GameEvents::Penalisation
to find out if the robot has been penalised and should stop movingmessage::input::GameEvents::Unpenalisation
to find out if the robot has been unpenalised and can play againmessage::input::ButtonMiddleDown
to force play with a middle button press
Emits
message::purpose::FindPurpose
a Task to request to find the robot's soccer playing purpose, to start the Director graph to play soccermessage::purpose::Purposes
to inform the other robots of their purposesmessage::strategy::StandStill
to make the robot still while penalisedmessage::platform::ResetWebotsServos
to reset the servos in Webots when penalisedmessage::behaviour::state::Stability
to set the robot's initial stability state to standingmessage::strategy::FallRecovery
a Task to request the robot to manage fallingmessage::purpose::Striker
a Task to request the robot acts as a strikermessage::purpose::Goalie
a Task to request the robot acts as a goaliemessage::purpose::Defender
a Task to request the robot acts as a defender
Dependencies
Striker
Description
Play soccer in the striker position, which is an offensive position. Either bypass GameController and force play, or uses GameController information to decide what to do.
In the ready state, makes a Ready subtask.
In the playing state (for both normal game mode and penalty shootout), finds the ball, fixates on the ball, walks to the ball, and kicks the ball. It will not approach the ball if it is not in its own bounding box, and instead will stand nearby.
In other states, stands still.
Usage
Add this module to play as a striker in soccer!
Consumes
message::input::GameState
to get information about the state of the gamemessage::input::GameState::Data::Phase
to get specific information about the current game phase (initial, ready, set, playing, etc).message::strategy::Striker
a Task requesting to play as a Strikermessage::strategy::NormalStriker
a Test requesting to play as a Striker in the normal game statemessage::strategy::PenaltyShootoutStriker
a Task requesting to play as a Striker in the penalty shootout game state
Emits
message::strategy::NormalStriker
a Task requesting to play as a Striker in the normal game statemessage::strategy::PenaltyShootoutStriker
a Task requesting to play as a Striker in the penalty shootout game statemessage::strategy::Ready
a Task requesting to walk to the ready positionmessage::strategy::StandStill
a Task requesting to stand still and not movemessage::strategy::FindBall
a Task requesting to look and move around to find the ballmessage::strategy::LookAtBall
a Task requesting to look at a known ballmessage::strategy::WalkToBall
a Task requesting to walk to a known ballmessage::strategy::AlignBallToGoal
a Task requesting to align the robot to face the goal with the ball infront of itmessage::planning::KickToGoal
a Task requesting to kick the ball towards the goalmessage::strategy::WalkInsideBoundedBox
a Task requesting that the robot stays within a defined bounded box
Dependencies
Tester
Description
This module allows the user to select various combinations of strategies and planners with different priorities for testing purposes. For example, you may want to only test walking to the ball and kicking, which can be achieved by only enabling the WalkToBal and KickTo tasks in the config.
Usage
Add this module and enable/disable strategies and planners in the config which you wish to test.
Consumes
Emits
If enabled in the config the module emits the following.
message::strategy::StandStill
a Task requesting to stand still and not movemessage::strategy::FindBall
a Task requesting to look and move around to find the ballmessage::strategy::LookAtBall
a Task requesting to look at a known ballmessage::strategy::WalkToBall
a Task requesting to walk to a known ballmessage::strategy::AlignBallToGoal
a Task requesting to align the robot to face the goal with the ball infront of itmessage::planning::KickToGoal
a Task requesting to kick the ball towards the goalmessage::planning::KickTo
a Task requesting to kick the ball if closemessage::strategy::StandStill
a Task requesting the robot to stand stillmessage::strategy::LookAround
a Task requesting the robot to look aroundmessage::strategy::WalkToFieldPosition
a Task requesting the robot to walk to a specified position
Dependencies
- Eigen