LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
rcsc::VisualSensor Class Reference

player's parsed visual info holder More...

#include <visual_sensor.h>

Classes

struct  BallT
 seen ball info More...
 
struct  LineT
 seen line info More...
 
struct  MarkerT
 seen marker flag info More...
 
struct  MovableT
 seen movable object info More...
 
struct  PlayerT
 seen player info More...
 
struct  PolarT
 observable object info More...
 

Public Types

enum  ObjectType {
  Obj_Goal , Obj_Goal_Behind , Obj_Marker , Obj_Marker_Behind ,
  Obj_Line , Obj_Ball , Obj_Player , Obj_Unknown
}
 seen object type
 
enum  PlayerInfoType {
  Player_Teammate = 10 , Player_Unknown_Teammate = 11 , Player_Opponent = 20 , Player_Unknown_Opponent = 21 ,
  Player_Unknown = 30 , Player_Low_Mode , Player_Illegal
}
 seen player identification type
 
typedef std::unordered_map< std::string, MarkerIDMarkerMap
 
typedef std::vector< BallTBallCont
 observed ball container
 
typedef std::list< MarkerTMarkerCont
 observed marker container
 
typedef std::list< LineTLineCont
 observed line container
 
typedef std::list< PlayerTPlayerCont
 observed player container
 

Public Member Functions

 VisualSensor ()
 create marker map
 
void parse (const char *msg, const std::string &team_name, const double &version, const GameTime &current)
 analyze visual message and store analyzed data. More...
 
const std::string & theirTeamName () const
 get observed opponent team name More...
 
const GameTimetime () const
 get last updated time More...
 
const BallContballs () const
 get observed ball info More...
 
const MarkerContmarkers () const
 get observed marker(flag) info More...
 
const MarkerContbehindMarkers () const
 get observed behind marker(flag) info More...
 
const LineContlines () const
 get observed line info More...
 
const PlayerContteammates () const
 get observed teammate info More...
 
const PlayerContunknownTeammates () const
 get observed unknown teammate info More...
 
const PlayerContopponents () const
 get observed opponent info More...
 
const PlayerContunknownOpponents () const
 get observed unknown opponent info More...
 
const PlayerContunknownPlayers () const
 get observed completely unknown player info More...
 
std::ostream & print (std::ostream &os)
 put data to ostream More...
 

Static Public Attributes

static const double DIST_ERR
 error value
 
static const double DIR_ERR
 error value
 

Detailed Description

player's parsed visual info holder

Member Function Documentation

◆ balls()

const BallCont & rcsc::VisualSensor::balls ( ) const
inline

get observed ball info

Returns
const reference to the ball container

◆ behindMarkers()

const MarkerCont & rcsc::VisualSensor::behindMarkers ( ) const
inline

get observed behind marker(flag) info

Returns
const reference to the marker container

◆ lines()

const LineCont & rcsc::VisualSensor::lines ( ) const
inline

get observed line info

Returns
const reference to the line container

◆ markers()

const MarkerCont & rcsc::VisualSensor::markers ( ) const
inline

get observed marker(flag) info

Returns
const reference to the marker container

◆ opponents()

const PlayerCont & rcsc::VisualSensor::opponents ( ) const
inline

get observed opponent info

Returns
const reference to the player container

◆ parse()

void rcsc::VisualSensor::parse ( const char *  msg,
const std::string &  team_name,
const double &  version,
const GameTime current 
)

analyze visual message and store analyzed data.

Parameters
msgmessage string
team_nameour team name
versionrcssserver protocol version
currentreceived game time.

◆ print()

std::ostream & rcsc::VisualSensor::print ( std::ostream &  os)

put data to ostream

Parameters
osreference to the output stream
Returns
reference to the output stream

◆ teammates()

const PlayerCont & rcsc::VisualSensor::teammates ( ) const
inline

get observed teammate info

Returns
const reference to the player container

◆ theirTeamName()

const std::string & rcsc::VisualSensor::theirTeamName ( ) const
inline

get observed opponent team name

Returns
team name string

◆ time()

const GameTime & rcsc::VisualSensor::time ( ) const
inline

get last updated time

Returns
game time object

◆ unknownOpponents()

const PlayerCont & rcsc::VisualSensor::unknownOpponents ( ) const
inline

get observed unknown opponent info

Returns
const reference to the player container

◆ unknownPlayers()

const PlayerCont & rcsc::VisualSensor::unknownPlayers ( ) const
inline

get observed completely unknown player info

Returns
const reference to the player container

◆ unknownTeammates()

const PlayerCont & rcsc::VisualSensor::unknownTeammates ( ) const
inline

get observed unknown teammate info

Returns
const reference to the player container

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