gusimplewhiteboard
guWhiteboard::Odometry Class Reference

Provides a C++ wrapper around wb_odometry. More...

#include <Odometry.hpp>

Inheritance diagram for guWhiteboard::Odometry:
Collaboration diagram for guWhiteboard::Odometry:

Public Member Functions

 Odometry (float t_forward=0.0f, float t_left=0.0f, float t_turn=0.0f)
 Create a new Odometry. More...
 
 Odometry (const Odometry &t_other)
 Copy Constructor. More...
 
 Odometry (const struct wb_odometry &t_other)
 Copy Constructor. More...
 
Odometryoperator= (const Odometry &t_other)
 Copy Assignment Operator. More...
 
Odometryoperator= (const struct wb_odometry &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const Odometry &t_other) const
 
bool operator!= (const Odometry &t_other) const
 
bool operator== (const wb_odometry &t_other) const
 
bool operator!= (const wb_odometry &t_other) const
 
float & forward ()
 
const float & forward () const
 
void set_forward (const float &t_newValue)
 
float & left ()
 
const float & left () const
 
void set_left (const float &t_newValue)
 
float & turn ()
 
const float & turn () const
 
void set_turn (const float &t_newValue)
 
 Odometry (const std::string &t_str)
 String Constructor. More...
 
std::string description ()
 
std::string to_string ()
 
void from_string (const std::string &t_str)
 
void clear ()
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 
Odometry operator+ (const Odometry &a) const
 
Odometry operator- (const Odometry &a) const
 

Additional Inherited Members

- Public Attributes inherited from wb_odometry
float forward
 /< forward, mm/s More...
 
float left
 /< sideways, mm/s More...
 
float turn
 /< rotation, deg/s More...
 

Detailed Description

Provides a C++ wrapper around wb_odometry.

Definition at line 84 of file Odometry.hpp.

Constructor & Destructor Documentation

◆ Odometry() [1/4]

guWhiteboard::Odometry::Odometry ( float  t_forward = 0.0f,
float  t_left = 0.0f,
float  t_turn = 0.0f 
)
inline

Create a new Odometry.

Definition at line 102 of file Odometry.hpp.

Referenced by operator==().

◆ Odometry() [2/4]

guWhiteboard::Odometry::Odometry ( const Odometry t_other)
inline

Copy Constructor.

Definition at line 109 of file Odometry.hpp.

References forward(), left(), and turn().

◆ Odometry() [3/4]

guWhiteboard::Odometry::Odometry ( const struct wb_odometry t_other)
inline

Copy Constructor.

Definition at line 116 of file Odometry.hpp.

References wb_odometry::forward, wb_odometry::left, and wb_odometry::turn.

◆ Odometry() [4/4]

guWhiteboard::Odometry::Odometry ( const std::string &  t_str)
inline

String Constructor.

Definition at line 207 of file Odometry.hpp.

References from_string().

Member Function Documentation

◆ clear()

void guWhiteboard::Odometry::clear ( )
inline

WHITEBOARD_POSTER_STRING_CONVERSION.

Definition at line 356 of file Odometry.hpp.

References set_forward(), set_left(), and set_turn().

◆ description()

std::string guWhiteboard::Odometry::description ( )
inline

USE_WB_ODOMETRY_C_CONVERSION

Definition at line 212 of file Odometry.hpp.

References forward(), left(), ODOMETRY_DESC_BUFFER_SIZE, turn(), and wb_odometry_description().

Referenced by guWhiteboard::NaoWalkStatus::description().

◆ forward() [1/2]

float & guWhiteboard::Odometry::forward ( )
inline

Definition at line 158 of file Odometry.hpp.

References wb_odometry::forward.

Referenced by Odometry(), description(), operator+(), operator-(), operator=(), operator==(), and to_string().

◆ forward() [2/2]

const float & guWhiteboard::Odometry::forward ( ) const
inline

Definition at line 163 of file Odometry.hpp.

References wb_odometry::forward.

◆ from_string()

void guWhiteboard::Odometry::from_string ( const std::string &  t_str)
inline

