24 #ifndef __INTERFACES_NAVIGATORINTERFACE_H_ 25 #define __INTERFACES_NAVIGATORINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 72 typedef struct __attribute__((packed)) {
73 int64_t timestamp_sec;
74 int64_t timestamp_usec;
93 bool escaping_enabled;
101 } NavigatorInterface_data_t;
103 NavigatorInterface_data_t *data;
113 typedef struct __attribute__((packed)) {
114 int64_t timestamp_sec;
115 int64_t timestamp_usec;
116 } StopMessage_data_t;
118 StopMessage_data_t *data;
128 virtual Message * clone()
const;
135 typedef struct __attribute__((packed)) {
136 int64_t timestamp_sec;
137 int64_t timestamp_usec;
141 } TurnMessage_data_t;
143 TurnMessage_data_t *data;
148 TurnMessage(
const float ini_angle,
const float ini_velocity);
155 void set_angle(
const float new_angle);
156 size_t maxlenof_angle()
const;
157 float velocity()
const;
158 void set_velocity(
const float new_velocity);
159 size_t maxlenof_velocity()
const;
160 virtual Message * clone()
const;
167 typedef struct __attribute__((packed)) {
168 int64_t timestamp_sec;
169 int64_t timestamp_usec;
173 } CartesianGotoMessage_data_t;
175 CartesianGotoMessage_data_t *data;
187 void set_x(
const float new_x);
190 void set_y(
const float new_y);
192 float orientation()
const;
193 void set_orientation(
const float new_orientation);
194 size_t maxlenof_orientation()
const;
195 virtual Message * clone()
const;
202 typedef struct __attribute__((packed)) {
203 int64_t timestamp_sec;
204 int64_t timestamp_usec;
208 } PolarGotoMessage_data_t;
210 PolarGotoMessage_data_t *data;
215 PolarGotoMessage(
const float ini_phi,
const float ini_dist,
const float ini_orientation);
222 void set_phi(
const float new_phi);
223 size_t maxlenof_phi()
const;
225 void set_dist(
const float new_dist);
226 size_t maxlenof_dist()
const;
227 float orientation()
const;
228 void set_orientation(
const float new_orientation);
229 size_t maxlenof_orientation()
const;
230 virtual Message * clone()
const;
237 typedef struct __attribute__((packed)) {
238 int64_t timestamp_sec;
239 int64_t timestamp_usec;
241 } PlaceGotoMessage_data_t;
243 PlaceGotoMessage_data_t *data;
254 char * place()
const;
255 void set_place(
const char * new_place);
256 size_t maxlenof_place()
const;
257 virtual Message * clone()
const;
264 typedef struct __attribute__((packed)) {
265 int64_t timestamp_sec;
266 int64_t timestamp_usec;
269 } PlaceWithOriGotoMessage_data_t;
271 PlaceWithOriGotoMessage_data_t *data;
282 char * place()
const;
283 void set_place(
const char * new_place);
284 size_t maxlenof_place()
const;
285 float orientation()
const;
286 void set_orientation(
const float new_orientation);
287 size_t maxlenof_orientation()
const;
288 virtual Message * clone()
const;
295 typedef struct __attribute__((packed)) {
296 int64_t timestamp_sec;
297 int64_t timestamp_usec;
301 } ObstacleMessage_data_t;
303 ObstacleMessage_data_t *data;
308 ObstacleMessage(
const float ini_x,
const float ini_y,
const float ini_width);
315 void set_x(
const float new_x);
318 void set_y(
const float new_y);
321 void set_width(
const float new_width);
322 size_t maxlenof_width()
const;
323 virtual Message * clone()
const;
330 typedef struct __attribute__((packed)) {
331 int64_t timestamp_sec;
332 int64_t timestamp_usec;
333 } ResetOdometryMessage_data_t;
335 ResetOdometryMessage_data_t *data;
345 virtual Message * clone()
const;
352 typedef struct __attribute__((packed)) {
353 int64_t timestamp_sec;
354 int64_t timestamp_usec;
356 } SetMaxVelocityMessage_data_t;
358 SetMaxVelocityMessage_data_t *data;
372 virtual Message * clone()
const;
379 typedef struct __attribute__((packed)) {
380 int64_t timestamp_sec;
381 int64_t timestamp_usec;
383 } SetMaxRotationMessage_data_t;
385 SetMaxRotationMessage_data_t *data;
399 virtual Message * clone()
const;
406 typedef struct __attribute__((packed)) {
407 int64_t timestamp_sec;
408 int64_t timestamp_usec;
409 bool escaping_enabled;
411 } SetEscapingMessage_data_t;
413 SetEscapingMessage_data_t *data;
427 virtual Message * clone()
const;
434 typedef struct __attribute__((packed)) {
435 int64_t timestamp_sec;
436 int64_t timestamp_usec;
438 } SetSecurityDistanceMessage_data_t;
440 SetSecurityDistanceMessage_data_t *data;
454 virtual Message * clone()
const;
461 typedef struct __attribute__((packed)) {
462 int64_t timestamp_sec;
463 int64_t timestamp_usec;
465 } SetDriveModeMessage_data_t;
467 SetDriveModeMessage_data_t *data;
481 virtual Message * clone()
const;
488 typedef struct __attribute__((packed)) {
489 int64_t timestamp_sec;
490 int64_t timestamp_usec;
492 } SetStopAtTargetMessage_data_t;
494 SetStopAtTargetMessage_data_t *data;
508 virtual Message * clone()
const;
515 typedef struct __attribute__((packed)) {
516 int64_t timestamp_sec;
517 int64_t timestamp_usec;
519 } SetOrientationModeMessage_data_t;
521 SetOrientationModeMessage_data_t *data;
535 virtual Message * clone()
const;
542 typedef struct __attribute__((packed)) {
543 int64_t timestamp_sec;
544 int64_t timestamp_usec;
545 } ResetParametersMessage_data_t;
547 ResetParametersMessage_data_t *data;
557 virtual Message * clone()
const;
567 uint32_t
flags()
const;
568 void set_flags(
const uint32_t new_flags);
571 void set_x(
const float new_x);
574 void set_y(
const float new_y);
588 uint32_t
msgid()
const;
589 void set_msgid(
const uint32_t new_msgid);
624 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
bool is_auto_drive_mode() const
Get auto_drive_mode value.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
float max_velocity() const
Get max_velocity value.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
static const uint32_t ERROR_PATH_GEN_FAIL
ERROR_PATH_GEN_FAIL constant.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
Fawkes library namespace.
ObstacleMessage Fawkes BlackBoard Interface Message.
void set_final(const bool new_final)
Set final value.
bool is_stop_at_target() const
Get stop_at_target value.
OrientationMode
Orientation mode enum.
static const uint32_t ERROR_MOTOR
ERROR_MOTOR constant.
SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_CART_GOTO
FLAG_CART_GOTO constant.
virtual Message * create_message(const char *type) const
Create message based on type name.
PolarGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_auto_drive_mode() const
Get maximum length of auto_drive_mode value.
static const uint32_t ERROR_UNKNOWN_PLACE
ERROR_UNKNOWN_PLACE constant.
uint32_t error_code() const
Get error_code value.
SetOrientationModeMessage Fawkes BlackBoard Interface Message.
Base class for all Fawkes BlackBoard interfaces.
size_t maxlenof_dest_dist() const
Get maximum length of dest_dist value.
float dest_ori() const
Get dest_ori value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
const char * tostring_DriveMode(DriveMode value) const
Convert DriveMode constant to string.
static const uint32_t FLAG_POLAR_GOTO
FLAG_POLAR_GOTO constant.
void set_security_distance(const float new_security_distance)
Set security_distance value.
SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
SetEscapingMessage Fawkes BlackBoard Interface Message.
OrientationMode orientation_mode() const
Get orientation_mode value.
Orient when at target, if orientation is given.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
float dest_y() const
Get dest_y value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
SetDriveModeMessage Fawkes BlackBoard Interface Message.
DriveMode drive_mode() const
Get drive_mode value.
PlaceGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_final() const
Get maximum length of final value.
const char * type() const
Get type of interface.
bool is_final() const
Get final value.
SetMaxRotationMessage Fawkes BlackBoard Interface Message.
CartesianGotoMessage Fawkes BlackBoard Interface Message.
Moving backward constant.
void set_flags(const uint32_t new_flags)
Set flags value.
size_t maxlenof_dest_ori() const
Get maximum length of dest_ori value.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
void set_auto_drive_mode(const bool new_auto_drive_mode)
Set auto_drive_mode value.
uint32_t flags() const
Get flags value.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
Moving allow backward constant.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
size_t maxlenof_dest_y() const
Get maximum length of dest_y value.
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
size_t maxlenof_dest_x() const
Get maximum length of dest_x value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
size_t maxlenof_x() const
Get maximum length of x value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
Moving not allowed constant.
float security_distance() const
Get security_distance value.
static const uint32_t FLAG_ESCAPING
FLAG_ESCAPING constant.
static const uint32_t ERROR_OBSTRUCTION
ERROR_OBSTRUCTION constant.
void set_dest_ori(const float new_dest_ori)
Set dest_ori value.
void set_y(const float new_y)
Set y value.
TurnMessage Fawkes BlackBoard Interface Message.
float x() const
Get x value.
static const uint32_t FLAG_SECURITY_DISTANCE
FLAG_SECURITY_DISTANCE constant.
void set_dest_dist(const float new_dest_dist)
Set dest_dist value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
void set_dest_x(const float new_dest_x)
Set dest_x value.
const char * tostring_OrientationMode(OrientationMode value) const
Convert OrientationMode constant to string.
float dest_x() const
Get dest_x value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
float dest_dist() const
Get dest_dist value.
ResetParametersMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_UPDATES_DEST_DIST
FLAG_UPDATES_DEST_DIST constant.
bool is_escaping_enabled() const
Get escaping_enabled value.
Orient during travel BUT NOT at target, if omnidirectional platform and orientation is given...
float y() const
Get y value.
void set_dest_y(const float new_dest_y)
Set dest_y value.
DriveMode
Drive modes enum.
static const uint32_t FLAG_NONE
FLAG_NONE constant.
size_t maxlenof_y() const
Get maximum length of y value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
uint32_t msgid() const
Get msgid value.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
void set_x(const float new_x)
Set x value.
size_t maxlenof_flags() const
Get maximum length of flags value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_PLACE_GOTO
FLAG_PLACE_GOTO constant.
StopMessage Fawkes BlackBoard Interface Message.
NavigatorInterface Fawkes BlackBoard Interface.
float max_rotation() const
Get max_rotation value.