23 #ifndef __PLUGINS_WORLDMODEL_NET_THREAD_H_ 24 #define __PLUGINS_WORLDMODEL_NET_THREAD_H_ 26 #include <core/threading/thread.h> 27 #include <aspect/blackboard.h> 28 #include <aspect/logging.h> 29 #include <aspect/configurable.h> 30 #include <aspect/clock.h> 31 #include <aspect/network.h> 32 #include <netcomm/worldinfo/handler.h> 33 #include <core/utils/lock_map.h> 40 class WorldInfoTransceiver;
41 class ObjectPositionInterface;
42 class GameStateInterface;
60 virtual void finalize();
65 virtual void pose_rcvd(
const char *from_host,
66 float x,
float y,
float theta,
69 virtual void velocity_rcvd(
const char *from_host,
float vel_x,
70 float vel_y,
float vel_theta,
float *covariance);
72 virtual void ball_pos_rcvd(
const char *from_host,
73 bool visible,
int visibility_history,
74 float dist,
float bearing,
float slope,
77 virtual void global_ball_pos_rcvd(
const char *from_host,
78 bool visible,
int visibility_history,
79 float x,
float y,
float z,
82 virtual void ball_velocity_rcvd(
const char *from_host,
83 float vel_x,
float vel_y,
float vel_z,
86 virtual void global_ball_velocity_rcvd(
const char *from_host,
87 float vel_x,
float vel_y,
float vel_z,
90 virtual void opponent_pose_rcvd(
const char *from_host,
95 virtual void opponent_disapp_rcvd(
const char *from_host,
unsigned int uid);
97 virtual void gamestate_rcvd(
const char *from_host,
98 unsigned int game_state,
100 unsigned int score_cyan,
unsigned int score_magenta,
105 virtual void penalty_rcvd(
const char *from_host,
106 unsigned int player,
unsigned int penalty,
107 unsigned int seconds_remaining);
112 unsigned int __cfg_sleep_time_msec;
113 unsigned int __cfg_max_msgs_per_recv;
114 unsigned int __cfg_flush_time_sec;
115 bool __cfg_multicast_loopback;
117 typedef std::pair<fawkes::Time, fawkes::ObjectPositionInterface *> TimeObjPosPair;
118 typedef std::map<unsigned int, TimeObjPosPair> UidTimeObjPosMap;
127 unsigned int __opponent_id;
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
Class to send and receive world information.
float distance(float x1, float y1, float x2, float y2)
Get distance between two 2D cartesian coordinates.
Fawkes library namespace.
Thread aspect for network communication.
Thread class encapsulation of pthreads.
worldinfo_gamestate_half_t
Game time half.
Thread aspect to log output.
Thread aspect to access configuration data.
worldinfo_gamestate_team_t
Team.
GameStateInterface Fawkes BlackBoard Interface.
Network thread of worldmodel plugin.
worldinfo_gamestate_goalcolor_t
Goal color.