gusimplewhiteboard
|
Class to post information about Robot posts detected from vision This class contains information the dimension of Robot posts. More...
#include <VisionRobots.hpp>
Public Member Functions | |
VisionRobots () | |
Default Constructor. More... | |
VisionRobots (std::string s) | |
String Constructor Converts a serialized string to a VisionRobot object. More... | |
void | from_string (std::string &s) |
void | setRobot (wb_robot robotInfo, VisionCamera camera) |
Add a the Robot to this VisionRobot message. More... | |
const wb_robot & | robots (VisionCamera camera, int idx) const |
Get the current Robots for this message. More... | |
wb_robot & | robots (VisionCamera camera, int idx) |
Get the current Robots 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... | |
Class to post information about Robot posts detected from vision This class contains information the dimension of Robot posts.
The message contains information for left and right Robot post on top and bottom camera's
Retrieve the current information about the Robots in the top camera
VisionRobot v = VisionRobot_t.get(); //get the Robot message off the whiteboard std::vector<wb_robot> r = v.robots(Top); //get the robots from the top camera if( !r.empty() ) { bool visible = r[0].visible(); //get the visibile flag for the robot int x1 = r[0].bottomLeft_X(); //get the bottom left x coordinate for the robot }
Definition at line 39 of file VisionRobots.hpp.
|
inline |
Default Constructor.
Definition at line 48 of file VisionRobots.hpp.
|
inline |
String Constructor Converts a serialized string to a VisionRobot object.
s | The String to convert |
Definition at line 56 of file VisionRobots.hpp.
References from_string().
|
inline |
Converts this message into a serialized string.
Definition at line 181 of file VisionRobots.hpp.
|
inline |
Get the frame number the information in this message was observed.
Definition at line 173 of file VisionRobots.hpp.
|
inline |
Definition at line 60 of file VisionRobots.hpp.
References Bottom, setRobot(), and Top.
Referenced by VisionRobots().
|
inline |
Reset the visible flag for all four different posts to false.
Definition at line 149 of file VisionRobots.hpp.
References BOTTOMLIMIT, and TOPLIMIT.
|
inline |
Get the current Robots for this message.
camera | The camera to get Robot post information from |
idx | The index of the robot (must be between 0 and TOP or BOTTOMLIMIT) |
Definition at line 132 of file VisionRobots.hpp.
References BOTTOMLIMIT, Top, and TOPLIMIT.
|
inline |
Get the current Robots for this message.
camera | The camera to get Robot post information from |
idx | The index of the robot (must be between 0 and TOP or BOTTOMLIMIT) |
Definition at line 112 of file VisionRobots.hpp.
References BOTTOMLIMIT, Top, and TOPLIMIT.
|
inline |
Sets the frame number this information in this message was observed.
fn | The frame number |
Definition at line 165 of file VisionRobots.hpp.
|
inline |
Add a the Robot to this VisionRobot message.
robotInfo | The post information to be set |
camera | The camera this post was seen on |
Definition at line 95 of file VisionRobots.hpp.
References BOTTOMLIMIT, Top, and TOPLIMIT.
Referenced by from_string().