Thunderbots Project
Loading...
Searching...
No Matches
RobotState Class Reference

#include <robot_state.h>

Public Member Functions

 RobotState (const Point &position, const Vector &velocity, const Angle &orientation, const AngularVelocity &angular_velocity)
 
 RobotState (const TbotsProto::RobotState &robot_state_proto)
 
Point position () const
 
Vector velocity () const
 
Angle orientation () const
 
AngularVelocity angularVelocity () const
 
bool operator== (const RobotState &other) const
 
bool operator!= (const RobotState &other) const
 

Detailed Description

This class represents the physical state of a robot

Constructor & Destructor Documentation

◆ RobotState() [1/2]

RobotState ( const Point position,
const Vector velocity,
const Angle orientation,
const AngularVelocity angular_velocity 
)
explicit

Creates a new robot state with the given position, velocity, orientation, angular velocity, and timestamp

Parameters
positionThe position of the robot, with coordinates in metres
velocityThe velocity of the robot, in metres per second
orientationThe orientation of the robot
angular_velocityThe angular velocity of the robot

◆ RobotState() [2/2]

RobotState ( const TbotsProto::RobotState &  robot_state_proto)
explicit

Creates a new robot state based on the TbotsProto::RobotState protobuf representation

Parameters
robot_state_protoThe TbotsProto::RobotState protobuf which this robot state should be based on

Member Function Documentation

◆ angularVelocity()

AngularVelocity angularVelocity ( ) const

Returns the angular velocity of the robot represented by this state

Returns
the angular velocity of the robot represented by this state

◆ operator!=()

bool operator!= ( const RobotState other) const

Defines the inequality operator for a RobotState.

Parameters
otherThe robot state to compare against for inequality
Returns
True if the other robot state is not equal to this robot state, and false otherwise

◆ operator==()

bool operator== ( const RobotState other) const

Defines the equality operator for a RobotState. RobotStates are equal if all their members are equal

Parameters
otherThe robot state to compare against for equality
Returns
True if the other robot state is equal to this robot state, and false otherwise

◆ orientation()

Angle orientation ( ) const

Returns the orientation of the robot represented by this state

Returns
the orientation of the robot represented by this state

◆ position()

Point position ( ) const

Returns the position of the robot represented by this state

Returns
the position of the robot represented by this state

◆ velocity()

Vector velocity ( ) const

Returns the velocity of the robot represented by this state

Returns
the velocity of the robot represented by this state

The documentation for this class was generated from the following files: