Fawkes API  Fawkes Development Version
handler.cpp
1 
2 /***************************************************************************
3  * handler.cpp - World Info Handler
4  *
5  * Created: Sun Jan 21 15:57:22 2007
6  * Copyright 2006-2007 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. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #include <netcomm/worldinfo/handler.h>
25 
26 namespace fawkes {
27 
28 /** @class WorldInfoHandler handler.h <netcomm/worldinfo/handler.h>
29  * World info handler.
30  * This interface defines methods called by WorldInfoTransceiver for incoming
31  * information.
32  *
33  * @ingroup NetComm
34  * @author Tim Niemueller
35  *
36  *
37  * @fn void WorldInfoHandler::pose_rcvd(const char *from_host, float x, float y, float theta, float *covariance)
38  * Pose information received.
39  * @param from_host transmitting host of this information, if available symbolic name
40  * @param x x position
41  * @param y y position
42  * @param theta rotation of the robot
43  * @param covariance covariance matrix, line-wise float array
44  *
45  * @fn void WorldInfoHandler::velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_theta, float *covariance)
46  * Robot velocity information received.
47  * @param from_host transmitting host of this information, if available symbolic name
48  * @param vel_x velocity in x direction
49  * @param vel_y velocity in y direction
50  * @param vel_theta rotational velocity, positive velocity means clockwise
51  * rotation, negative velocity means counter-clockwise.
52  * @param covariance covariance matrix with 9 entries, ordered as three concatenated
53  * rows (first row, three floats, second row, three floats, third row, three
54  * floats).
55  * @see WorldInfoTransceiver::set_velocity()
56  *
57  * @fn void WorldInfoHandler::ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float dist, float bearing, float slope, float *covariance)
58  * Ball position information received.
59  * @param from_host transmitting host of this information, if available symbolic name
60  * @param visible true if ball is visible, false otherwise. If the ball is not visible
61  * the given position is the last known position and may be invalid. Use visibility history
62  * to decide whether you expect useful data.
63  * @param visibility_history Ball visibility history.
64  * @param dist distance to ball in meters
65  * @param bearing bearing angle to ball
66  * @param slope slope angle to ball
67  * @param covariance covariance matrix with 9 entries, ordered as three concatenated
68  * rows (first row, three floats, second row, three floats, third row, three
69  * floats).
70  * @see WorldInfoTransceiver::set_ball_pos()
71  * @see WorldInfoTransceiver::set_ball_visible()
72  *
73  * @fn void WorldInfoHandler::global_ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float x, float y, float z, float *covariance)
74  * Global ball position information received.
75  * @param from_host transmitting host of this information, if available symbolic name
76  * @param visible true if ball is visible, false otherwise. If the ball is not visible
77  * the given position is the last known position and may be invalid. Use visibility history
78  * to decide whether you expect useful data.
79  * @param visibility_history Ball visibility history.
80  * @param x global x-coordinates of the ball
81  * @param y global y-coordinates of the ball
82  * @param z global z-coordinates of the ball
83  * @param covariance covariance matrix with 9 entries, ordered as three concatenated
84  * rows (first row, three floats, second row, three floats, third row, three
85  * floats).
86  * @see WorldInfoTransceiver::set_ball_pos()
87  * @see WorldInfoTransceiver::set_ball_visible()
88  *
89  * @fn void WorldInfoHandler::ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
90  * Ball velocity information received.
91  * @param from_host transmitting host of this information, if available symbolic name
92  * @param vel_x velocity in x direction
93  * @param vel_y velocity in y direction
94  * @param vel_z velocity in z direction
95  * @param covariance covariance matrix with 9 entries, ordered as three concatenated
96  * rows (first row, three floats, second row, three floats, third row, three
97  * floats).
98  * @see WorldInfoTransceiver::set_ball_velocity()
99  *
100  * @fn void WorldInfoHandler::global_ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
101  * Ball velocity information received.
102  * @param from_host transmitting host of this information, if available symbolic name
103  * @param vel_x velocity in x direction
104  * @param vel_y velocity in y direction
105  * @param vel_z velocity in z direction
106  * @param covariance covariance matrix with 9 entries, ordered as three concatenated
107  * rows (first row, three floats, second row, three floats, third row, three
108  * floats).
109  * @see WorldInfoTransceiver::set_ball_velocity()
110  *
111  * @fn void WorldInfoHandler::opponent_pose_rcvd(const char *from_host, unsigned int uid, float distance, float bearing, , float *covariance)
112  * Opponent information received.
113  * @param from_host transmitting host of this information, if available symbolic name
114  * @param uid unique ID of the opponent
115  * @param distance to opponent
116  * @param bearing bearing to opponent (angle is zero if opponent is in front of robot,
117  * positive if right of robot, negative if left of robot).
118  * @param covariance covariance matrix with 4 entries, ordered as two concatenated
119  * rows (first row, two floats, second row, two floats)
120  * @see WorldInfoTransceiver::add_opponent()
121  *
122  * @fn void WorldInfoHandler::opponent_disapp_rcvd(const char *from_host, unsigned int uid)
123  * Opponent disappeared.
124  * @param from_host transmitting host of this information, if available symbolic name
125  * @param uid unique ID of the opponent
126  *
127  * @fn void WorldInfoHandler::gamestate_rcvd(const char *from_host, unsigned int game_state, worldinfo_gamestate_team_t state_team, unsigned int score_cyan, unsigned int score_magenta, worldinfo_gamestate_team_t our_team, worldinfo_gamestate_goalcolor_t our_goal_color, worldinfo_gamestate_half_t half)
128  * Gamestate information received.
129  * @param from_host transmitting host of this information, if available symbolic name
130  * @param game_state current gamestate
131  * @param state_team team related to the game state
132  * @param score_cyan current score of team cyan
133  * @param score_magenta current score of team magenta
134  * @param our_team our team color
135  * @param our_goal_color our goal color
136  * @param half current half of the game, first or second
137  * @see WorldInfoTransceiver::set_gamestate()
138  *
139  * @fn void WorldInfoHandler::penalty_rcvd(const char *from_host, unsigned int player, unsigned int penalty, unsigned int seconds_remaining)
140  * Penalty info received.
141  * @param from_host transmitting host of this information, if available symbolic name
142  * @param player player number for penalty info
143  * @param penalty penalty code
144  * @param seconds_remaining time in seconds when penalty is expected to be lifted
145  */
146 
147 /** Virtual empty destructor. */
149 {
150 }
151 
152 
153 } // end namespace fawkes
Fawkes library namespace.
virtual ~WorldInfoHandler()
Virtual empty destructor.
Definition: handler.cpp:148