Valkyrie 2026
Loading...
Searching...
No Matches
valor::Robot Class Reference
Inheritance diagram for valor::Robot:

Public Member Functions

 Robot (units::second_t period=kDefaultPeriod)
 Robot (units::hertz_t frequency)

Static Public Member Functions

static RobotGetRobot ()
static bool HasRobot ()

Constructor & Destructor Documentation

◆ Robot() [1/2]

valor::Robot::Robot ( units::second_t period = kDefaultPeriod)
explicit

Constructor for Robot. Aborts if another robot instance is detected.

Parameters
periodThe period of the robot loop function.

◆ Robot() [2/2]

valor::Robot::Robot ( units::hertz_t frequency)
inlineexplicit

Constructor for Robot.

Parameters
frequencyThe frequency of the robot loop function.

Member Function Documentation

◆ GetRobot()

Robot & valor::Robot::GetRobot ( )
static

Get the current running robot.

Returns
The reference to the currently running robot. Aborts if the robot pointer is nullptr

◆ HasRobot()

bool valor::Robot::HasRobot ( )
inlinestatic

Gets whether a Robot instance is active.

Returns
A boolean representing whether there is a robot instance. Implies that GetRobot() is safe to call.

The documentation for this class was generated from the following file:
  • src/main/include/valkyrie/Robot.h