|
Thunderbots Project
|
#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 |
This class represents the physical state of a robot
|
explicit |
Creates a new robot state with the given position, velocity, orientation, angular velocity, and timestamp
| position | The position of the robot, with coordinates in metres |
| velocity | The velocity of the robot, in metres per second |
| orientation | The orientation of the robot |
| angular_velocity | The angular velocity of the robot |
|
explicit |
Creates a new robot state based on the TbotsProto::RobotState protobuf representation
| robot_state_proto | The TbotsProto::RobotState protobuf which this robot state should be based on |
| AngularVelocity angularVelocity | ( | ) | const |
Returns the angular velocity of the robot represented by this state
| bool operator!= | ( | const RobotState & | other | ) | const |
Defines the inequality operator for a RobotState.
| other | The robot state to compare against for inequality |
| bool operator== | ( | const RobotState & | other | ) | const |
Defines the equality operator for a RobotState. RobotStates are equal if all their members are equal
| other | The robot state to compare against for equality |
| Angle orientation | ( | ) | const |
Returns the orientation of the robot represented by this state
| Point position | ( | ) | const |
Returns the position of the robot represented by this state
| Vector velocity | ( | ) | const |
Returns the velocity of the robot represented by this state