Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
net_thread.cpp
1 
2 /***************************************************************************
3  * net_thread.cpp - Fawkes WorldModel Plugin Network Thread
4  *
5  * Created: Fri Jun 29 16:56:15 2007 (on flight to RoboCup 2007, Atlanta)
6  * Copyright 2006-2009 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #include "net_thread.h"
24 
25 #include <netcomm/worldinfo/transceiver.h>
26 #include <interfaces/ObjectPositionInterface.h>
27 #include <interfaces/GameStateInterface.h>
28 
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 #include <cstdio>
33 #include <unistd.h>
34 
35 using namespace std;
36 using namespace fawkes;
37 
38 /** @class WorldModelNetworkThread "net_thread.h"
39  * Network thread of worldmodel plugin.
40  * @author Tim Niemueller
41  */
42 
43 /** Constructor.
44  */
46  : Thread("WorldModelNetworkThread", Thread::OPMODE_CONTINUOUS)
47 {
48  __worldinfo_transceiver = NULL;
50  __opponent_id = 0;
51 }
52 
53 
54 /** Destructor. */
56 {
57 }
58 
59 
60 void
62 {
63  std::string multicast_addr;
64  unsigned int port;
65  std::string encryption_key;
66  std::string encryption_iv;
67  bool cfg_multicast_loopback;
68  try {
69  multicast_addr = config->get_string("/worldinfo/multicast_addr");
70  port = config->get_uint("/worldinfo/udp_port");
71  encryption_key = config->get_string("/worldinfo/encryption_key");
72  encryption_iv = config->get_string("/worldinfo/encryption_iv");
73  __cfg_sleep_time_msec = config->get_uint("/worldinfo/sleep_time_msec");
74  __cfg_max_msgs_per_recv = config->get_uint("/worldinfo/max_msgs_per_recv");
75  __cfg_flush_time_sec = config->get_uint("/worldinfo/flush_time_sec");
76  cfg_multicast_loopback = config->get_bool("/worldinfo/multicast_loopback");
77  } catch (Exception &e) {
78  e.append("Could not get required configuration data for worldmodel");
79  e.print_trace();
80  throw;
81  }
82 
83  __worldinfo_transceiver = new WorldInfoTransceiver(WorldInfoTransceiver::MULTICAST,
84  multicast_addr.c_str(), port,
85  encryption_key.c_str(), encryption_iv.c_str(),
86  nnresolver);
87 
88  __worldinfo_transceiver->add_handler(this);
89  __worldinfo_transceiver->set_loop(cfg_multicast_loopback);
90 
91  try {
92  __gamestate_if = blackboard->open_for_writing<GameStateInterface>("WI GameState");
93  } catch (Exception &e) {
94  delete __worldinfo_transceiver;
95  e.print_trace();
96  throw;
97  }
98 }
99 
100 
101 void
103 {
104  // close all WI pose interfaces
105  for (LockMap<string, ObjectPositionInterface*>::iterator i = __pose_ifs.begin();
106  i != __pose_ifs.end();
107  ++i) {
108  blackboard->close(i->second);
109  }
110 
111  // close all WI ball interfaces
112  for (LockMap<string, ObjectPositionInterface*>::iterator i = __ball_ifs.begin();
113  i != __ball_ifs.end();
114  ++i) {
115  blackboard->close(i->second);
116  }
117 
118  // close all WI opponent interfaces
119  for (LockMap<string, UidTimeObjPosMap>::iterator i = __opponent_ifs.begin();
120  i != __opponent_ifs.end();
121  ++i) {
122  for (UidTimeObjPosMap::iterator j = i->second.begin();
123  j != i->second.end();
124  ++j) {
125  blackboard->close(j->second.second);
126  }
127  }
128 
129  blackboard->close(__gamestate_if);
130  delete __worldinfo_transceiver;
131 }
132 
133 
134 void
136 {
137  __worldinfo_transceiver->flush_sequence_numbers(__cfg_flush_time_sec);
138  __worldinfo_transceiver->recv(false, __cfg_max_msgs_per_recv);
139  usleep( __cfg_sleep_time_msec * 1000 );
140  // check for dead ones
141  std::map<std::string, fawkes::Time>::iterator lsi = __last_seen.begin();
142  Time now;
143  __last_seen.lock();
144  while (lsi != __last_seen.end()) {
145  if (now - &lsi->second > 3.0) {
146  logger->log_info("WorldModelNetworkThread", "Expiring host %s", lsi->first.c_str());
147  // this is is as dead as the chair I'm sitting on
148  __pose_ifs.lock();
149  if (__pose_ifs.find(lsi->first) != __pose_ifs.end()) {
150  blackboard->close(__pose_ifs[lsi->first]);
151  __pose_ifs.erase(lsi->first);
152  }
153  __pose_ifs.unlock();
154  __ball_ifs.lock();
155  if (__ball_ifs.find(lsi->first) != __ball_ifs.end()) {
156  blackboard->close(__ball_ifs[lsi->first]);
157  __ball_ifs.erase(lsi->first);
158  }
159  __ball_ifs.unlock();
160  __opponent_ifs.lock();
161  if (__opponent_ifs.find(lsi->first) != __opponent_ifs.end()) {
162  std::map<unsigned int, std::pair<Time, ObjectPositionInterface *> >::iterator i;
163  for (i = __opponent_ifs[lsi->first].begin(); i != __opponent_ifs[lsi->first].end(); ++i) {
164  blackboard->close(i->second.second);
165  }
166  __opponent_ifs.erase(lsi->first);
167  }
168  __opponent_ifs.unlock();
169  std::map<std::string, fawkes::Time>::iterator tmp = lsi;
170  ++lsi;
171  __last_seen.erase(tmp);
172  } else {
173  ++lsi;
174  }
175  }
176  __last_seen.unlock();
177 
178  __opponent_ifs.lock();
179  std::map<std::string, UidTimeObjPosMap>::iterator o = __opponent_ifs.begin();
180  while (o != __opponent_ifs.end()) {
181  UidTimeObjPosMap::iterator top = o->second.begin();
182  while (top != o->second.end()) {
183  if (now - &(top->second.first) > 3.0) {
184  logger->log_info("WorldModelNetworkThread", "Expiring Opponent %s:%u", o->first.c_str(), top->first);
185  blackboard->close(top->second.second);
186  UidTimeObjPosMap::iterator tmp = top;
187  ++top;
188  o->second.erase(tmp);
189  } else {
190  ++top;
191  }
192  }
193  if (o->second.empty()) {
194  std::map<std::string, UidTimeObjPosMap>::iterator tmp = o;
195  ++o;
196  __opponent_ifs.erase(tmp);
197  } else {
198  ++o;
199  }
200  }
201  __opponent_ifs.unlock();
202 
203 }
204 
205 
206 /** Access the WI transceiver.
207  * @return pointer to the WI transceiver
208  */
211 {
212  return __worldinfo_transceiver;
213 }
214 
215 
216 void
218  float x, float y, float theta,
219  float *covariance)
220 {
221  __pose_ifs.lock();
222  if (__pose_ifs.find(from_host) == __pose_ifs.end()) {
223  try {
224  std::string id = std::string("WI RoboPos ") + from_host;
225  __pose_ifs[from_host] = blackboard->open_for_writing<ObjectPositionInterface>(id.c_str());
226  } catch (Exception &e) {
227  logger->log_warn("WorldModelNetworkThread", "Failed to create ObjectPositionInterface "
228  "for pose of %s, exception follows", from_host);
229  logger->log_warn("WorldModelNetworkThread", e);
230  return;
231  }
232  }
233 
234  // Pose is our aliveness indicator
235  __last_seen.lock();
236  __last_seen[from_host].stamp();
237  __last_seen.unlock();
238 
239  ObjectPositionInterface *iface = __pose_ifs[from_host];
240  iface->set_world_x(x);
241  iface->set_world_y(y);
242  iface->set_world_z(theta);
243  iface->set_world_xyz_covariance(covariance);
244  iface->write();
245  __pose_ifs.unlock();
246 }
247 
248 
249 void
250 WorldModelNetworkThread::velocity_rcvd(const char *from_host, float vel_x,
251  float vel_y, float vel_theta, float *covariance)
252 {
253  // TODO
254 }
255 
256 
257 void
259  bool visible, int visibility_history,
260  float dist, float bearing, float slope,
261  float *covariance)
262 {
263  __ball_ifs.lock();
264  if (__ball_ifs.find(from_host) == __ball_ifs.end()) {
265  try {
266  std::string id = std::string("WI BPos ") + from_host;
267  __ball_ifs[from_host] = blackboard->open_for_writing<ObjectPositionInterface>(id.c_str());
268  } catch (Exception &e) {
269  logger->log_warn("WorldModelNetworkThread", "Failed to create ObjectPositionInterface "
270  "for ball pos of %s, exception follows", from_host);
271  logger->log_warn("WorldModelNetworkThread", e);
272  return;
273  }
274  }
275 
276  ObjectPositionInterface *iface = __ball_ifs[from_host];
277  iface->set_flags( iface->flags() |
278  ObjectPositionInterface::TYPE_BALL |
279  ObjectPositionInterface::FLAG_HAS_RELATIVE_POLAR |
280  ObjectPositionInterface::FLAG_HAS_COVARIANCES );
281  iface->set_visible(visible);
282  iface->set_visibility_history(visibility_history);
283  iface->set_distance(dist);
284  iface->set_bearing(bearing);
285  iface->set_slope(slope);
286  iface->set_dbs_covariance(covariance);
287  iface->write();
288  __ball_ifs.unlock();
289 }
290 
291 
292 void
294  bool visible, int visibility_history,
295  float x, float y, float z,
296  float *covariance)
297 {
298  __ball_ifs.lock();
299  if (__ball_ifs.find(from_host) == __ball_ifs.end()) {
300  try {
301  std::string id = std::string("WI BPos ") + from_host;
302  __ball_ifs[from_host] = blackboard->open_for_writing<ObjectPositionInterface>(id.c_str());
303  } catch (Exception &e) {
304  logger->log_warn("WorldModelNetworkThread", "Failed to create ObjectPositionInterface "
305  "for ball pos of %s, exception follows", from_host);
306  logger->log_warn("WorldModelNetworkThread", e);
307  return;
308  }
309  }
310 
311  ObjectPositionInterface *iface = __ball_ifs[from_host];
312  iface->set_flags( iface->flags() |
313  ObjectPositionInterface::TYPE_BALL |
314  ObjectPositionInterface::FLAG_HAS_WORLD |
315  ObjectPositionInterface::FLAG_HAS_Z_AS_ORI |
316  ObjectPositionInterface::FLAG_HAS_COVARIANCES );
317  iface->set_visible(visible);
318  iface->set_visibility_history(visibility_history);
319  iface->set_world_x(x);
320  iface->set_world_y(y);
321  iface->set_world_z(z);
322  iface->set_world_xyz_covariance(covariance);
323  iface->write();
324  __ball_ifs.unlock();
325 }
326 
327 
328 void
330  float vel_x, float vel_y, float vel_z,
331  float *covariance)
332 {
333  // TODO
334 }
335 
336 
337 void
339  float vel_x, float vel_y, float vel_z,
340  float *covariance)
341 {
342  // TODO
343 }
344 
345 
346 void
348  unsigned int uid,
349  float distance, float bearing,
350  float *covariance)
351 {
352  __opponent_ifs.lock();
353  std::map<std::string, std::map<unsigned int, std::pair<Time, ObjectPositionInterface *> > >::iterator f;
354 
355  bool iface_exists = true;
356  if ( ((f = __opponent_ifs.find(from_host)) == __opponent_ifs.end()) ||
357  (f->second.find(uid) == f->second.end()) ) {
358 
359  char *tmp;
360  if (asprintf(&tmp, "WI Opp %u %s", ++__opponent_id, from_host) != -1) {
361  try {
362  std::string id = tmp;
363  free(tmp);
364  logger->log_debug("WorldModelNetworkThread", "Opening new interface for %s:%u", from_host, uid);
365  __opponent_ifs[from_host][uid] = make_pair(Time(), blackboard->open_for_writing<ObjectPositionInterface>(id.c_str()));
366  } catch (Exception &e) {
367  logger->log_warn("WorldModelNetworkThread", "Failed to create ObjectPositionInterface "
368  "for opponent %s:%u, exception follows", from_host, uid);
369  logger->log_warn("WorldModelNetworkThread", e);
370  iface_exists = false;
371  }
372  } else {
373  logger->log_error("WorldModelNetworkThread", "Could not create interface ID string, out of memory during asprintf().");
374  iface_exists = false;
375  }
376  }
377 
378  if (iface_exists) {
379  logger->log_debug("WorldModelNetworkThread", "Setting opponent %s:%u", from_host, uid);
380  ObjectPositionInterface *iface = __opponent_ifs[from_host][uid].second;
381  iface->set_distance(distance);
382  iface->set_bearing(bearing);
383  iface->set_dbs_covariance(covariance);
384  iface->write();
385 
386  __opponent_ifs[from_host][uid].first.stamp();
387  } else {
388  logger->log_warn("WorldModelNetworkThread", "Opponent pose interface does not exist, ignoring");
389  }
390  __opponent_ifs.unlock();
391 }
392 
393 
394 void
395 WorldModelNetworkThread::opponent_disapp_rcvd(const char *from_host, unsigned int uid)
396 {
397  __opponent_ifs.lock();
398  std::map<std::string, std::map<unsigned int, std::pair<Time, ObjectPositionInterface *> > >::iterator f;
399  if ( ((f = __opponent_ifs.find(from_host)) != __opponent_ifs.end()) &&
400  (f->second.find(uid) != f->second.end()) ) {
401  blackboard->close(f->second[uid].second);
402  f->second.erase(uid);
403  }
404  __opponent_ifs.unlock();
405 }
406 
407 
408 void
410  unsigned int game_state,
412  unsigned int score_cyan, unsigned int score_magenta,
416 {
417  logger->log_debug("WorldModelNetworkThread", "Received Gamestate %i from %s, state team %i, score %u:%u, our team: %i, our goal: %i, half: %i",
418  game_state, from_host, state_team, score_magenta, our_team, our_goal_color, half);
419  switch (game_state) {
420  case GS_FROZEN:
421  __gamestate_if->set_game_state(GameStateInterface::GS_FROZEN); break;
422  case GS_PLAY:
423  __gamestate_if->set_game_state(GameStateInterface::GS_PLAY); break;
424  case GS_KICK_OFF:
425  __gamestate_if->set_game_state(GameStateInterface::GS_KICK_OFF); break;
426  case GS_DROP_BALL:
427  __gamestate_if->set_game_state(GameStateInterface::GS_DROP_BALL); break;
428  case GS_PENALTY:
429  __gamestate_if->set_game_state(GameStateInterface::GS_PENALTY); break;
430  case GS_CORNER_KICK:
431  __gamestate_if->set_game_state(GameStateInterface::GS_CORNER_KICK); break;
432  case GS_THROW_IN:
433  __gamestate_if->set_game_state(GameStateInterface::GS_THROW_IN); break;
434  case GS_FREE_KICK:
435  __gamestate_if->set_game_state(GameStateInterface::GS_FREE_KICK); break;
436  case GS_GOAL_KICK:
437  __gamestate_if->set_game_state(GameStateInterface::GS_GOAL_KICK); break;
438  case GS_HALF_TIME:
439  __gamestate_if->set_game_state(GameStateInterface::GS_HALF_TIME); break;
440  }
441 
442  switch (state_team) {
443  case TEAM_NONE:
444  __gamestate_if->set_state_team(GameStateInterface::TEAM_NONE); break;
445  case TEAM_CYAN:
446  __gamestate_if->set_state_team(GameStateInterface::TEAM_CYAN); break;
447  case TEAM_MAGENTA:
448  __gamestate_if->set_state_team(GameStateInterface::TEAM_MAGENTA); break;
449  case TEAM_BOTH:
450  __gamestate_if->set_state_team(GameStateInterface::TEAM_BOTH); break;
451  }
452 
453  switch (our_team) {
454  case TEAM_NONE:
455  __gamestate_if->set_our_team(GameStateInterface::TEAM_NONE); break;
456  case TEAM_CYAN:
457  __gamestate_if->set_our_team(GameStateInterface::TEAM_CYAN); break;
458  case TEAM_MAGENTA:
459  __gamestate_if->set_our_team(GameStateInterface::TEAM_MAGENTA); break;
460  case TEAM_BOTH:
461  __gamestate_if->set_our_team(GameStateInterface::TEAM_BOTH); break;
462  }
463 
464  switch (our_goal_color) {
465  case GOAL_BLUE:
466  __gamestate_if->set_our_goal_color(GameStateInterface::GOAL_BLUE); break;
467  case GOAL_YELLOW:
468  __gamestate_if->set_our_goal_color(GameStateInterface::GOAL_YELLOW); break;
469  }
470 
471  switch (half) {
472  case HALF_FIRST:
473  __gamestate_if->set_half(GameStateInterface::HALF_FIRST); break;
474  case HALF_SECOND:
475  __gamestate_if->set_half(GameStateInterface::HALF_SECOND); break;
476  }
477 
478  __gamestate_if->set_score_cyan(score_cyan);
479  __gamestate_if->set_score_magenta(score_magenta);
480 
481  __gamestate_if->write();
482 }
483 
484 
485 void
487  unsigned int player, unsigned int penalty,
488  unsigned int seconds_remaining)
489 {
490  // TBD
491 }
492 
virtual void ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float dist, float bearing, float slope, float *covariance)
Ball position information received.
Definition: net_thread.cpp:258
Kick off.
Definition: enums.h:33
virtual void init()
Initialize the thread.
Definition: net_thread.cpp:61
Blue goal.
Definition: enums.h:64
Goal kick.
Definition: enums.h:39
void set_game_state(const uint32_t new_game_state)
Set game_state value.
Class to send and receive world information.
Definition: transceiver.h:52
virtual void log_info(const char *component, const char *format,...)=0
Log informational message.
void set_score_cyan(const uint32_t new_score_cyan)
Set score_cyan value.
ObjectPositionInterface Fawkes BlackBoard Interface.
Referee drops ball, both teams can wrestle for the ball.
Definition: enums.h:34
void set_our_goal_color(const if_gamestate_goalcolor_t new_our_goal_color)
Set our_goal_color value.
void unlock() const
Unlock list.
Definition: lock_map.h:120
No team, not team-specific.
Definition: enums.h:55
Throw in.
Definition: enums.h:37
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
void set_world_z(const float new_world_z)
Set world_z value.
void set_state_team(const if_gamestate_team_t new_state_team)
Set state_team value.
void set_flags(const uint32_t new_flags)
Set flags value.
uint32_t flags() const
Get flags value.
A class for handling time.
Definition: time.h:91
void set_distance(const float new_distance)
Set distance value.
Yellow goal.
Definition: enums.h:65
Thread class encapsulation of pthreads.
Definition: thread.h:42
void set_prepfin_conc_loop(bool concurrent=true)
Set concurrent execution of prepare_finalize() and loop().
Definition: thread.cpp:715
void write()
Write from local copy into BlackBoard memory.
Definition: interface.cpp:495
Logger * logger
This is the Logger member used to access the logger.
Definition: logging.h:44
virtual void opponent_pose_rcvd(const char *from_host, unsigned int uid, float distance, float bearing, float *covariance)
Opponent information received.
Definition: net_thread.cpp:347
virtual Interface * open_for_writing(const char *interface_type, const char *identifier)=0
Open interface for writing.
Magenta team.
Definition: enums.h:57
Play, normal play.
Definition: enums.h:32
Map with a lock.
Definition: lock_map.h:37
virtual void global_ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float x, float y, float z, float *covariance)
Global ball position information received.
Definition: net_thread.cpp:293
First half.
Definition: enums.h:71
worldinfo_gamestate_half_t
Game time half.
Definition: enums.h:70
fawkes::WorldInfoTransceiver * get_transceiver()
Access the WI transceiver.
Definition: net_thread.cpp:210
virtual void loop()
Code to execute in the thread.
Definition: net_thread.cpp:135
virtual void global_ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
Ball velocity information received.
Definition: net_thread.cpp:338
void set_visibility_history(const int32_t new_visibility_history)
Set visibility_history value.
Base class for exceptions in Fawkes.
Definition: exception.h:36
void lock() const
Lock list.
Definition: lock_map.h:100
Both teams.
Definition: enums.h:58
Frozen, nothing moves.
Definition: enums.h:31
void set_loop(bool loop)
Set loopback of sent packets.
void set_dbs_covariance(unsigned int index, const float new_dbs_covariance)
Set dbs_covariance value at given index.
virtual void gamestate_rcvd(const char *from_host, unsigned int game_state, fawkes::worldinfo_gamestate_team_t state_team, unsigned int score_cyan, unsigned int score_magenta, fawkes::worldinfo_gamestate_team_t our_team, fawkes::worldinfo_gamestate_goalcolor_t our_goal_color, fawkes::worldinfo_gamestate_half_t half)
Gamestate information received.
Definition: net_thread.cpp:409
NetworkNameResolver * nnresolver
Network name resolver to lookup IP addresses of hostnames and vice versa.
Definition: network.h:48
void recv(bool block=false, unsigned int max_num_msgs=0)
Receive information.
virtual void log_warn(const char *component, const char *format,...)=0
Log warning message.
Second half.
Definition: enums.h:72
virtual void log_error(const char *component, const char *format,...)=0
Log error message.
void set_visible(const bool new_visible)
Set visible value.
void set_bearing(const float new_bearing)
Set bearing value.
Penalty kick.
Definition: enums.h:35
void flush_sequence_numbers(unsigned int sec)
Flush sequence numbers conditionally.
void print_trace()
Prints trace to stderr.
Definition: exception.cpp:619
void set_slope(const float new_slope)
Set slope value.
virtual void pose_rcvd(const char *from_host, float x, float y, float theta, float *covariance)
Pose information received.
Definition: net_thread.cpp:217
void set_world_x(const float new_world_x)
Set world_x value.
Half time.
Definition: enums.h:40
Cyan team.
Definition: enums.h:56
WorldModelNetworkThread()
Constructor.
Definition: net_thread.cpp:45
virtual void log_debug(const char *component, const char *format,...)=0
Log debug message.
worldinfo_gamestate_team_t
Team.
Definition: enums.h:54
virtual void finalize()
Finalize the thread.
Definition: net_thread.cpp:102
virtual void ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
Ball velocity information received.
Definition: net_thread.cpp:329
GameStateInterface Fawkes BlackBoard Interface.
void add_handler(WorldInfoHandler *h)
Add a handler for world information.
void set_world_xyz_covariance(unsigned int index, const float new_world_xyz_covariance)
Set world_xyz_covariance value at given index.
virtual unsigned int get_uint(const char *path)=0
Get value from configuration which is of type unsigned int.
void set_score_magenta(const uint32_t new_score_magenta)
Set score_magenta value.
virtual void opponent_disapp_rcvd(const char *from_host, unsigned int uid)
Opponent disappeared.
Definition: net_thread.cpp:395
Free kick.
Definition: enums.h:38
Configuration * config
This is the Configuration member used to access the configuration.
Definition: configurable.h:44
worldinfo_gamestate_goalcolor_t
Goal color.
Definition: enums.h:63
Corner kick.
Definition: enums.h:36
virtual void penalty_rcvd(const char *from_host, unsigned int player, unsigned int penalty, unsigned int seconds_remaining)
Penalty info received.
Definition: net_thread.cpp:486
void append(const char *format,...)
Append messages to the message list.
Definition: exception.cpp:341
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.
void set_half(const if_gamestate_half_t new_half)
Set half value.
virtual ~WorldModelNetworkThread()
Destructor.
Definition: net_thread.cpp:55
BlackBoard * blackboard
This is the BlackBoard instance you can use to interact with the BlackBoard.
Definition: blackboard.h:43
void set_our_team(const if_gamestate_team_t new_our_team)
Set our_team value.
virtual void velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_theta, float *covariance)
Robot velocity information received.
Definition: net_thread.cpp:250
void set_world_y(const float new_world_y)
Set world_y value.
virtual void close(Interface *interface)=0
Close interface.