USE_WB_ODOMETRY_C_CONVERSION

Definition at line 250 of file Odometry.hpp.

References ODOMETRY_DESC_BUFFER_SIZE, set_forward(), set_left(), and set_turn().

Referenced by Odometry(), and guWhiteboard::NaoWalkStatus::from_string().

◆ left() [1/2]

float & guWhiteboard::Odometry::left ( )
inline

Definition at line 173 of file Odometry.hpp.

References wb_odometry::left.

Referenced by Odometry(), description(), operator+(), operator-(), operator=(), operator==(), and to_string().

◆ left() [2/2]

const float & guWhiteboard::Odometry::left ( ) const
inline

Definition at line 178 of file Odometry.hpp.

References wb_odometry::left.

◆ operator!=() [1/2]

bool guWhiteboard::Odometry::operator!= ( const Odometry t_other) const
inline

Definition at line 143 of file Odometry.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::Odometry::operator!= ( const wb_odometry t_other) const
inline

Definition at line 153 of file Odometry.hpp.

◆ operator+()

Odometry guWhiteboard::Odometry::operator+ ( const Odometry a) const
inline

Definition at line 362 of file Odometry.hpp.

References forward(), left(), set_forward(), set_left(), set_turn(), and turn().

◆ operator-()

Odometry guWhiteboard::Odometry::operator- ( const Odometry a) const
inline

Definition at line 370 of file Odometry.hpp.

References forward(), left(), set_forward(), set_left(), set_turn(), and turn().

◆ operator=() [1/2]

Odometry & guWhiteboard::Odometry::operator= ( const Odometry t_other)
inline

Copy Assignment Operator.

Definition at line 123 of file Odometry.hpp.

References forward(), left(), and turn().

◆ operator=() [2/2]

Odometry & guWhiteboard::Odometry::operator= ( const struct wb_odometry t_other)
inline

Copy Assignment Operator.

Definition at line 131 of file Odometry.hpp.

References wb_odometry::forward, wb_odometry::left, and wb_odometry::turn.

◆ operator==() [1/2]

bool guWhiteboard::Odometry::operator== ( const Odometry t_other) const
inline

Definition at line 136 of file Odometry.hpp.

References forward(), left(), and turn().

◆ operator==() [2/2]

bool guWhiteboard::Odometry::operator== ( const wb_odometry t_other) const
inline

Definition at line 148 of file Odometry.hpp.

References Odometry().

◆ set_forward()

void guWhiteboard::Odometry::set_forward ( const float &  t_newValue)
inline

Definition at line 168 of file Odometry.hpp.

References wb_odometry::forward.

Referenced by clear(), from_string(), operator+(), and operator-().

◆ set_left()

void guWhiteboard::Odometry::set_left ( const float &  t_newValue)
inline

Definition at line 183 of file Odometry.hpp.

References wb_odometry::left.

Referenced by clear(), from_string(), operator+(), and operator-().

◆ set_turn()

void guWhiteboard::Odometry::set_turn ( const float &  t_newValue)
inline

Definition at line 198 of file Odometry.hpp.

References wb_odometry::turn.

Referenced by clear(), from_string(), operator+(), and operator-().

◆ to_string()

std::string guWhiteboard::Odometry::to_string ( )
inline

USE_WB_ODOMETRY_C_CONVERSION

Definition at line 229 of file Odometry.hpp.

References forward(), left(), ODOMETRY_TO_STRING_BUFFER_SIZE, turn(), and wb_odometry_to_string().

Referenced by guWhiteboard::NaoWalkStatus::to_string().

◆ turn() [1/2]

float & guWhiteboard::Odometry::turn ( )
inline

Definition at line 188 of file Odometry.hpp.

References wb_odometry::turn.

Referenced by Odometry(), description(), operator+(), operator-(), operator=(), operator==(), and to_string().

◆ turn() [2/2]

const float & guWhiteboard::Odometry::turn ( ) const
inline

Definition at line 193 of file Odometry.hpp.

References wb_odometry::turn.


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