Fawkes API Fawkes Development Version
NavigatorInterface.h
1
2/***************************************************************************
3 * NavigatorInterface.h - Fawkes BlackBoard Interface - NavigatorInterface
4 *
5 * Templated created: Thu Oct 12 10:49:19 2006
6 * Copyright 2007-2009 Martin Liebenberg, Daniel Beck, Tim Niemueller
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#ifndef _INTERFACES_NAVIGATORINTERFACE_H_
25#define _INTERFACES_NAVIGATORINTERFACE_H_
26
27#include <interface/interface.h>
28#include <interface/message.h>
29#include <interface/field_iterator.h>
30
31namespace fawkes {
32
34{
35 /// @cond INTERNALS
36 INTERFACE_MGMT_FRIENDS(NavigatorInterface)
37 /// @endcond
38 public:
39 /* constants */
40 static const uint32_t ERROR_NONE;
41 static const uint32_t ERROR_MOTOR;
42 static const uint32_t ERROR_OBSTRUCTION;
43 static const uint32_t ERROR_UNKNOWN_PLACE;
44 static const uint32_t ERROR_PATH_GEN_FAIL;
45 static const uint32_t FLAG_NONE;
46 static const uint32_t FLAG_CART_GOTO;
47 static const uint32_t FLAG_POLAR_GOTO;
48 static const uint32_t FLAG_PLACE_GOTO;
49 static const uint32_t FLAG_UPDATES_DEST_DIST;
50 static const uint32_t FLAG_SECURITY_DISTANCE;
51 static const uint32_t FLAG_ESCAPING;
52
53 /** Drive modes enum */
54 typedef enum {
55 MovingNotAllowed /**< Moving not allowed constant */,
56 Forward /**< Moving forward constant */,
57 AllowBackward /**< Moving allow backward constant */,
58 Backward /**< Moving backward constant */,
59 ESCAPE /**< Escape constant */
61 const char * tostring_DriveMode(DriveMode value) const;
62
63 /** Orientation mode enum */
64 typedef enum {
65 OrientAtTarget /**< Orient when at target, if orientation is given */,
66 OrientDuringTravel /**< Orient during travel BUT NOT at target, if omnidirectional platform and orientation is given */
68 const char * tostring_OrientationMode(OrientationMode value) const;
69
70 private:
71 /** Internal data storage, do NOT modify! */
72 typedef struct {
73 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
74 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
75 uint32_t flags; /**< Bit-wise combination of
76 FLAG_* constants denoting navigator component features. */
77 float x; /**< Current X-coordinate in the navigator coordinate system. */
78 float y; /**< Current Y-coordinate in the navigator coordinate system. */
79 float dest_x; /**< X-coordinate of the current destination, or 0.0 if no target has been set. */
80 float dest_y; /**< Y-coordinate of the current destination, or 0.0 if no target has been set. */
81 float dest_ori; /**< Orientation of the current destination, or 0.0 if no target has been set. */
82 float dest_dist; /**< Distance to destination in m. */
83 uint32_t msgid; /**< The ID of the message that is currently being
84 processed, or 0 if no message is being processed. */
85 bool final; /**< True, if the last goto command has been finished,
86 false if it is still running */
87 uint32_t error_code; /**< Failure code set if
88 final is true. 0 if no error occured, an error code from ERROR_*
89 constants otherwise (or a bit-wise combination). */
90 float max_velocity; /**< Maximum velocity */
91 float max_rotation; /**< Maximum rotation velocity */
92 float security_distance; /**< Security distance to keep to obstacles */
93 bool escaping_enabled; /**< This is used for navigation components with integrated collision avoidance,
94 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape. */
95 int32_t drive_mode; /**< Current drive mode */
96 bool auto_drive_mode; /**< True, if the drive mode should be automatically decided each time.
97 False, if the drive mode should not automatically change, which is the case when sending
98 a SetAutoDriveMode-message (otherwise the navigator might ignore that value). */
99 bool stop_at_target; /**< Stop when target is reached? */
100 int32_t orientation_mode; /**< Mode how/when to orientate if orientation is given */
101 char target_frame[64]; /**< The target frame to plan into */
102 } NavigatorInterface_data_t;
103
104 NavigatorInterface_data_t *data;
105
106 interface_enum_map_t enum_map_DriveMode;
107 interface_enum_map_t enum_map_OrientationMode;
108 public:
109 /* messages */
110 class StopMessage : public Message
111 {
112 private:
113 /** Internal data storage, do NOT modify! */
114 typedef struct {
115 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
116 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
117 uint32_t msgid; /**<
118 If zero, stops any motion. If non-zero, the component shall only
119 stop the motion if the currently executed command was received
120 through a message with that specific ID.
121
122 Use the specific version whenever possible. It avoids a race
123 condition if one intstructing component sends a stop, and
124 another a new drive command at the same time.
125 */
126 } StopMessage_data_t;
127
128 StopMessage_data_t *data;
129
130 interface_enum_map_t enum_map_DriveMode;
131 interface_enum_map_t enum_map_OrientationMode;
132 public:
133 StopMessage(const uint32_t ini_msgid);
134 StopMessage();
135 ~StopMessage();
136
137 explicit StopMessage(const StopMessage *m);
138 /* Methods */
139 uint32_t msgid() const;
140 void set_msgid(const uint32_t new_msgid);
141 size_t maxlenof_msgid() const;
142 virtual Message * clone() const;
143 };
144
145 class TurnMessage : public Message
146 {
147 private:
148 /** Internal data storage, do NOT modify! */
149 typedef struct {
150 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
151 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
152 float angle; /**< Angle of the turn. */
153 float velocity; /**< The desired turning velocity in rad/s,
154 set to zero to use default value. */
155 } TurnMessage_data_t;
156
157 TurnMessage_data_t *data;
158
159 interface_enum_map_t enum_map_DriveMode;
160 interface_enum_map_t enum_map_OrientationMode;
161 public:
162 TurnMessage(const float ini_angle, const float ini_velocity);
163 TurnMessage();
164 ~TurnMessage();
165
166 explicit TurnMessage(const TurnMessage *m);
167 /* Methods */
168 float angle() const;
169 void set_angle(const float new_angle);
170 size_t maxlenof_angle() const;
171 float velocity() const;
172 void set_velocity(const float new_velocity);
173 size_t maxlenof_velocity() const;
174 virtual Message * clone() const;
175 };
176
178 {
179 private:
180 /** Internal data storage, do NOT modify! */
181 typedef struct {
182 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
183 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
184 float x; /**< X-coordinate of the target, in the robot's coordinate system. */
185 float y; /**< Y-coordinate of the target, in the robot's coordinate system. */
186 float orientation; /**< The desired orientation of the robot at the target. */
187 } CartesianGotoMessage_data_t;
188
189 CartesianGotoMessage_data_t *data;
190
191 interface_enum_map_t enum_map_DriveMode;
192 interface_enum_map_t enum_map_OrientationMode;
193 public:
194 CartesianGotoMessage(const float ini_x, const float ini_y, const float ini_orientation);
197
199 /* Methods */
200 float x() const;
201 void set_x(const float new_x);
202 size_t maxlenof_x() const;
203 float y() const;
204 void set_y(const float new_y);
205 size_t maxlenof_y() const;
206 float orientation() const;
207 void set_orientation(const float new_orientation);
208 size_t maxlenof_orientation() const;
209 virtual Message * clone() const;
210 };
211
213 {
214 private:
215 /** Internal data storage, do NOT modify! */
216 typedef struct {
217 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
218 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
219 float x; /**< X-coordinate of the target, in the robot's coordinate system. */
220 float y; /**< Y-coordinate of the target, in the robot's coordinate system. */
221 float orientation; /**< The desired orientation of the robot at the target. */
222 float translation_tolerance; /**< The translation tolerance of the target, in meters. */
223 float orientation_tolerance; /**< The orientation tolerance of the target, in radians. */
224 } CartesianGotoWithToleranceMessage_data_t;
225
226 CartesianGotoWithToleranceMessage_data_t *data;
227
228 interface_enum_map_t enum_map_DriveMode;
229 interface_enum_map_t enum_map_OrientationMode;
230 public:
231 CartesianGotoWithToleranceMessage(const float ini_x, const float ini_y, const float ini_orientation, const float ini_translation_tolerance, const float ini_orientation_tolerance);
234
236 /* Methods */
237 float x() const;
238 void set_x(const float new_x);
239 size_t maxlenof_x() const;
240 float y() const;
241 void set_y(const float new_y);
242 size_t maxlenof_y() const;
243 float orientation() const;
244 void set_orientation(const float new_orientation);
245 size_t maxlenof_orientation() const;
246 float translation_tolerance() const;
247 void set_translation_tolerance(const float new_translation_tolerance);
248 size_t maxlenof_translation_tolerance() const;
249 float orientation_tolerance() const;
250 void set_orientation_tolerance(const float new_orientation_tolerance);
251 size_t maxlenof_orientation_tolerance() const;
252 virtual Message * clone() const;
253 };
254
256 {
257 private:
258 /** Internal data storage, do NOT modify! */
259 typedef struct {
260 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
261 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
262 float x; /**< X-coordinate of the target, in the robot's coordinate system. */
263 float y; /**< Y-coordinate of the target, in the robot's coordinate system. */
264 float orientation; /**< The desired orientation of the robot at the target. */
265 char target_frame[64]; /**< The target frame to plan in. */
266 } CartesianGotoWithFrameMessage_data_t;
267
268 CartesianGotoWithFrameMessage_data_t *data;
269
270 interface_enum_map_t enum_map_DriveMode;
271 interface_enum_map_t enum_map_OrientationMode;
272 public:
273 CartesianGotoWithFrameMessage(const float ini_x, const float ini_y, const float ini_orientation, const char * ini_target_frame);
276
278 /* Methods */
279 float x() const;
280 void set_x(const float new_x);
281 size_t maxlenof_x() const;
282 float y() const;
283 void set_y(const float new_y);
284 size_t maxlenof_y() const;
285 float orientation() const;
286 void set_orientation(const float new_orientation);
287 size_t maxlenof_orientation() const;
288 char * target_frame() const;
289 void set_target_frame(const char * new_target_frame);
290 size_t maxlenof_target_frame() const;
291 virtual Message * clone() const;
292 };
293
295 {
296 private:
297 /** Internal data storage, do NOT modify! */
298 typedef struct {
299 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
300 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
301 float x; /**< X-coordinate of the target, in the robot's coordinate system. */
302 float y; /**< Y-coordinate of the target, in the robot's coordinate system. */
303 float orientation; /**< The desired orientation of the robot at the target. */
304 char target_frame[64]; /**< The target frame to plan in. */
305 float translation_tolerance; /**< The translation tolerance of the target, in meters. */
306 float orientation_tolerance; /**< The orientation tolerance of the target, in radians. */
307 } CartesianGotoWithFrameWithToleranceMessage_data_t;
308
309 CartesianGotoWithFrameWithToleranceMessage_data_t *data;
310
311 interface_enum_map_t enum_map_DriveMode;
312 interface_enum_map_t enum_map_OrientationMode;
313 public:
314 CartesianGotoWithFrameWithToleranceMessage(const float ini_x, const float ini_y, const float ini_orientation, const char * ini_target_frame, const float ini_translation_tolerance, const float ini_orientation_tolerance);
317
319 /* Methods */
320 float x() const;
321 void set_x(const float new_x);
322 size_t maxlenof_x() const;
323 float y() const;
324 void set_y(const float new_y);
325 size_t maxlenof_y() const;
326 float orientation() const;
327 void set_orientation(const float new_orientation);
328 size_t maxlenof_orientation() const;
329 char * target_frame() const;
330 void set_target_frame(const char * new_target_frame);
331 size_t maxlenof_target_frame() const;
332 float translation_tolerance() const;
333 void set_translation_tolerance(const float new_translation_tolerance);
334 size_t maxlenof_translation_tolerance() const;
335 float orientation_tolerance() const;
336 void set_orientation_tolerance(const float new_orientation_tolerance);
337 size_t maxlenof_orientation_tolerance() const;
338 virtual Message * clone() const;
339 };
340
342 {
343 private:
344 /** Internal data storage, do NOT modify! */
345 typedef struct {
346 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
347 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
348 float phi; /**< Angle between the robot's front and the target. */
349 float dist; /**< Distance to the target. */
350 float orientation; /**< The desired orientation of the robot at the target. */
351 } PolarGotoMessage_data_t;
352
353 PolarGotoMessage_data_t *data;
354
355 interface_enum_map_t enum_map_DriveMode;
356 interface_enum_map_t enum_map_OrientationMode;
357 public:
358 PolarGotoMessage(const float ini_phi, const float ini_dist, const float ini_orientation);
361
362 explicit PolarGotoMessage(const PolarGotoMessage *m);
363 /* Methods */
364 float phi() const;
365 void set_phi(const float new_phi);
366 size_t maxlenof_phi() const;
367 float dist() const;
368 void set_dist(const float new_dist);
369 size_t maxlenof_dist() const;
370 float orientation() const;
371 void set_orientation(const float new_orientation);
372 size_t maxlenof_orientation() const;
373 virtual Message * clone() const;
374 };
375
377 {
378 private:
379 /** Internal data storage, do NOT modify! */
380 typedef struct {
381 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
382 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
383 char place[64]; /**< Place to go to. */
384 } PlaceGotoMessage_data_t;
385
386 PlaceGotoMessage_data_t *data;
387
388 interface_enum_map_t enum_map_DriveMode;
389 interface_enum_map_t enum_map_OrientationMode;
390 public:
391 PlaceGotoMessage(const char * ini_place);
394
395 explicit PlaceGotoMessage(const PlaceGotoMessage *m);
396 /* Methods */
397 char * place() const;
398 void set_place(const char * new_place);
399 size_t maxlenof_place() const;
400 virtual Message * clone() const;
401 };
402
404 {
405 private:
406 /** Internal data storage, do NOT modify! */
407 typedef struct {
408 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
409 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
410 char place[64]; /**< Place to go to. */
411 float orientation; /**< The desired orientation of the robot at the target. */
412 } PlaceWithOriGotoMessage_data_t;
413
414 PlaceWithOriGotoMessage_data_t *data;
415
416 interface_enum_map_t enum_map_DriveMode;
417 interface_enum_map_t enum_map_OrientationMode;
418 public:
419 PlaceWithOriGotoMessage(const char * ini_place, const float ini_orientation);
422
424 /* Methods */
425 char * place() const;
426 void set_place(const char * new_place);
427 size_t maxlenof_place() const;
428 float orientation() const;
429 void set_orientation(const float new_orientation);
430 size_t maxlenof_orientation() const;
431 virtual Message * clone() const;
432 };
433
435 {
436 private:
437 /** Internal data storage, do NOT modify! */
438 typedef struct {
439 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
440 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
441 float x; /**< X-coordinate of the obstacle. */
442 float y; /**< Y-coordinate of the obstacle. */
443 float width; /**< Width of the obstacle. */
444 } ObstacleMessage_data_t;
445
446 ObstacleMessage_data_t *data;
447
448 interface_enum_map_t enum_map_DriveMode;
449 interface_enum_map_t enum_map_OrientationMode;
450 public:
451 ObstacleMessage(const float ini_x, const float ini_y, const float ini_width);
454
455 explicit ObstacleMessage(const ObstacleMessage *m);
456 /* Methods */
457 float x() const;
458 void set_x(const float new_x);
459 size_t maxlenof_x() const;
460 float y() const;
461 void set_y(const float new_y);
462 size_t maxlenof_y() const;
463 float width() const;
464 void set_width(const float new_width);
465 size_t maxlenof_width() const;
466 virtual Message * clone() const;
467 };
468
470 {
471 private:
472 /** Internal data storage, do NOT modify! */
473 typedef struct {
474 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
475 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
476 } ResetOdometryMessage_data_t;
477
478 ResetOdometryMessage_data_t *data;
479
480 interface_enum_map_t enum_map_DriveMode;
481 interface_enum_map_t enum_map_OrientationMode;
482 public:
485
487 /* Methods */
488 virtual Message * clone() const;
489 };
490
492 {
493 private:
494 /** Internal data storage, do NOT modify! */
495 typedef struct {
496 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
497 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
498 float max_velocity; /**< Maximum velocity */
499 } SetMaxVelocityMessage_data_t;
500
501 SetMaxVelocityMessage_data_t *data;
502
503 interface_enum_map_t enum_map_DriveMode;
504 interface_enum_map_t enum_map_OrientationMode;
505 public:
506 SetMaxVelocityMessage(const float ini_max_velocity);
509
511 /* Methods */
512 float max_velocity() const;
513 void set_max_velocity(const float new_max_velocity);
514 size_t maxlenof_max_velocity() const;
515 virtual Message * clone() const;
516 };
517
519 {
520 private:
521 /** Internal data storage, do NOT modify! */
522 typedef struct {
523 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
524 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
525 float max_rotation; /**< Maximum rotation velocity */
526 } SetMaxRotationMessage_data_t;
527
528 SetMaxRotationMessage_data_t *data;
529
530 interface_enum_map_t enum_map_DriveMode;
531 interface_enum_map_t enum_map_OrientationMode;
532 public:
533 SetMaxRotationMessage(const float ini_max_rotation);
536
538 /* Methods */
539 float max_rotation() const;
540 void set_max_rotation(const float new_max_rotation);
541 size_t maxlenof_max_rotation() const;
542 virtual Message * clone() const;
543 };
544
546 {
547 private:
548 /** Internal data storage, do NOT modify! */
549 typedef struct {
550 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
551 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
552 bool escaping_enabled; /**< This is used for navigation components with integrated collision avoidance,
553 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape. */
554 } SetEscapingMessage_data_t;
555
556 SetEscapingMessage_data_t *data;
557
558 interface_enum_map_t enum_map_DriveMode;
559 interface_enum_map_t enum_map_OrientationMode;
560 public:
561 SetEscapingMessage(const bool ini_escaping_enabled);
564
565 explicit SetEscapingMessage(const SetEscapingMessage *m);
566 /* Methods */
567 bool is_escaping_enabled() const;
568 void set_escaping_enabled(const bool new_escaping_enabled);
569 size_t maxlenof_escaping_enabled() const;
570 virtual Message * clone() const;
571 };
572
574 {
575 private:
576 /** Internal data storage, do NOT modify! */
577 typedef struct {
578 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
579 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
580 float security_distance; /**< Security distance to keep to obstacles */
581 } SetSecurityDistanceMessage_data_t;
582
583 SetSecurityDistanceMessage_data_t *data;
584
585 interface_enum_map_t enum_map_DriveMode;
586 interface_enum_map_t enum_map_OrientationMode;
587 public:
588 SetSecurityDistanceMessage(const float ini_security_distance);
591
593 /* Methods */
594 float security_distance() const;
595 void set_security_distance(const float new_security_distance);
596 size_t maxlenof_security_distance() const;
597 virtual Message * clone() const;
598 };
599
601 {
602 private:
603 /** Internal data storage, do NOT modify! */
604 typedef struct {
605 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
606 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
607 int32_t drive_mode; /**< Current drive mode */
608 } SetDriveModeMessage_data_t;
609
610 SetDriveModeMessage_data_t *data;
611
612 interface_enum_map_t enum_map_DriveMode;
613 interface_enum_map_t enum_map_OrientationMode;
614 public:
615 SetDriveModeMessage(const DriveMode ini_drive_mode);
618
619 explicit SetDriveModeMessage(const SetDriveModeMessage *m);
620 /* Methods */
621 DriveMode drive_mode() const;
622 void set_drive_mode(const DriveMode new_drive_mode);
623 size_t maxlenof_drive_mode() const;
624 virtual Message * clone() const;
625 };
626
628 {
629 private:
630 /** Internal data storage, do NOT modify! */
631 typedef struct {
632 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
633 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
634 bool stop_at_target; /**< Stop when target is reached? */
635 } SetStopAtTargetMessage_data_t;
636
637 SetStopAtTargetMessage_data_t *data;
638
639 interface_enum_map_t enum_map_DriveMode;
640 interface_enum_map_t enum_map_OrientationMode;
641 public:
642 SetStopAtTargetMessage(const bool ini_stop_at_target);
645
647 /* Methods */
648 bool is_stop_at_target() const;
649 void set_stop_at_target(const bool new_stop_at_target);
650 size_t maxlenof_stop_at_target() const;
651 virtual Message * clone() const;
652 };
653
655 {
656 private:
657 /** Internal data storage, do NOT modify! */
658 typedef struct {
659 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
660 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
661 int32_t orientation_mode; /**< Mode how/when to orientate if orientation is given */
662 } SetOrientationModeMessage_data_t;
663
664 SetOrientationModeMessage_data_t *data;
665
666 interface_enum_map_t enum_map_DriveMode;
667 interface_enum_map_t enum_map_OrientationMode;
668 public:
669 SetOrientationModeMessage(const OrientationMode ini_orientation_mode);
672
674 /* Methods */
676 void set_orientation_mode(const OrientationMode new_orientation_mode);
677 size_t maxlenof_orientation_mode() const;
678 virtual Message * clone() const;
679 };
680
682 {
683 private:
684 /** Internal data storage, do NOT modify! */
685 typedef struct {
686 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */
687 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */
688 } ResetParametersMessage_data_t;
689
690 ResetParametersMessage_data_t *data;
691
692 interface_enum_map_t enum_map_DriveMode;
693 interface_enum_map_t enum_map_OrientationMode;
694 public:
697
699 /* Methods */
700 virtual Message * clone() const;
701 };
702
703 virtual bool message_valid(const Message *message) const;
704 private:
707
708 public:
709 /* Methods */
710 uint32_t flags() const;
711 void set_flags(const uint32_t new_flags);
712 size_t maxlenof_flags() const;
713 float x() const;
714 void set_x(const float new_x);
715 size_t maxlenof_x() const;
716 float y() const;
717 void set_y(const float new_y);
718 size_t maxlenof_y() const;
719 float dest_x() const;
720 void set_dest_x(const float new_dest_x);
721 size_t maxlenof_dest_x() const;
722 float dest_y() const;
723 void set_dest_y(const float new_dest_y);
724 size_t maxlenof_dest_y() const;
725 float dest_ori() const;
726 void set_dest_ori(const float new_dest_ori);
727 size_t maxlenof_dest_ori() const;
728 float dest_dist() const;
729 void set_dest_dist(const float new_dest_dist);
730 size_t maxlenof_dest_dist() const;
731 uint32_t msgid() const;
732 void set_msgid(const uint32_t new_msgid);
733 size_t maxlenof_msgid() const;
734 bool is_final() const;
735 void set_final(const bool new_final);
736 size_t maxlenof_final() const;
737 uint32_t error_code() const;
738 void set_error_code(const uint32_t new_error_code);
739 size_t maxlenof_error_code() const;
740 float max_velocity() const;
741 void set_max_velocity(const float new_max_velocity);
742 size_t maxlenof_max_velocity() const;
743 float max_rotation() const;
744 void set_max_rotation(const float new_max_rotation);
745 size_t maxlenof_max_rotation() const;
746 float security_distance() const;
747 void set_security_distance(const float new_security_distance);
748 size_t maxlenof_security_distance() const;
749 bool is_escaping_enabled() const;
750 void set_escaping_enabled(const bool new_escaping_enabled);
751 size_t maxlenof_escaping_enabled() const;
752 DriveMode drive_mode() const;
753 void set_drive_mode(const DriveMode new_drive_mode);
754 size_t maxlenof_drive_mode() const;
755 bool is_auto_drive_mode() const;
756 void set_auto_drive_mode(const bool new_auto_drive_mode);
757 size_t maxlenof_auto_drive_mode() const;
758 bool is_stop_at_target() const;
759 void set_stop_at_target(const bool new_stop_at_target);
760 size_t maxlenof_stop_at_target() const;
762 void set_orientation_mode(const OrientationMode new_orientation_mode);
763 size_t maxlenof_orientation_mode() const;
764 char * target_frame() const;
765 void set_target_frame(const char * new_target_frame);
766 size_t maxlenof_target_frame() const;
767 virtual Message * create_message(const char *type) const;
768
769 virtual void copy_values(const Interface *other);
770 virtual const char * enum_tostring(const char *enumtype, int val) const;
771
772};
773
774} // end namespace fawkes
775
776#endif
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
CartesianGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_orientation(const float new_orientation)
Set orientation value.
float orientation() const
Get orientation value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
CartesianGotoWithFrameMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
size_t maxlenof_y() const
Get maximum length of y value.
void set_orientation(const float new_orientation)
Set orientation value.
CartesianGotoWithFrameWithToleranceMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_orientation_tolerance() const
Get maximum length of orientation_tolerance value.
void set_orientation_tolerance(const float new_orientation_tolerance)
Set orientation_tolerance value.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
void set_translation_tolerance(const float new_translation_tolerance)
Set translation_tolerance value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
CartesianGotoWithToleranceMessage Fawkes BlackBoard Interface Message.
float orientation_tolerance() const
Get orientation_tolerance value.
void set_orientation_tolerance(const float new_orientation_tolerance)
Set orientation_tolerance value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_orientation_tolerance() const
Get maximum length of orientation_tolerance value.
void set_translation_tolerance(const float new_translation_tolerance)
Set translation_tolerance value.
float translation_tolerance() const
Get translation_tolerance value.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
ObstacleMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_y(const float new_y)
Set y value.
void set_width(const float new_width)
Set width value.
size_t maxlenof_width() const
Get maximum length of width value.
void set_x(const float new_x)
Set x value.
PlaceGotoMessage Fawkes BlackBoard Interface Message.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_place() const
Get maximum length of place value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_place() const
Get maximum length of place value.
PolarGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_phi() const
Get maximum length of phi value.
float orientation() const
Get orientation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_dist() const
Get maximum length of dist value.
void set_dist(const float new_dist)
Set dist value.
virtual Message * clone() const
Clone this message.
void set_phi(const float new_phi)
Set phi value.
void set_orientation(const float new_orientation)
Set orientation value.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
ResetParametersMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
SetDriveModeMessage Fawkes BlackBoard Interface Message.
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
virtual Message * clone() const
Clone this message.
DriveMode drive_mode() const
Get drive_mode value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
SetEscapingMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
bool is_escaping_enabled() const
Get escaping_enabled value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
SetMaxRotationMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
virtual Message * clone() const
Clone this message.
float max_rotation() const
Get max_rotation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
float max_velocity() const
Get max_velocity value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
SetOrientationModeMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
OrientationMode orientation_mode() const
Get orientation_mode value.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
void set_security_distance(const float new_security_distance)
Set security_distance value.
virtual Message * clone() const
Clone this message.
float security_distance() const
Get security_distance value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
bool is_stop_at_target() const
Get stop_at_target value.
virtual Message * clone() const
Clone this message.
StopMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
virtual Message * clone() const
Clone this message.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
uint32_t msgid() const
Get msgid value.
TurnMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
float velocity() const
Get velocity value.
virtual Message * clone() const
Clone this message.
void set_angle(const float new_angle)
Set angle value.
size_t maxlenof_angle() const
Get maximum length of angle value.
void set_velocity(const float new_velocity)
Set velocity value.
NavigatorInterface Fawkes BlackBoard Interface.
size_t maxlenof_dest_x() const
Get maximum length of dest_x value.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
bool is_final() const
Get final value.
static const uint32_t FLAG_SECURITY_DISTANCE
FLAG_SECURITY_DISTANCE constant.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
float y() const
Get y value.
size_t maxlenof_dest_y() const
Get maximum length of dest_y value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
size_t maxlenof_auto_drive_mode() const
Get maximum length of auto_drive_mode value.
float dest_x() const
Get dest_x value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
static const uint32_t FLAG_PLACE_GOTO
FLAG_PLACE_GOTO constant.
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
float dest_y() const
Get dest_y value.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
float max_velocity() const
Get max_velocity value.
size_t maxlenof_x() const
Get maximum length of x value.
uint32_t error_code() const
Get error_code value.
char * target_frame() const
Get target_frame value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
uint32_t flags() const
Get flags value.
void set_flags(const uint32_t new_flags)
Set flags value.
void set_security_distance(const float new_security_distance)
Set security_distance value.
bool is_stop_at_target() const
Get stop_at_target value.
float dest_dist() const
Get dest_dist value.
size_t maxlenof_final() const
Get maximum length of final value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_auto_drive_mode(const bool new_auto_drive_mode)
Set auto_drive_mode value.
static const uint32_t ERROR_UNKNOWN_PLACE
ERROR_UNKNOWN_PLACE constant.
void set_x(const float new_x)
Set x value.
float max_rotation() const
Get max_rotation value.
size_t maxlenof_y() const
Get maximum length of y value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
uint32_t msgid() const
Get msgid value.
void set_dest_ori(const float new_dest_ori)
Set dest_ori value.
size_t maxlenof_dest_dist() const
Get maximum length of dest_dist value.
void set_dest_dist(const float new_dest_dist)
Set dest_dist value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
void set_dest_y(const float new_dest_y)
Set dest_y value.
@ Forward
Moving forward constant.
@ AllowBackward
Moving allow backward constant.
@ Backward
Moving backward constant.
@ MovingNotAllowed
Moving not allowed constant.
void set_y(const float new_y)
Set y value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
bool is_escaping_enabled() const
Get escaping_enabled value.
float x() const
Get x value.
static const uint32_t FLAG_CART_GOTO
FLAG_CART_GOTO constant.
const char * tostring_DriveMode(DriveMode value) const
Convert DriveMode constant to string.
void set_dest_x(const float new_dest_x)
Set dest_x value.
DriveMode drive_mode() const
Get drive_mode value.
virtual Message * create_message(const char *type) const
Create message based on type name.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
float security_distance() const
Get security_distance value.
OrientationMode
Orientation mode enum.
@ OrientDuringTravel
Orient during travel BUT NOT at target, if omnidirectional platform and orientation is given.
@ OrientAtTarget
Orient when at target, if orientation is given.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t ERROR_PATH_GEN_FAIL
ERROR_PATH_GEN_FAIL constant.
size_t maxlenof_dest_ori() const
Get maximum length of dest_ori value.
static const uint32_t FLAG_UPDATES_DEST_DIST
FLAG_UPDATES_DEST_DIST constant.
static const uint32_t FLAG_ESCAPING
FLAG_ESCAPING constant.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
static const uint32_t ERROR_MOTOR
ERROR_MOTOR constant.
bool is_auto_drive_mode() const
Get auto_drive_mode value.
static const uint32_t ERROR_OBSTRUCTION
ERROR_OBSTRUCTION constant.
float dest_ori() const
Get dest_ori value.
const char * tostring_OrientationMode(OrientationMode value) const
Convert OrientationMode constant to string.
void set_final(const bool new_final)
Set final value.
OrientationMode orientation_mode() const
Get orientation_mode value.
static const uint32_t FLAG_NONE
FLAG_NONE constant.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
size_t maxlenof_flags() const
Get maximum length of flags value.
static const uint32_t FLAG_POLAR_GOTO
FLAG_POLAR_GOTO constant.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
Fawkes library namespace.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
Definition: types.h:54