gusimplewhiteboard
guWhiteboard::VisionGoals Class Reference

Class to post information about goal posts detected from vision This class contains information the dimension of goal posts. More...

#include <VisionGoals.hpp>

Collaboration diagram for guWhiteboard::VisionGoals:

Public Member Functions

 VisionGoals ()
 Default Constructor. More...
 
 VisionGoals (std::string s)
 String Constructor Converts a serialized string to a VisionGoal object. More...
 
void from_string (std::string &s)
 
void setLeftGoalPost (wb_goal postInfo, VisionCamera camera)
 Set the left goal post for this VisionGoal message. More...
 
void setRightGoalPost (wb_goal postInfo, VisionCamera camera)
 Set the right goal post for this VisionGoal message. More...
 
void setGenericGoalPost (wb_goal postInfo, VisionCamera camera)
 Set the generic goal post for this VisionGoal message. More...
 
const wb_goalleftPost (VisionCamera camera) const
 Get the current left goal post for this message. More...
 
const wb_goalrightPost (VisionCamera camera) const
 Get the current right goal post for this message. More...
 
const wb_goalgenericPost (VisionCamera camera) const
 Get the current generic goal post for this message. More...
 
wb_goalleftPost (VisionCamera camera)
 Get the current left goal post for this message. More...
 
wb_goalrightPost (VisionCamera camera)
 Get the current right goal post for this message. More...
 
wb_goalgenericPost (VisionCamera camera)
 Get the current generic goal post for this message. More...
 
void Reset ()
 Reset the visible flag for all four different posts to false. More...
 
void setFrameNumber (size_t fn)
 Sets the frame number this information in this message was observed. More...
 
size_t frameNumber () const
 Get the frame number the information in this message was observed. More...
 
std::string description ()
 Converts this message into a serialized string. More...
 

Detailed Description

Class to post information about goal posts detected from vision This class contains information the dimension of goal posts.

The message contains information for left and right goal post on top and bottom camera's

Examples

Retrieve the current information about the a left goal post in the top camera

VisionGaols v = VisionGaols_t.get(); //get the goal message off the whiteboard
wb_goal g = v.leftPost(Top); //get the left post from the top camera
bool visible = g.visible(); //get the visibile flag for the post
int x1 = g.outerBottom_X(); //get the outer bottom x coordinate for the post

Definition at line 36 of file VisionGoals.hpp.

Constructor & Destructor Documentation

◆ VisionGoals() [1/2]

guWhiteboard::VisionGoals::VisionGoals ( )
inline

Default Constructor.

Definition at line 47 of file VisionGoals.hpp.

◆ VisionGoals() [2/2]

guWhiteboard::VisionGoals::VisionGoals ( std::string  s)
inline

String Constructor Converts a serialized string to a VisionGoal object.

Parameters
sThe String to convert

Definition at line 55 of file VisionGoals.hpp.

References from_string().

Member Function Documentation

◆ description()

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

Converts this message into a serialized string.

Returns
The serialized string

Definition at line 296 of file VisionGoals.hpp.

◆ frameNumber()

size_t guWhiteboard::VisionGoals::frameNumber ( ) const
inline

Get the frame number the information in this message was observed.

Returns
The frame number

Definition at line 288 of file VisionGoals.hpp.

◆ from_string()

void guWhiteboard::VisionGoals::from_string ( std::string &  s)
inline

Definition at line 59 of file VisionGoals.hpp.

References Bottom, setLeftGoalPost(), setRightGoalPost(), and Top.

Referenced by VisionGoals().

◆ genericPost() [1/2]

wb_goal & guWhiteboard::VisionGoals::genericPost ( VisionCamera  camera)
inline

Get the current generic goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 256 of file VisionGoals.hpp.

References Top.

◆ genericPost() [2/2]

const wb_goal & guWhiteboard::VisionGoals::genericPost ( VisionCamera  camera) const
inline

Get the current generic goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 217 of file VisionGoals.hpp.

References Top.

◆ leftPost() [1/2]

wb_goal & guWhiteboard::VisionGoals::leftPost ( VisionCamera  camera)
inline

Get the current left goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 230 of file VisionGoals.hpp.

References Top.

◆ leftPost() [2/2]

const wb_goal & guWhiteboard::VisionGoals::leftPost ( VisionCamera  camera) const
inline

Get the current left goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 191 of file VisionGoals.hpp.

References Top.

◆ Reset()

void guWhiteboard::VisionGoals::Reset ( )
inline

Reset the visible flag for all four different posts to false.

Definition at line 267 of file VisionGoals.hpp.

◆ rightPost() [1/2]

wb_goal & guWhiteboard::VisionGoals::rightPost ( VisionCamera  camera)
inline

Get the current right goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 243 of file VisionGoals.hpp.

References Top.

◆ rightPost() [2/2]

const wb_goal & guWhiteboard::VisionGoals::rightPost ( VisionCamera  camera) const
inline

Get the current right goal post for this message.

Parameters
cameraThe camera to get goal post information from
Returns
The goal post information.

Definition at line 204 of file VisionGoals.hpp.

References Top.

◆ setFrameNumber()

void guWhiteboard::VisionGoals::setFrameNumber ( size_t  fn)
inline

Sets the frame number this information in this message was observed.

Parameters
fnThe frame number

Definition at line 280 of file VisionGoals.hpp.

◆ setGenericGoalPost()

void guWhiteboard::VisionGoals::setGenericGoalPost ( wb_goal  postInfo,
VisionCamera  camera 
)
inline

Set the generic goal post for this VisionGoal message.

Parameters
postInfoThe post information to be set
cameraThe camera this post was seen on

Definition at line 175 of file VisionGoals.hpp.

References Top.

◆ setLeftGoalPost()

void guWhiteboard::VisionGoals::setLeftGoalPost ( wb_goal  postInfo,
VisionCamera  camera 
)
inline

Set the left goal post for this VisionGoal message.

Parameters
postInfoThe post information to be set
cameraThe camera this post was seen on

Definition at line 143 of file VisionGoals.hpp.

References Top.

Referenced by from_string().

◆ setRightGoalPost()

void guWhiteboard::VisionGoals::setRightGoalPost ( wb_goal  postInfo,
VisionCamera  camera 
)
inline

Set the right goal post for this VisionGoal message.

Parameters
postInfoThe post information to be set
cameraThe camera this post was seen on

Definition at line 159 of file VisionGoals.hpp.

References Top.

Referenced by from_string().


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