Fawkes API  Fawkes Development Version
NavigatorInterface.cpp
1 
2 /***************************************************************************
3  * NavigatorInterface.cpp - 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 #include <interfaces/NavigatorInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <map>
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 
33 namespace fawkes {
34 
35 /** @class NavigatorInterface <interfaces/NavigatorInterface.h>
36  * NavigatorInterface Fawkes BlackBoard Interface.
37  *
38  The navigator interface is used by the navigator to export information about
39  the current status of the navigator and to define all messages by which the navigator
40  can be instructed.
41 
42  There are three coordinate systems, the robot system which is a right-handed cartesian
43  coordinate system with the robot in its origin, X axis pointing forward, Y pointing to
44  the left and Z pointing upwards. The second coordinate system is the so-called
45  navigator system. It is a coordinate system similar to the robot system, but the
46  origin is defined on the initialization of the navigator. The last system is the
47  odometry system. It is again a similar system, but the origin is reset from time
48  to time and the robot's position in this system gives the odometry deltas.
49 
50  * @ingroup FawkesInterfaces
51  */
52 
53 
54 /** ERROR_NONE constant */
55 const uint32_t NavigatorInterface::ERROR_NONE = 0u;
56 /** ERROR_MOTOR constant */
57 const uint32_t NavigatorInterface::ERROR_MOTOR = 1u;
58 /** ERROR_OBSTRUCTION constant */
59 const uint32_t NavigatorInterface::ERROR_OBSTRUCTION = 2u;
60 /** ERROR_UNKNOWN_PLACE constant */
61 const uint32_t NavigatorInterface::ERROR_UNKNOWN_PLACE = 4u;
62 /** ERROR_PATH_GEN_FAIL constant */
63 const uint32_t NavigatorInterface::ERROR_PATH_GEN_FAIL = 8u;
64 /** FLAG_NONE constant */
65 const uint32_t NavigatorInterface::FLAG_NONE = 0u;
66 /** FLAG_CART_GOTO constant */
67 const uint32_t NavigatorInterface::FLAG_CART_GOTO = 1u;
68 /** FLAG_POLAR_GOTO constant */
69 const uint32_t NavigatorInterface::FLAG_POLAR_GOTO = 2u;
70 /** FLAG_PLACE_GOTO constant */
71 const uint32_t NavigatorInterface::FLAG_PLACE_GOTO = 4u;
72 /** FLAG_UPDATES_DEST_DIST constant */
74 /** FLAG_SECURITY_DISTANCE constant */
76 /** FLAG_ESCAPING constant */
77 const uint32_t NavigatorInterface::FLAG_ESCAPING = 32u;
78 
79 /** Constructor */
80 NavigatorInterface::NavigatorInterface() : Interface()
81 {
82  data_size = sizeof(NavigatorInterface_data_t);
83  data_ptr = malloc(data_size);
84  data = (NavigatorInterface_data_t *)data_ptr;
85  data_ts = (interface_data_ts_t *)data_ptr;
86  memset(data_ptr, 0, data_size);
87  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
88  enum_map_DriveMode[(int)Forward] = "Forward";
89  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
90  enum_map_DriveMode[(int)Backward] = "Backward";
91  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
92  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
93  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
94  add_fieldinfo(IFT_UINT32, "flags", 1, &data->flags);
95  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
96  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
97  add_fieldinfo(IFT_FLOAT, "dest_x", 1, &data->dest_x);
98  add_fieldinfo(IFT_FLOAT, "dest_y", 1, &data->dest_y);
99  add_fieldinfo(IFT_FLOAT, "dest_ori", 1, &data->dest_ori);
100  add_fieldinfo(IFT_FLOAT, "dest_dist", 1, &data->dest_dist);
101  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
102  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
103  add_fieldinfo(IFT_UINT32, "error_code", 1, &data->error_code);
104  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
105  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
106  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
107  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
108  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
109  add_fieldinfo(IFT_BOOL, "auto_drive_mode", 1, &data->auto_drive_mode);
110  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
111  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
112  add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
113  add_messageinfo("StopMessage");
114  add_messageinfo("TurnMessage");
115  add_messageinfo("CartesianGotoMessage");
116  add_messageinfo("CartesianGotoWithFrameMessage");
117  add_messageinfo("PolarGotoMessage");
118  add_messageinfo("PlaceGotoMessage");
119  add_messageinfo("PlaceWithOriGotoMessage");
120  add_messageinfo("ObstacleMessage");
121  add_messageinfo("ResetOdometryMessage");
122  add_messageinfo("SetMaxVelocityMessage");
123  add_messageinfo("SetMaxRotationMessage");
124  add_messageinfo("SetEscapingMessage");
125  add_messageinfo("SetSecurityDistanceMessage");
126  add_messageinfo("SetDriveModeMessage");
127  add_messageinfo("SetStopAtTargetMessage");
128  add_messageinfo("SetOrientationModeMessage");
129  add_messageinfo("ResetParametersMessage");
130  unsigned char tmp_hash[] = {0x43, 0xfc, 0x3a, 0xa9, 0x15, 0x62, 0x32, 0x4c, 0x34, 0x54, 0x7d, 0xd4, 0xf, 0x20, 0x43, 0xcc};
131  set_hash(tmp_hash);
132 }
133 
134 /** Destructor */
135 NavigatorInterface::~NavigatorInterface()
136 {
137  free(data_ptr);
138 }
139 /** Convert DriveMode constant to string.
140  * @param value value to convert to string
141  * @return constant value as string.
142  */
143 const char *
145 {
146  switch (value) {
147  case MovingNotAllowed: return "MovingNotAllowed";
148  case Forward: return "Forward";
149  case AllowBackward: return "AllowBackward";
150  case Backward: return "Backward";
151  case ESCAPE: return "ESCAPE";
152  default: return "UNKNOWN";
153  }
154 }
155 /** Convert OrientationMode constant to string.
156  * @param value value to convert to string
157  * @return constant value as string.
158  */
159 const char *
161 {
162  switch (value) {
163  case OrientAtTarget: return "OrientAtTarget";
164  case OrientDuringTravel: return "OrientDuringTravel";
165  default: return "UNKNOWN";
166  }
167 }
168 /* Methods */
169 /** Get flags value.
170  * Bit-wise combination of
171  FLAG_* constants denoting navigator component features.
172  * @return flags value
173  */
174 uint32_t
176 {
177  return data->flags;
178 }
179 
180 /** Get maximum length of flags value.
181  * @return length of flags value, can be length of the array or number of
182  * maximum number of characters for a string
183  */
184 size_t
186 {
187  return 1;
188 }
189 
190 /** Set flags value.
191  * Bit-wise combination of
192  FLAG_* constants denoting navigator component features.
193  * @param new_flags new flags value
194  */
195 void
196 NavigatorInterface::set_flags(const uint32_t new_flags)
197 {
198  data->flags = new_flags;
199  data_changed = true;
200 }
201 
202 /** Get x value.
203  * Current X-coordinate in the navigator coordinate system.
204  * @return x value
205  */
206 float
208 {
209  return data->x;
210 }
211 
212 /** Get maximum length of x value.
213  * @return length of x value, can be length of the array or number of
214  * maximum number of characters for a string
215  */
216 size_t
218 {
219  return 1;
220 }
221 
222 /** Set x value.
223  * Current X-coordinate in the navigator coordinate system.
224  * @param new_x new x value
225  */
226 void
227 NavigatorInterface::set_x(const float new_x)
228 {
229  data->x = new_x;
230  data_changed = true;
231 }
232 
233 /** Get y value.
234  * Current Y-coordinate in the navigator coordinate system.
235  * @return y value
236  */
237 float
239 {
240  return data->y;
241 }
242 
243 /** Get maximum length of y value.
244  * @return length of y value, can be length of the array or number of
245  * maximum number of characters for a string
246  */
247 size_t
249 {
250  return 1;
251 }
252 
253 /** Set y value.
254  * Current Y-coordinate in the navigator coordinate system.
255  * @param new_y new y value
256  */
257 void
258 NavigatorInterface::set_y(const float new_y)
259 {
260  data->y = new_y;
261  data_changed = true;
262 }
263 
264 /** Get dest_x value.
265  * X-coordinate of the current destination, or 0.0 if no target has been set.
266  * @return dest_x value
267  */
268 float
270 {
271  return data->dest_x;
272 }
273 
274 /** Get maximum length of dest_x value.
275  * @return length of dest_x value, can be length of the array or number of
276  * maximum number of characters for a string
277  */
278 size_t
280 {
281  return 1;
282 }
283 
284 /** Set dest_x value.
285  * X-coordinate of the current destination, or 0.0 if no target has been set.
286  * @param new_dest_x new dest_x value
287  */
288 void
289 NavigatorInterface::set_dest_x(const float new_dest_x)
290 {
291  data->dest_x = new_dest_x;
292  data_changed = true;
293 }
294 
295 /** Get dest_y value.
296  * Y-coordinate of the current destination, or 0.0 if no target has been set.
297  * @return dest_y value
298  */
299 float
301 {
302  return data->dest_y;
303 }
304 
305 /** Get maximum length of dest_y value.
306  * @return length of dest_y value, can be length of the array or number of
307  * maximum number of characters for a string
308  */
309 size_t
311 {
312  return 1;
313 }
314 
315 /** Set dest_y value.
316  * Y-coordinate of the current destination, or 0.0 if no target has been set.
317  * @param new_dest_y new dest_y value
318  */
319 void
320 NavigatorInterface::set_dest_y(const float new_dest_y)
321 {
322  data->dest_y = new_dest_y;
323  data_changed = true;
324 }
325 
326 /** Get dest_ori value.
327  * Orientation of the current destination, or 0.0 if no target has been set.
328  * @return dest_ori value
329  */
330 float
332 {
333  return data->dest_ori;
334 }
335 
336 /** Get maximum length of dest_ori value.
337  * @return length of dest_ori value, can be length of the array or number of
338  * maximum number of characters for a string
339  */
340 size_t
342 {
343  return 1;
344 }
345 
346 /** Set dest_ori value.
347  * Orientation of the current destination, or 0.0 if no target has been set.
348  * @param new_dest_ori new dest_ori value
349  */
350 void
351 NavigatorInterface::set_dest_ori(const float new_dest_ori)
352 {
353  data->dest_ori = new_dest_ori;
354  data_changed = true;
355 }
356 
357 /** Get dest_dist value.
358  * Distance to destination in m.
359  * @return dest_dist value
360  */
361 float
363 {
364  return data->dest_dist;
365 }
366 
367 /** Get maximum length of dest_dist value.
368  * @return length of dest_dist value, can be length of the array or number of
369  * maximum number of characters for a string
370  */
371 size_t
373 {
374  return 1;
375 }
376 
377 /** Set dest_dist value.
378  * Distance to destination in m.
379  * @param new_dest_dist new dest_dist value
380  */
381 void
382 NavigatorInterface::set_dest_dist(const float new_dest_dist)
383 {
384  data->dest_dist = new_dest_dist;
385  data_changed = true;
386 }
387 
388 /** Get msgid value.
389  * The ID of the message that is currently being
390  processed, or 0 if no message is being processed.
391  * @return msgid value
392  */
393 uint32_t
395 {
396  return data->msgid;
397 }
398 
399 /** Get maximum length of msgid value.
400  * @return length of msgid value, can be length of the array or number of
401  * maximum number of characters for a string
402  */
403 size_t
405 {
406  return 1;
407 }
408 
409 /** Set msgid value.
410  * The ID of the message that is currently being
411  processed, or 0 if no message is being processed.
412  * @param new_msgid new msgid value
413  */
414 void
415 NavigatorInterface::set_msgid(const uint32_t new_msgid)
416 {
417  data->msgid = new_msgid;
418  data_changed = true;
419 }
420 
421 /** Get final value.
422  * True, if the last goto command has been finished,
423  false if it is still running
424  * @return final value
425  */
426 bool
428 {
429  return data->final;
430 }
431 
432 /** Get maximum length of final value.
433  * @return length of final value, can be length of the array or number of
434  * maximum number of characters for a string
435  */
436 size_t
438 {
439  return 1;
440 }
441 
442 /** Set final value.
443  * True, if the last goto command has been finished,
444  false if it is still running
445  * @param new_final new final value
446  */
447 void
448 NavigatorInterface::set_final(const bool new_final)
449 {
450  data->final = new_final;
451  data_changed = true;
452 }
453 
454 /** Get error_code value.
455  * Failure code set if
456  final is true. 0 if no error occured, an error code from ERROR_*
457  constants otherwise (or a bit-wise combination).
458  * @return error_code value
459  */
460 uint32_t
462 {
463  return data->error_code;
464 }
465 
466 /** Get maximum length of error_code value.
467  * @return length of error_code value, can be length of the array or number of
468  * maximum number of characters for a string
469  */
470 size_t
472 {
473  return 1;
474 }
475 
476 /** Set error_code value.
477  * Failure code set if
478  final is true. 0 if no error occured, an error code from ERROR_*
479  constants otherwise (or a bit-wise combination).
480  * @param new_error_code new error_code value
481  */
482 void
483 NavigatorInterface::set_error_code(const uint32_t new_error_code)
484 {
485  data->error_code = new_error_code;
486  data_changed = true;
487 }
488 
489 /** Get max_velocity value.
490  * Maximum velocity
491  * @return max_velocity value
492  */
493 float
495 {
496  return data->max_velocity;
497 }
498 
499 /** Get maximum length of max_velocity value.
500  * @return length of max_velocity value, can be length of the array or number of
501  * maximum number of characters for a string
502  */
503 size_t
505 {
506  return 1;
507 }
508 
509 /** Set max_velocity value.
510  * Maximum velocity
511  * @param new_max_velocity new max_velocity value
512  */
513 void
514 NavigatorInterface::set_max_velocity(const float new_max_velocity)
515 {
516  data->max_velocity = new_max_velocity;
517  data_changed = true;
518 }
519 
520 /** Get max_rotation value.
521  * Maximum rotation velocity
522  * @return max_rotation value
523  */
524 float
526 {
527  return data->max_rotation;
528 }
529 
530 /** Get maximum length of max_rotation value.
531  * @return length of max_rotation value, can be length of the array or number of
532  * maximum number of characters for a string
533  */
534 size_t
536 {
537  return 1;
538 }
539 
540 /** Set max_rotation value.
541  * Maximum rotation velocity
542  * @param new_max_rotation new max_rotation value
543  */
544 void
545 NavigatorInterface::set_max_rotation(const float new_max_rotation)
546 {
547  data->max_rotation = new_max_rotation;
548  data_changed = true;
549 }
550 
551 /** Get security_distance value.
552  * Security distance to keep to obstacles
553  * @return security_distance value
554  */
555 float
557 {
558  return data->security_distance;
559 }
560 
561 /** Get maximum length of security_distance value.
562  * @return length of security_distance value, can be length of the array or number of
563  * maximum number of characters for a string
564  */
565 size_t
567 {
568  return 1;
569 }
570 
571 /** Set security_distance value.
572  * Security distance to keep to obstacles
573  * @param new_security_distance new security_distance value
574  */
575 void
576 NavigatorInterface::set_security_distance(const float new_security_distance)
577 {
578  data->security_distance = new_security_distance;
579  data_changed = true;
580 }
581 
582 /** Get escaping_enabled value.
583  * This is used for navigation components with integrated collision avoidance,
584  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
585  * @return escaping_enabled value
586  */
587 bool
589 {
590  return data->escaping_enabled;
591 }
592 
593 /** Get maximum length of escaping_enabled value.
594  * @return length of escaping_enabled value, can be length of the array or number of
595  * maximum number of characters for a string
596  */
597 size_t
599 {
600  return 1;
601 }
602 
603 /** Set escaping_enabled value.
604  * This is used for navigation components with integrated collision avoidance,
605  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
606  * @param new_escaping_enabled new escaping_enabled value
607  */
608 void
609 NavigatorInterface::set_escaping_enabled(const bool new_escaping_enabled)
610 {
611  data->escaping_enabled = new_escaping_enabled;
612  data_changed = true;
613 }
614 
615 /** Get drive_mode value.
616  * Current drive mode
617  * @return drive_mode value
618  */
621 {
622  return (NavigatorInterface::DriveMode)data->drive_mode;
623 }
624 
625 /** Get maximum length of drive_mode value.
626  * @return length of drive_mode value, can be length of the array or number of
627  * maximum number of characters for a string
628  */
629 size_t
631 {
632  return 1;
633 }
634 
635 /** Set drive_mode value.
636  * Current drive mode
637  * @param new_drive_mode new drive_mode value
638  */
639 void
641 {
642  data->drive_mode = new_drive_mode;
643  data_changed = true;
644 }
645 
646 /** Get auto_drive_mode value.
647  * True, if the drive mode should be automatically decided each time.
648  False, if the drive mode should not automatically change, which is the case when sending
649  a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
650  * @return auto_drive_mode value
651  */
652 bool
654 {
655  return data->auto_drive_mode;
656 }
657 
658 /** Get maximum length of auto_drive_mode value.
659  * @return length of auto_drive_mode value, can be length of the array or number of
660  * maximum number of characters for a string
661  */
662 size_t
664 {
665  return 1;
666 }
667 
668 /** Set auto_drive_mode value.
669  * True, if the drive mode should be automatically decided each time.
670  False, if the drive mode should not automatically change, which is the case when sending
671  a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
672  * @param new_auto_drive_mode new auto_drive_mode value
673  */
674 void
675 NavigatorInterface::set_auto_drive_mode(const bool new_auto_drive_mode)
676 {
677  data->auto_drive_mode = new_auto_drive_mode;
678  data_changed = true;
679 }
680 
681 /** Get stop_at_target value.
682  * Stop when target is reached?
683  * @return stop_at_target value
684  */
685 bool
687 {
688  return data->stop_at_target;
689 }
690 
691 /** Get maximum length of stop_at_target value.
692  * @return length of stop_at_target value, can be length of the array or number of
693  * maximum number of characters for a string
694  */
695 size_t
697 {
698  return 1;
699 }
700 
701 /** Set stop_at_target value.
702  * Stop when target is reached?
703  * @param new_stop_at_target new stop_at_target value
704  */
705 void
706 NavigatorInterface::set_stop_at_target(const bool new_stop_at_target)
707 {
708  data->stop_at_target = new_stop_at_target;
709  data_changed = true;
710 }
711 
712 /** Get orientation_mode value.
713  * Mode how/when to orientate if orientation is given
714  * @return orientation_mode value
715  */
718 {
719  return (NavigatorInterface::OrientationMode)data->orientation_mode;
720 }
721 
722 /** Get maximum length of orientation_mode value.
723  * @return length of orientation_mode value, can be length of the array or number of
724  * maximum number of characters for a string
725  */
726 size_t
728 {
729  return 1;
730 }
731 
732 /** Set orientation_mode value.
733  * Mode how/when to orientate if orientation is given
734  * @param new_orientation_mode new orientation_mode value
735  */
736 void
738 {
739  data->orientation_mode = new_orientation_mode;
740  data_changed = true;
741 }
742 
743 /** Get target_frame value.
744  * The target frame to plan into
745  * @return target_frame value
746  */
747 char *
749 {
750  return data->target_frame;
751 }
752 
753 /** Get maximum length of target_frame value.
754  * @return length of target_frame value, can be length of the array or number of
755  * maximum number of characters for a string
756  */
757 size_t
759 {
760  return 64;
761 }
762 
763 /** Set target_frame value.
764  * The target frame to plan into
765  * @param new_target_frame new target_frame value
766  */
767 void
768 NavigatorInterface::set_target_frame(const char * new_target_frame)
769 {
770  strncpy(data->target_frame, new_target_frame, sizeof(data->target_frame)-1);
771  data->target_frame[sizeof(data->target_frame)-1] = 0;
772  data_changed = true;
773 }
774 
775 /* =========== message create =========== */
776 Message *
778 {
779  if ( strncmp("StopMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
780  return new StopMessage();
781  } else if ( strncmp("TurnMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
782  return new TurnMessage();
783  } else if ( strncmp("CartesianGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
784  return new CartesianGotoMessage();
785  } else if ( strncmp("CartesianGotoWithFrameMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
786  return new CartesianGotoWithFrameMessage();
787  } else if ( strncmp("PolarGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
788  return new PolarGotoMessage();
789  } else if ( strncmp("PlaceGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
790  return new PlaceGotoMessage();
791  } else if ( strncmp("PlaceWithOriGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
792  return new PlaceWithOriGotoMessage();
793  } else if ( strncmp("ObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
794  return new ObstacleMessage();
795  } else if ( strncmp("ResetOdometryMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
796  return new ResetOdometryMessage();
797  } else if ( strncmp("SetMaxVelocityMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
798  return new SetMaxVelocityMessage();
799  } else if ( strncmp("SetMaxRotationMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
800  return new SetMaxRotationMessage();
801  } else if ( strncmp("SetEscapingMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
802  return new SetEscapingMessage();
803  } else if ( strncmp("SetSecurityDistanceMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
804  return new SetSecurityDistanceMessage();
805  } else if ( strncmp("SetDriveModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
806  return new SetDriveModeMessage();
807  } else if ( strncmp("SetStopAtTargetMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
808  return new SetStopAtTargetMessage();
809  } else if ( strncmp("SetOrientationModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
810  return new SetOrientationModeMessage();
811  } else if ( strncmp("ResetParametersMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
812  return new ResetParametersMessage();
813  } else {
814  throw UnknownTypeException("The given type '%s' does not match any known "
815  "message type for this interface type.", type);
816  }
817 }
818 
819 
820 /** Copy values from other interface.
821  * @param other other interface to copy values from
822  */
823 void
825 {
826  const NavigatorInterface *oi = dynamic_cast<const NavigatorInterface *>(other);
827  if (oi == NULL) {
828  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
829  type(), other->type());
830  }
831  memcpy(data, oi->data, sizeof(NavigatorInterface_data_t));
832 }
833 
834 const char *
835 NavigatorInterface::enum_tostring(const char *enumtype, int val) const
836 {
837  if (strcmp(enumtype, "DriveMode") == 0) {
838  return tostring_DriveMode((DriveMode)val);
839  }
840  if (strcmp(enumtype, "OrientationMode") == 0) {
841  return tostring_OrientationMode((OrientationMode)val);
842  }
843  throw UnknownTypeException("Unknown enum type %s", enumtype);
844 }
845 
846 /* =========== messages =========== */
847 /** @class NavigatorInterface::StopMessage <interfaces/NavigatorInterface.h>
848  * StopMessage Fawkes BlackBoard Interface Message.
849  *
850 
851  */
852 
853 
854 /** Constructor with initial values.
855  * @param ini_msgid initial value for msgid
856  */
857 NavigatorInterface::StopMessage::StopMessage(const uint32_t ini_msgid) : Message("StopMessage")
858 {
859  data_size = sizeof(StopMessage_data_t);
860  data_ptr = malloc(data_size);
861  memset(data_ptr, 0, data_size);
862  data = (StopMessage_data_t *)data_ptr;
864  data->msgid = ini_msgid;
865  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
866  enum_map_DriveMode[(int)Forward] = "Forward";
867  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
868  enum_map_DriveMode[(int)Backward] = "Backward";
869  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
870  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
871  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
872  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
873 }
874 /** Constructor */
876 {
877  data_size = sizeof(StopMessage_data_t);
878  data_ptr = malloc(data_size);
879  memset(data_ptr, 0, data_size);
880  data = (StopMessage_data_t *)data_ptr;
882  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
883  enum_map_DriveMode[(int)Forward] = "Forward";
884  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
885  enum_map_DriveMode[(int)Backward] = "Backward";
886  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
887  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
888  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
889  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
890 }
891 
892 /** Destructor */
894 {
895  free(data_ptr);
896 }
897 
898 /** Copy constructor.
899  * @param m message to copy from
900  */
902 {
903  data_size = m->data_size;
904  data_ptr = malloc(data_size);
905  memcpy(data_ptr, m->data_ptr, data_size);
906  data = (StopMessage_data_t *)data_ptr;
908 }
909 
910 /* Methods */
911 /** Get msgid value.
912  *
913  If zero, stops any motion. If non-zero, the component shall only
914  stop the motion if the currently executed command was received
915  through a message with that specific ID.
916 
917  Use the specific version whenever possible. It avoids a race
918  condition if one intstructing component sends a stop, and
919  another a new drive command at the same time.
920 
921  * @return msgid value
922  */
923 uint32_t
925 {
926  return data->msgid;
927 }
928 
929 /** Get maximum length of msgid value.
930  * @return length of msgid value, can be length of the array or number of
931  * maximum number of characters for a string
932  */
933 size_t
935 {
936  return 1;
937 }
938 
939 /** Set msgid value.
940  *
941  If zero, stops any motion. If non-zero, the component shall only
942  stop the motion if the currently executed command was received
943  through a message with that specific ID.
944 
945  Use the specific version whenever possible. It avoids a race
946  condition if one intstructing component sends a stop, and
947  another a new drive command at the same time.
948 
949  * @param new_msgid new msgid value
950  */
951 void
953 {
954  data->msgid = new_msgid;
955 }
956 
957 /** Clone this message.
958  * Produces a message of the same type as this message and copies the
959  * data to the new message.
960  * @return clone of this message
961  */
962 Message *
964 {
965  return new NavigatorInterface::StopMessage(this);
966 }
967 /** @class NavigatorInterface::TurnMessage <interfaces/NavigatorInterface.h>
968  * TurnMessage Fawkes BlackBoard Interface Message.
969  *
970 
971  */
972 
973 
974 /** Constructor with initial values.
975  * @param ini_angle initial value for angle
976  * @param ini_velocity initial value for velocity
977  */
978 NavigatorInterface::TurnMessage::TurnMessage(const float ini_angle, const float ini_velocity) : Message("TurnMessage")
979 {
980  data_size = sizeof(TurnMessage_data_t);
981  data_ptr = malloc(data_size);
982  memset(data_ptr, 0, data_size);
983  data = (TurnMessage_data_t *)data_ptr;
985  data->angle = ini_angle;
986  data->velocity = ini_velocity;
987  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
988  enum_map_DriveMode[(int)Forward] = "Forward";
989  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
990  enum_map_DriveMode[(int)Backward] = "Backward";
991  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
992  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
993  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
994  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
995  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
996 }
997 /** Constructor */
999 {
1000  data_size = sizeof(TurnMessage_data_t);
1001  data_ptr = malloc(data_size);
1002  memset(data_ptr, 0, data_size);
1003  data = (TurnMessage_data_t *)data_ptr;
1005  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1006  enum_map_DriveMode[(int)Forward] = "Forward";
1007  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1008  enum_map_DriveMode[(int)Backward] = "Backward";
1009  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1010  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1011  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1012  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
1013  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
1014 }
1015 
1016 /** Destructor */
1018 {
1019  free(data_ptr);
1020 }
1021 
1022 /** Copy constructor.
1023  * @param m message to copy from
1024  */
1026 {
1027  data_size = m->data_size;
1028  data_ptr = malloc(data_size);
1029  memcpy(data_ptr, m->data_ptr, data_size);
1030  data = (TurnMessage_data_t *)data_ptr;
1032 }
1033 
1034 /* Methods */
1035 /** Get angle value.
1036  * Angle of the turn.
1037  * @return angle value
1038  */
1039 float
1041 {
1042  return data->angle;
1043 }
1044 
1045 /** Get maximum length of angle value.
1046  * @return length of angle value, can be length of the array or number of
1047  * maximum number of characters for a string
1048  */
1049 size_t
1051 {
1052  return 1;
1053 }
1054 
1055 /** Set angle value.
1056  * Angle of the turn.
1057  * @param new_angle new angle value
1058  */
1059 void
1061 {
1062  data->angle = new_angle;
1063 }
1064 
1065 /** Get velocity value.
1066  * The desired turning velocity in rad/s,
1067  set to zero to use default value.
1068  * @return velocity value
1069  */
1070 float
1072 {
1073  return data->velocity;
1074 }
1075 
1076 /** Get maximum length of velocity value.
1077  * @return length of velocity value, can be length of the array or number of
1078  * maximum number of characters for a string
1079  */
1080 size_t
1082 {
1083  return 1;
1084 }
1085 
1086 /** Set velocity value.
1087  * The desired turning velocity in rad/s,
1088  set to zero to use default value.
1089  * @param new_velocity new velocity value
1090  */
1091 void
1093 {
1094  data->velocity = new_velocity;
1095 }
1096 
1097 /** Clone this message.
1098  * Produces a message of the same type as this message and copies the
1099  * data to the new message.
1100  * @return clone of this message
1101  */
1102 Message *
1104 {
1105  return new NavigatorInterface::TurnMessage(this);
1106 }
1107 /** @class NavigatorInterface::CartesianGotoMessage <interfaces/NavigatorInterface.h>
1108  * CartesianGotoMessage Fawkes BlackBoard Interface Message.
1109  *
1110 
1111  */
1112 
1113 
1114 /** Constructor with initial values.
1115  * @param ini_x initial value for x
1116  * @param ini_y initial value for y
1117  * @param ini_orientation initial value for orientation
1118  */
1119 NavigatorInterface::CartesianGotoMessage::CartesianGotoMessage(const float ini_x, const float ini_y, const float ini_orientation) : Message("CartesianGotoMessage")
1120 {
1121  data_size = sizeof(CartesianGotoMessage_data_t);
1122  data_ptr = malloc(data_size);
1123  memset(data_ptr, 0, data_size);
1124  data = (CartesianGotoMessage_data_t *)data_ptr;
1126  data->x = ini_x;
1127  data->y = ini_y;
1128  data->orientation = ini_orientation;
1129  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1130  enum_map_DriveMode[(int)Forward] = "Forward";
1131  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1132  enum_map_DriveMode[(int)Backward] = "Backward";
1133  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1134  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1135  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1136  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1137  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1138  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1139 }
1140 /** Constructor */
1142 {
1143  data_size = sizeof(CartesianGotoMessage_data_t);
1144  data_ptr = malloc(data_size);
1145  memset(data_ptr, 0, data_size);
1146  data = (CartesianGotoMessage_data_t *)data_ptr;
1148  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1149  enum_map_DriveMode[(int)Forward] = "Forward";
1150  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1151  enum_map_DriveMode[(int)Backward] = "Backward";
1152  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1153  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1154  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1155  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1156  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1157  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1158 }
1159 
1160 /** Destructor */
1162 {
1163  free(data_ptr);
1164 }
1165 
1166 /** Copy constructor.
1167  * @param m message to copy from
1168  */
1170 {
1171  data_size = m->data_size;
1172  data_ptr = malloc(data_size);
1173  memcpy(data_ptr, m->data_ptr, data_size);
1174  data = (CartesianGotoMessage_data_t *)data_ptr;
1176 }
1177 
1178 /* Methods */
1179 /** Get x value.
1180  * X-coordinate of the target, in the robot's coordinate system.
1181  * @return x value
1182  */
1183 float
1185 {
1186  return data->x;
1187 }
1188 
1189 /** Get maximum length of x value.
1190  * @return length of x value, can be length of the array or number of
1191  * maximum number of characters for a string
1192  */
1193 size_t
1195 {
1196  return 1;
1197 }
1198 
1199 /** Set x value.
1200  * X-coordinate of the target, in the robot's coordinate system.
1201  * @param new_x new x value
1202  */
1203 void
1205 {
1206  data->x = new_x;
1207 }
1208 
1209 /** Get y value.
1210  * Y-coordinate of the target, in the robot's coordinate system.
1211  * @return y value
1212  */
1213 float
1215 {
1216  return data->y;
1217 }
1218 
1219 /** Get maximum length of y value.
1220  * @return length of y value, can be length of the array or number of
1221  * maximum number of characters for a string
1222  */
1223 size_t
1225 {
1226  return 1;
1227 }
1228 
1229 /** Set y value.
1230  * Y-coordinate of the target, in the robot's coordinate system.
1231  * @param new_y new y value
1232  */
1233 void
1235 {
1236  data->y = new_y;
1237 }
1238 
1239 /** Get orientation value.
1240  * The desired orientation of the robot at the target.
1241  * @return orientation value
1242  */
1243 float
1245 {
1246  return data->orientation;
1247 }
1248 
1249 /** Get maximum length of orientation value.
1250  * @return length of orientation value, can be length of the array or number of
1251  * maximum number of characters for a string
1252  */
1253 size_t
1255 {
1256  return 1;
1257 }
1258 
1259 /** Set orientation value.
1260  * The desired orientation of the robot at the target.
1261  * @param new_orientation new orientation value
1262  */
1263 void
1265 {
1266  data->orientation = new_orientation;
1267 }
1268 
1269 /** Clone this message.
1270  * Produces a message of the same type as this message and copies the
1271  * data to the new message.
1272  * @return clone of this message
1273  */
1274 Message *
1276 {
1278 }
1279 /** @class NavigatorInterface::CartesianGotoWithFrameMessage <interfaces/NavigatorInterface.h>
1280  * CartesianGotoWithFrameMessage Fawkes BlackBoard Interface Message.
1281  *
1282 
1283  */
1284 
1285 
1286 /** Constructor with initial values.
1287  * @param ini_x initial value for x
1288  * @param ini_y initial value for y
1289  * @param ini_orientation initial value for orientation
1290  * @param ini_target_frame initial value for target_frame
1291  */
1292 NavigatorInterface::CartesianGotoWithFrameMessage::CartesianGotoWithFrameMessage(const float ini_x, const float ini_y, const float ini_orientation, const char * ini_target_frame) : Message("CartesianGotoWithFrameMessage")
1293 {
1294  data_size = sizeof(CartesianGotoWithFrameMessage_data_t);
1295  data_ptr = malloc(data_size);
1296  memset(data_ptr, 0, data_size);
1297  data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1299  data->x = ini_x;
1300  data->y = ini_y;
1301  data->orientation = ini_orientation;
1302  strncpy(data->target_frame, ini_target_frame, 64-1);
1303  data->target_frame[64-1] = 0;
1304  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1305  enum_map_DriveMode[(int)Forward] = "Forward";
1306  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1307  enum_map_DriveMode[(int)Backward] = "Backward";
1308  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1309  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1310  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1311  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1312  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1313  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1314  add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1315 }
1316 /** Constructor */
1318 {
1319  data_size = sizeof(CartesianGotoWithFrameMessage_data_t);
1320  data_ptr = malloc(data_size);
1321  memset(data_ptr, 0, data_size);
1322  data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1324  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1325  enum_map_DriveMode[(int)Forward] = "Forward";
1326  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1327  enum_map_DriveMode[(int)Backward] = "Backward";
1328  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1329  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1330  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1331  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1332  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1333  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1334  add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1335 }
1336 
1337 /** Destructor */
1339 {
1340  free(data_ptr);
1341 }
1342 
1343 /** Copy constructor.
1344  * @param m message to copy from
1345  */
1347 {
1348  data_size = m->data_size;
1349  data_ptr = malloc(data_size);
1350  memcpy(data_ptr, m->data_ptr, data_size);
1351  data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1353 }
1354 
1355 /* Methods */
1356 /** Get x value.
1357  * X-coordinate of the target, in the robot's coordinate system.
1358  * @return x value
1359  */
1360 float
1362 {
1363  return data->x;
1364 }
1365 
1366 /** Get maximum length of x value.
1367  * @return length of x value, can be length of the array or number of
1368  * maximum number of characters for a string
1369  */
1370 size_t
1372 {
1373  return 1;
1374 }
1375 
1376 /** Set x value.
1377  * X-coordinate of the target, in the robot's coordinate system.
1378  * @param new_x new x value
1379  */
1380 void
1382 {
1383  data->x = new_x;
1384 }
1385 
1386 /** Get y value.
1387  * Y-coordinate of the target, in the robot's coordinate system.
1388  * @return y value
1389  */
1390 float
1392 {
1393  return data->y;
1394 }
1395 
1396 /** Get maximum length of y value.
1397  * @return length of y value, can be length of the array or number of
1398  * maximum number of characters for a string
1399  */
1400 size_t
1402 {
1403  return 1;
1404 }
1405 
1406 /** Set y value.
1407  * Y-coordinate of the target, in the robot's coordinate system.
1408  * @param new_y new y value
1409  */
1410 void
1412 {
1413  data->y = new_y;
1414 }
1415 
1416 /** Get orientation value.
1417  * The desired orientation of the robot at the target.
1418  * @return orientation value
1419  */
1420 float
1422 {
1423  return data->orientation;
1424 }
1425 
1426 /** Get maximum length of orientation value.
1427  * @return length of orientation value, can be length of the array or number of
1428  * maximum number of characters for a string
1429  */
1430 size_t
1432 {
1433  return 1;
1434 }
1435 
1436 /** Set orientation value.
1437  * The desired orientation of the robot at the target.
1438  * @param new_orientation new orientation value
1439  */
1440 void
1442 {
1443  data->orientation = new_orientation;
1444 }
1445 
1446 /** Get target_frame value.
1447  * The target frame to plan in.
1448  * @return target_frame value
1449  */
1450 char *
1452 {
1453  return data->target_frame;
1454 }
1455 
1456 /** Get maximum length of target_frame value.
1457  * @return length of target_frame value, can be length of the array or number of
1458  * maximum number of characters for a string
1459  */
1460 size_t
1462 {
1463  return 64;
1464 }
1465 
1466 /** Set target_frame value.
1467  * The target frame to plan in.
1468  * @param new_target_frame new target_frame value
1469  */
1470 void
1472 {
1473  strncpy(data->target_frame, new_target_frame, sizeof(data->target_frame)-1);
1474  data->target_frame[sizeof(data->target_frame)-1] = 0;
1475 }
1476 
1477 /** Clone this message.
1478  * Produces a message of the same type as this message and copies the
1479  * data to the new message.
1480  * @return clone of this message
1481  */
1482 Message *
1484 {
1486 }
1487 /** @class NavigatorInterface::PolarGotoMessage <interfaces/NavigatorInterface.h>
1488  * PolarGotoMessage Fawkes BlackBoard Interface Message.
1489  *
1490 
1491  */
1492 
1493 
1494 /** Constructor with initial values.
1495  * @param ini_phi initial value for phi
1496  * @param ini_dist initial value for dist
1497  * @param ini_orientation initial value for orientation
1498  */
1499 NavigatorInterface::PolarGotoMessage::PolarGotoMessage(const float ini_phi, const float ini_dist, const float ini_orientation) : Message("PolarGotoMessage")
1500 {
1501  data_size = sizeof(PolarGotoMessage_data_t);
1502  data_ptr = malloc(data_size);
1503  memset(data_ptr, 0, data_size);
1504  data = (PolarGotoMessage_data_t *)data_ptr;
1506  data->phi = ini_phi;
1507  data->dist = ini_dist;
1508  data->orientation = ini_orientation;
1509  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1510  enum_map_DriveMode[(int)Forward] = "Forward";
1511  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1512  enum_map_DriveMode[(int)Backward] = "Backward";
1513  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1514  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1515  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1516  add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
1517  add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
1518  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1519 }
1520 /** Constructor */
1522 {
1523  data_size = sizeof(PolarGotoMessage_data_t);
1524  data_ptr = malloc(data_size);
1525  memset(data_ptr, 0, data_size);
1526  data = (PolarGotoMessage_data_t *)data_ptr;
1528  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1529  enum_map_DriveMode[(int)Forward] = "Forward";
1530  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1531  enum_map_DriveMode[(int)Backward] = "Backward";
1532  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1533  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1534  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1535  add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
1536  add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
1537  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1538 }
1539 
1540 /** Destructor */
1542 {
1543  free(data_ptr);
1544 }
1545 
1546 /** Copy constructor.
1547  * @param m message to copy from
1548  */
1550 {
1551  data_size = m->data_size;
1552  data_ptr = malloc(data_size);
1553  memcpy(data_ptr, m->data_ptr, data_size);
1554  data = (PolarGotoMessage_data_t *)data_ptr;
1556 }
1557 
1558 /* Methods */
1559 /** Get phi value.
1560  * Angle between the robot's front and the target.
1561  * @return phi value
1562  */
1563 float
1565 {
1566  return data->phi;
1567 }
1568 
1569 /** Get maximum length of phi value.
1570  * @return length of phi value, can be length of the array or number of
1571  * maximum number of characters for a string
1572  */
1573 size_t
1575 {
1576  return 1;
1577 }
1578 
1579 /** Set phi value.
1580  * Angle between the robot's front and the target.
1581  * @param new_phi new phi value
1582  */
1583 void
1585 {
1586  data->phi = new_phi;
1587 }
1588 
1589 /** Get dist value.
1590  * Distance to the target.
1591  * @return dist value
1592  */
1593 float
1595 {
1596  return data->dist;
1597 }
1598 
1599 /** Get maximum length of dist value.
1600  * @return length of dist value, can be length of the array or number of
1601  * maximum number of characters for a string
1602  */
1603 size_t
1605 {
1606  return 1;
1607 }
1608 
1609 /** Set dist value.
1610  * Distance to the target.
1611  * @param new_dist new dist value
1612  */
1613 void
1615 {
1616  data->dist = new_dist;
1617 }
1618 
1619 /** Get orientation value.
1620  * The desired orientation of the robot at the target.
1621  * @return orientation value
1622  */
1623 float
1625 {
1626  return data->orientation;
1627 }
1628 
1629 /** Get maximum length of orientation value.
1630  * @return length of orientation value, can be length of the array or number of
1631  * maximum number of characters for a string
1632  */
1633 size_t
1635 {
1636  return 1;
1637 }
1638 
1639 /** Set orientation value.
1640  * The desired orientation of the robot at the target.
1641  * @param new_orientation new orientation value
1642  */
1643 void
1645 {
1646  data->orientation = new_orientation;
1647 }
1648 
1649 /** Clone this message.
1650  * Produces a message of the same type as this message and copies the
1651  * data to the new message.
1652  * @return clone of this message
1653  */
1654 Message *
1656 {
1657  return new NavigatorInterface::PolarGotoMessage(this);
1658 }
1659 /** @class NavigatorInterface::PlaceGotoMessage <interfaces/NavigatorInterface.h>
1660  * PlaceGotoMessage Fawkes BlackBoard Interface Message.
1661  *
1662 
1663  */
1664 
1665 
1666 /** Constructor with initial values.
1667  * @param ini_place initial value for place
1668  */
1669 NavigatorInterface::PlaceGotoMessage::PlaceGotoMessage(const char * ini_place) : Message("PlaceGotoMessage")
1670 {
1671  data_size = sizeof(PlaceGotoMessage_data_t);
1672  data_ptr = malloc(data_size);
1673  memset(data_ptr, 0, data_size);
1674  data = (PlaceGotoMessage_data_t *)data_ptr;
1676  strncpy(data->place, ini_place, 64-1);
1677  data->place[64-1] = 0;
1678  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1679  enum_map_DriveMode[(int)Forward] = "Forward";
1680  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1681  enum_map_DriveMode[(int)Backward] = "Backward";
1682  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1683  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1684  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1685  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1686 }
1687 /** Constructor */
1689 {
1690  data_size = sizeof(PlaceGotoMessage_data_t);
1691  data_ptr = malloc(data_size);
1692  memset(data_ptr, 0, data_size);
1693  data = (PlaceGotoMessage_data_t *)data_ptr;
1695  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1696  enum_map_DriveMode[(int)Forward] = "Forward";
1697  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1698  enum_map_DriveMode[(int)Backward] = "Backward";
1699  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1700  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1701  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1702  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1703 }
1704 
1705 /** Destructor */
1707 {
1708  free(data_ptr);
1709 }
1710 
1711 /** Copy constructor.
1712  * @param m message to copy from
1713  */
1715 {
1716  data_size = m->data_size;
1717  data_ptr = malloc(data_size);
1718  memcpy(data_ptr, m->data_ptr, data_size);
1719  data = (PlaceGotoMessage_data_t *)data_ptr;
1721 }
1722 
1723 /* Methods */
1724 /** Get place value.
1725  * Place to go to.
1726  * @return place value
1727  */
1728 char *
1730 {
1731  return data->place;
1732 }
1733 
1734 /** Get maximum length of place value.
1735  * @return length of place value, can be length of the array or number of
1736  * maximum number of characters for a string
1737  */
1738 size_t
1740 {
1741  return 64;
1742 }
1743 
1744 /** Set place value.
1745  * Place to go to.
1746  * @param new_place new place value
1747  */
1748 void
1750 {
1751  strncpy(data->place, new_place, sizeof(data->place)-1);
1752  data->place[sizeof(data->place)-1] = 0;
1753 }
1754 
1755 /** Clone this message.
1756  * Produces a message of the same type as this message and copies the
1757  * data to the new message.
1758  * @return clone of this message
1759  */
1760 Message *
1762 {
1763  return new NavigatorInterface::PlaceGotoMessage(this);
1764 }
1765 /** @class NavigatorInterface::PlaceWithOriGotoMessage <interfaces/NavigatorInterface.h>
1766  * PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
1767  *
1768 
1769  */
1770 
1771 
1772 /** Constructor with initial values.
1773  * @param ini_place initial value for place
1774  * @param ini_orientation initial value for orientation
1775  */
1776 NavigatorInterface::PlaceWithOriGotoMessage::PlaceWithOriGotoMessage(const char * ini_place, const float ini_orientation) : Message("PlaceWithOriGotoMessage")
1777 {
1778  data_size = sizeof(PlaceWithOriGotoMessage_data_t);
1779  data_ptr = malloc(data_size);
1780  memset(data_ptr, 0, data_size);
1781  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1783  strncpy(data->place, ini_place, 64-1);
1784  data->place[64-1] = 0;
1785  data->orientation = ini_orientation;
1786  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1787  enum_map_DriveMode[(int)Forward] = "Forward";
1788  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1789  enum_map_DriveMode[(int)Backward] = "Backward";
1790  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1791  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1792  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1793  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1794  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1795 }
1796 /** Constructor */
1798 {
1799  data_size = sizeof(PlaceWithOriGotoMessage_data_t);
1800  data_ptr = malloc(data_size);
1801  memset(data_ptr, 0, data_size);
1802  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1804  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1805  enum_map_DriveMode[(int)Forward] = "Forward";
1806  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1807  enum_map_DriveMode[(int)Backward] = "Backward";
1808  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1809  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1810  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1811  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1812  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1813 }
1814 
1815 /** Destructor */
1817 {
1818  free(data_ptr);
1819 }
1820 
1821 /** Copy constructor.
1822  * @param m message to copy from
1823  */
1825 {
1826  data_size = m->data_size;
1827  data_ptr = malloc(data_size);
1828  memcpy(data_ptr, m->data_ptr, data_size);
1829  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1831 }
1832 
1833 /* Methods */
1834 /** Get place value.
1835  * Place to go to.
1836  * @return place value
1837  */
1838 char *
1840 {
1841  return data->place;
1842 }
1843 
1844 /** Get maximum length of place value.
1845  * @return length of place value, can be length of the array or number of
1846  * maximum number of characters for a string
1847  */
1848 size_t
1850 {
1851  return 64;
1852 }
1853 
1854 /** Set place value.
1855  * Place to go to.
1856  * @param new_place new place value
1857  */
1858 void
1860 {
1861  strncpy(data->place, new_place, sizeof(data->place)-1);
1862  data->place[sizeof(data->place)-1] = 0;
1863 }
1864 
1865 /** Get orientation value.
1866  * The desired orientation of the robot at the target.
1867  * @return orientation value
1868  */
1869 float
1871 {
1872  return data->orientation;
1873 }
1874 
1875 /** Get maximum length of orientation value.
1876  * @return length of orientation value, can be length of the array or number of
1877  * maximum number of characters for a string
1878  */
1879 size_t
1881 {
1882  return 1;
1883 }
1884 
1885 /** Set orientation value.
1886  * The desired orientation of the robot at the target.
1887  * @param new_orientation new orientation value
1888  */
1889 void
1891 {
1892  data->orientation = new_orientation;
1893 }
1894 
1895 /** Clone this message.
1896  * Produces a message of the same type as this message and copies the
1897  * data to the new message.
1898  * @return clone of this message
1899  */
1900 Message *
1902 {
1904 }
1905 /** @class NavigatorInterface::ObstacleMessage <interfaces/NavigatorInterface.h>
1906  * ObstacleMessage Fawkes BlackBoard Interface Message.
1907  *
1908 
1909  */
1910 
1911 
1912 /** Constructor with initial values.
1913  * @param ini_x initial value for x
1914  * @param ini_y initial value for y
1915  * @param ini_width initial value for width
1916  */
1917 NavigatorInterface::ObstacleMessage::ObstacleMessage(const float ini_x, const float ini_y, const float ini_width) : Message("ObstacleMessage")
1918 {
1919  data_size = sizeof(ObstacleMessage_data_t);
1920  data_ptr = malloc(data_size);
1921  memset(data_ptr, 0, data_size);
1922  data = (ObstacleMessage_data_t *)data_ptr;
1924  data->x = ini_x;
1925  data->y = ini_y;
1926  data->width = ini_width;
1927  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1928  enum_map_DriveMode[(int)Forward] = "Forward";
1929  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1930  enum_map_DriveMode[(int)Backward] = "Backward";
1931  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1932  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1933  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1934  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1935  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1936  add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
1937 }
1938 /** Constructor */
1940 {
1941  data_size = sizeof(ObstacleMessage_data_t);
1942  data_ptr = malloc(data_size);
1943  memset(data_ptr, 0, data_size);
1944  data = (ObstacleMessage_data_t *)data_ptr;
1946  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1947  enum_map_DriveMode[(int)Forward] = "Forward";
1948  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1949  enum_map_DriveMode[(int)Backward] = "Backward";
1950  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1951  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1952  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1953  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1954  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1955  add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
1956 }
1957 
1958 /** Destructor */
1960 {
1961  free(data_ptr);
1962 }
1963 
1964 /** Copy constructor.
1965  * @param m message to copy from
1966  */
1968 {
1969  data_size = m->data_size;
1970  data_ptr = malloc(data_size);
1971  memcpy(data_ptr, m->data_ptr, data_size);
1972  data = (ObstacleMessage_data_t *)data_ptr;
1974 }
1975 
1976 /* Methods */
1977 /** Get x value.
1978  * X-coordinate of the obstacle.
1979  * @return x value
1980  */
1981 float
1983 {
1984  return data->x;
1985 }
1986 
1987 /** Get maximum length of x value.
1988  * @return length of x value, can be length of the array or number of
1989  * maximum number of characters for a string
1990  */
1991 size_t
1993 {
1994  return 1;
1995 }
1996 
1997 /** Set x value.
1998  * X-coordinate of the obstacle.
1999  * @param new_x new x value
2000  */
2001 void
2003 {
2004  data->x = new_x;
2005 }
2006 
2007 /** Get y value.
2008  * Y-coordinate of the obstacle.
2009  * @return y value
2010  */
2011 float
2013 {
2014  return data->y;
2015 }
2016 
2017 /** Get maximum length of y value.
2018  * @return length of y value, can be length of the array or number of
2019  * maximum number of characters for a string
2020  */
2021 size_t
2023 {
2024  return 1;
2025 }
2026 
2027 /** Set y value.
2028  * Y-coordinate of the obstacle.
2029  * @param new_y new y value
2030  */
2031 void
2033 {
2034  data->y = new_y;
2035 }
2036 
2037 /** Get width value.
2038  * Width of the obstacle.
2039  * @return width value
2040  */
2041 float
2043 {
2044  return data->width;
2045 }
2046 
2047 /** Get maximum length of width value.
2048  * @return length of width value, can be length of the array or number of
2049  * maximum number of characters for a string
2050  */
2051 size_t
2053 {
2054  return 1;
2055 }
2056 
2057 /** Set width value.
2058  * Width of the obstacle.
2059  * @param new_width new width value
2060  */
2061 void
2063 {
2064  data->width = new_width;
2065 }
2066 
2067 /** Clone this message.
2068  * Produces a message of the same type as this message and copies the
2069  * data to the new message.
2070  * @return clone of this message
2071  */
2072 Message *
2074 {
2075  return new NavigatorInterface::ObstacleMessage(this);
2076 }
2077 /** @class NavigatorInterface::ResetOdometryMessage <interfaces/NavigatorInterface.h>
2078  * ResetOdometryMessage Fawkes BlackBoard Interface Message.
2079  *
2080 
2081  */
2082 
2083 
2084 /** Constructor */
2086 {
2087  data_size = sizeof(ResetOdometryMessage_data_t);
2088  data_ptr = malloc(data_size);
2089  memset(data_ptr, 0, data_size);
2090  data = (ResetOdometryMessage_data_t *)data_ptr;
2092  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2093  enum_map_DriveMode[(int)Forward] = "Forward";
2094  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2095  enum_map_DriveMode[(int)Backward] = "Backward";
2096  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2097  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2098  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2099 }
2100 
2101 /** Destructor */
2103 {
2104  free(data_ptr);
2105 }
2106 
2107 /** Copy constructor.
2108  * @param m message to copy from
2109  */
2111 {
2112  data_size = m->data_size;
2113  data_ptr = malloc(data_size);
2114  memcpy(data_ptr, m->data_ptr, data_size);
2115  data = (ResetOdometryMessage_data_t *)data_ptr;
2117 }
2118 
2119 /* Methods */
2120 /** Clone this message.
2121  * Produces a message of the same type as this message and copies the
2122  * data to the new message.
2123  * @return clone of this message
2124  */
2125 Message *
2127 {
2129 }
2130 /** @class NavigatorInterface::SetMaxVelocityMessage <interfaces/NavigatorInterface.h>
2131  * SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
2132  *
2133 
2134  */
2135 
2136 
2137 /** Constructor with initial values.
2138  * @param ini_max_velocity initial value for max_velocity
2139  */
2140 NavigatorInterface::SetMaxVelocityMessage::SetMaxVelocityMessage(const float ini_max_velocity) : Message("SetMaxVelocityMessage")
2141 {
2142  data_size = sizeof(SetMaxVelocityMessage_data_t);
2143  data_ptr = malloc(data_size);
2144  memset(data_ptr, 0, data_size);
2145  data = (SetMaxVelocityMessage_data_t *)data_ptr;
2147  data->max_velocity = ini_max_velocity;
2148  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2149  enum_map_DriveMode[(int)Forward] = "Forward";
2150  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2151  enum_map_DriveMode[(int)Backward] = "Backward";
2152  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2153  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2154  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2155  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
2156 }
2157 /** Constructor */
2159 {
2160  data_size = sizeof(SetMaxVelocityMessage_data_t);
2161  data_ptr = malloc(data_size);
2162  memset(data_ptr, 0, data_size);
2163  data = (SetMaxVelocityMessage_data_t *)data_ptr;
2165  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2166  enum_map_DriveMode[(int)Forward] = "Forward";
2167  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2168  enum_map_DriveMode[(int)Backward] = "Backward";
2169  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2170  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2171  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2172  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
2173 }
2174 
2175 /** Destructor */
2177 {
2178  free(data_ptr);
2179 }
2180 
2181 /** Copy constructor.
2182  * @param m message to copy from
2183  */
2185 {
2186  data_size = m->data_size;
2187  data_ptr = malloc(data_size);
2188  memcpy(data_ptr, m->data_ptr, data_size);
2189  data = (SetMaxVelocityMessage_data_t *)data_ptr;
2191 }
2192 
2193 /* Methods */
2194 /** Get max_velocity value.
2195  * Maximum velocity
2196  * @return max_velocity value
2197  */
2198 float
2200 {
2201  return data->max_velocity;
2202 }
2203 
2204 /** Get maximum length of max_velocity value.
2205  * @return length of max_velocity value, can be length of the array or number of
2206  * maximum number of characters for a string
2207  */
2208 size_t
2210 {
2211  return 1;
2212 }
2213 
2214 /** Set max_velocity value.
2215  * Maximum velocity
2216  * @param new_max_velocity new max_velocity value
2217  */
2218 void
2220 {
2221  data->max_velocity = new_max_velocity;
2222 }
2223 
2224 /** Clone this message.
2225  * Produces a message of the same type as this message and copies the
2226  * data to the new message.
2227  * @return clone of this message
2228  */
2229 Message *
2231 {
2233 }
2234 /** @class NavigatorInterface::SetMaxRotationMessage <interfaces/NavigatorInterface.h>
2235  * SetMaxRotationMessage Fawkes BlackBoard Interface Message.
2236  *
2237 
2238  */
2239 
2240 
2241 /** Constructor with initial values.
2242  * @param ini_max_rotation initial value for max_rotation
2243  */
2244 NavigatorInterface::SetMaxRotationMessage::SetMaxRotationMessage(const float ini_max_rotation) : Message("SetMaxRotationMessage")
2245 {
2246  data_size = sizeof(SetMaxRotationMessage_data_t);
2247  data_ptr = malloc(data_size);
2248  memset(data_ptr, 0, data_size);
2249  data = (SetMaxRotationMessage_data_t *)data_ptr;
2251  data->max_rotation = ini_max_rotation;
2252  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2253  enum_map_DriveMode[(int)Forward] = "Forward";
2254  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2255  enum_map_DriveMode[(int)Backward] = "Backward";
2256  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2257  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2258  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2259  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
2260 }
2261 /** Constructor */
2263 {
2264  data_size = sizeof(SetMaxRotationMessage_data_t);
2265  data_ptr = malloc(data_size);
2266  memset(data_ptr, 0, data_size);
2267  data = (SetMaxRotationMessage_data_t *)data_ptr;
2269  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2270  enum_map_DriveMode[(int)Forward] = "Forward";
2271  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2272  enum_map_DriveMode[(int)Backward] = "Backward";
2273  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2274  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2275  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2276  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
2277 }
2278 
2279 /** Destructor */
2281 {
2282  free(data_ptr);
2283 }
2284 
2285 /** Copy constructor.
2286  * @param m message to copy from
2287  */
2289 {
2290  data_size = m->data_size;
2291  data_ptr = malloc(data_size);
2292  memcpy(data_ptr, m->data_ptr, data_size);
2293  data = (SetMaxRotationMessage_data_t *)data_ptr;
2295 }
2296 
2297 /* Methods */
2298 /** Get max_rotation value.
2299  * Maximum rotation velocity
2300  * @return max_rotation value
2301  */
2302 float
2304 {
2305  return data->max_rotation;
2306 }
2307 
2308 /** Get maximum length of max_rotation value.
2309  * @return length of max_rotation value, can be length of the array or number of
2310  * maximum number of characters for a string
2311  */
2312 size_t
2314 {
2315  return 1;
2316 }
2317 
2318 /** Set max_rotation value.
2319  * Maximum rotation velocity
2320  * @param new_max_rotation new max_rotation value
2321  */
2322 void
2324 {
2325  data->max_rotation = new_max_rotation;
2326 }
2327 
2328 /** Clone this message.
2329  * Produces a message of the same type as this message and copies the
2330  * data to the new message.
2331  * @return clone of this message
2332  */
2333 Message *
2335 {
2337 }
2338 /** @class NavigatorInterface::SetEscapingMessage <interfaces/NavigatorInterface.h>
2339  * SetEscapingMessage Fawkes BlackBoard Interface Message.
2340  *
2341 
2342  */
2343 
2344 
2345 /** Constructor with initial values.
2346  * @param ini_escaping_enabled initial value for escaping_enabled
2347  */
2348 NavigatorInterface::SetEscapingMessage::SetEscapingMessage(const bool ini_escaping_enabled) : Message("SetEscapingMessage")
2349 {
2350  data_size = sizeof(SetEscapingMessage_data_t);
2351  data_ptr = malloc(data_size);
2352  memset(data_ptr, 0, data_size);
2353  data = (SetEscapingMessage_data_t *)data_ptr;
2355  data->escaping_enabled = ini_escaping_enabled;
2356  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2357  enum_map_DriveMode[(int)Forward] = "Forward";
2358  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2359  enum_map_DriveMode[(int)Backward] = "Backward";
2360  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2361  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2362  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2363  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2364 }
2365 /** Constructor */
2367 {
2368  data_size = sizeof(SetEscapingMessage_data_t);
2369  data_ptr = malloc(data_size);
2370  memset(data_ptr, 0, data_size);
2371  data = (SetEscapingMessage_data_t *)data_ptr;
2373  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2374  enum_map_DriveMode[(int)Forward] = "Forward";
2375  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2376  enum_map_DriveMode[(int)Backward] = "Backward";
2377  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2378  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2379  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2380  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2381 }
2382 
2383 /** Destructor */
2385 {
2386  free(data_ptr);
2387 }
2388 
2389 /** Copy constructor.
2390  * @param m message to copy from
2391  */
2393 {
2394  data_size = m->data_size;
2395  data_ptr = malloc(data_size);
2396  memcpy(data_ptr, m->data_ptr, data_size);
2397  data = (SetEscapingMessage_data_t *)data_ptr;
2399 }
2400 
2401 /* Methods */
2402 /** Get escaping_enabled value.
2403  * This is used for navigation components with integrated collision avoidance,
2404  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2405  * @return escaping_enabled value
2406  */
2407 bool
2409 {
2410  return data->escaping_enabled;
2411 }
2412 
2413 /** Get maximum length of escaping_enabled value.
2414  * @return length of escaping_enabled value, can be length of the array or number of
2415  * maximum number of characters for a string
2416  */
2417 size_t
2419 {
2420  return 1;
2421 }
2422 
2423 /** Set escaping_enabled value.
2424  * This is used for navigation components with integrated collision avoidance,
2425  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2426  * @param new_escaping_enabled new escaping_enabled value
2427  */
2428 void
2430 {
2431  data->escaping_enabled = new_escaping_enabled;
2432 }
2433 
2434 /** Clone this message.
2435  * Produces a message of the same type as this message and copies the
2436  * data to the new message.
2437  * @return clone of this message
2438  */
2439 Message *
2441 {
2442  return new NavigatorInterface::SetEscapingMessage(this);
2443 }
2444 /** @class NavigatorInterface::SetSecurityDistanceMessage <interfaces/NavigatorInterface.h>
2445  * SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
2446  *
2447 
2448  */
2449 
2450 
2451 /** Constructor with initial values.
2452  * @param ini_security_distance initial value for security_distance
2453  */
2454 NavigatorInterface::SetSecurityDistanceMessage::SetSecurityDistanceMessage(const float ini_security_distance) : Message("SetSecurityDistanceMessage")
2455 {
2456  data_size = sizeof(SetSecurityDistanceMessage_data_t);
2457  data_ptr = malloc(data_size);
2458  memset(data_ptr, 0, data_size);
2459  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2461  data->security_distance = ini_security_distance;
2462  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2463  enum_map_DriveMode[(int)Forward] = "Forward";
2464  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2465  enum_map_DriveMode[(int)Backward] = "Backward";
2466  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2467  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2468  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2469  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2470 }
2471 /** Constructor */
2473 {
2474  data_size = sizeof(SetSecurityDistanceMessage_data_t);
2475  data_ptr = malloc(data_size);
2476  memset(data_ptr, 0, data_size);
2477  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2479  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2480  enum_map_DriveMode[(int)Forward] = "Forward";
2481  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2482  enum_map_DriveMode[(int)Backward] = "Backward";
2483  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2484  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2485  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2486  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2487 }
2488 
2489 /** Destructor */
2491 {
2492  free(data_ptr);
2493 }
2494 
2495 /** Copy constructor.
2496  * @param m message to copy from
2497  */
2499 {
2500  data_size = m->data_size;
2501  data_ptr = malloc(data_size);
2502  memcpy(data_ptr, m->data_ptr, data_size);
2503  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2505 }
2506 
2507 /* Methods */
2508 /** Get security_distance value.
2509  * Security distance to keep to obstacles
2510  * @return security_distance value
2511  */
2512 float
2514 {
2515  return data->security_distance;
2516 }
2517 
2518 /** Get maximum length of security_distance value.
2519  * @return length of security_distance value, can be length of the array or number of
2520  * maximum number of characters for a string
2521  */
2522 size_t
2524 {
2525  return 1;
2526 }
2527 
2528 /** Set security_distance value.
2529  * Security distance to keep to obstacles
2530  * @param new_security_distance new security_distance value
2531  */
2532 void
2534 {
2535  data->security_distance = new_security_distance;
2536 }
2537 
2538 /** Clone this message.
2539  * Produces a message of the same type as this message and copies the
2540  * data to the new message.
2541  * @return clone of this message
2542  */
2543 Message *
2545 {
2547 }
2548 /** @class NavigatorInterface::SetDriveModeMessage <interfaces/NavigatorInterface.h>
2549  * SetDriveModeMessage Fawkes BlackBoard Interface Message.
2550  *
2551 
2552  */
2553 
2554 
2555 /** Constructor with initial values.
2556  * @param ini_drive_mode initial value for drive_mode
2557  */
2559 {
2560  data_size = sizeof(SetDriveModeMessage_data_t);
2561  data_ptr = malloc(data_size);
2562  memset(data_ptr, 0, data_size);
2563  data = (SetDriveModeMessage_data_t *)data_ptr;
2565  data->drive_mode = ini_drive_mode;
2566  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2567  enum_map_DriveMode[(int)Forward] = "Forward";
2568  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2569  enum_map_DriveMode[(int)Backward] = "Backward";
2570  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2571  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2572  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2573  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
2574 }
2575 /** Constructor */
2577 {
2578  data_size = sizeof(SetDriveModeMessage_data_t);
2579  data_ptr = malloc(data_size);
2580  memset(data_ptr, 0, data_size);
2581  data = (SetDriveModeMessage_data_t *)data_ptr;
2583  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2584  enum_map_DriveMode[(int)Forward] = "Forward";
2585  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2586  enum_map_DriveMode[(int)Backward] = "Backward";
2587  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2588  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2589  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2590  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
2591 }
2592 
2593 /** Destructor */
2595 {
2596  free(data_ptr);
2597 }
2598 
2599 /** Copy constructor.
2600  * @param m message to copy from
2601  */
2603 {
2604  data_size = m->data_size;
2605  data_ptr = malloc(data_size);
2606  memcpy(data_ptr, m->data_ptr, data_size);
2607  data = (SetDriveModeMessage_data_t *)data_ptr;
2609 }
2610 
2611 /* Methods */
2612 /** Get drive_mode value.
2613  * Current drive mode
2614  * @return drive_mode value
2615  */
2618 {
2619  return (NavigatorInterface::DriveMode)data->drive_mode;
2620 }
2621 
2622 /** Get maximum length of drive_mode value.
2623  * @return length of drive_mode value, can be length of the array or number of
2624  * maximum number of characters for a string
2625  */
2626 size_t
2628 {
2629  return 1;
2630 }
2631 
2632 /** Set drive_mode value.
2633  * Current drive mode
2634  * @param new_drive_mode new drive_mode value
2635  */
2636 void
2638 {
2639  data->drive_mode = new_drive_mode;
2640 }
2641 
2642 /** Clone this message.
2643  * Produces a message of the same type as this message and copies the
2644  * data to the new message.
2645  * @return clone of this message
2646  */
2647 Message *
2649 {
2650  return new NavigatorInterface::SetDriveModeMessage(this);
2651 }
2652 /** @class NavigatorInterface::SetStopAtTargetMessage <interfaces/NavigatorInterface.h>
2653  * SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
2654  *
2655 
2656  */
2657 
2658 
2659 /** Constructor with initial values.
2660  * @param ini_stop_at_target initial value for stop_at_target
2661  */
2662 NavigatorInterface::SetStopAtTargetMessage::SetStopAtTargetMessage(const bool ini_stop_at_target) : Message("SetStopAtTargetMessage")
2663 {
2664  data_size = sizeof(SetStopAtTargetMessage_data_t);
2665  data_ptr = malloc(data_size);
2666  memset(data_ptr, 0, data_size);
2667  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2669  data->stop_at_target = ini_stop_at_target;
2670  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2671  enum_map_DriveMode[(int)Forward] = "Forward";
2672  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2673  enum_map_DriveMode[(int)Backward] = "Backward";
2674  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2675  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2676  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2677  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
2678 }
2679 /** Constructor */
2681 {
2682  data_size = sizeof(SetStopAtTargetMessage_data_t);
2683  data_ptr = malloc(data_size);
2684  memset(data_ptr, 0, data_size);
2685  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2687  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2688  enum_map_DriveMode[(int)Forward] = "Forward";
2689  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2690  enum_map_DriveMode[(int)Backward] = "Backward";
2691  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2692  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2693  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2694  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
2695 }
2696 
2697 /** Destructor */
2699 {
2700  free(data_ptr);
2701 }
2702 
2703 /** Copy constructor.
2704  * @param m message to copy from
2705  */
2707 {
2708  data_size = m->data_size;
2709  data_ptr = malloc(data_size);
2710  memcpy(data_ptr, m->data_ptr, data_size);
2711  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2713 }
2714 
2715 /* Methods */
2716 /** Get stop_at_target value.
2717  * Stop when target is reached?
2718  * @return stop_at_target value
2719  */
2720 bool
2722 {
2723  return data->stop_at_target;
2724 }
2725 
2726 /** Get maximum length of stop_at_target value.
2727  * @return length of stop_at_target value, can be length of the array or number of
2728  * maximum number of characters for a string
2729  */
2730 size_t
2732 {
2733  return 1;
2734 }
2735 
2736 /** Set stop_at_target value.
2737  * Stop when target is reached?
2738  * @param new_stop_at_target new stop_at_target value
2739  */
2740 void
2742 {
2743  data->stop_at_target = new_stop_at_target;
2744 }
2745 
2746 /** Clone this message.
2747  * Produces a message of the same type as this message and copies the
2748  * data to the new message.
2749  * @return clone of this message
2750  */
2751 Message *
2753 {
2755 }
2756 /** @class NavigatorInterface::SetOrientationModeMessage <interfaces/NavigatorInterface.h>
2757  * SetOrientationModeMessage Fawkes BlackBoard Interface Message.
2758  *
2759 
2760  */
2761 
2762 
2763 /** Constructor with initial values.
2764  * @param ini_orientation_mode initial value for orientation_mode
2765  */
2767 {
2768  data_size = sizeof(SetOrientationModeMessage_data_t);
2769  data_ptr = malloc(data_size);
2770  memset(data_ptr, 0, data_size);
2771  data = (SetOrientationModeMessage_data_t *)data_ptr;
2773  data->orientation_mode = ini_orientation_mode;
2774  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2775  enum_map_DriveMode[(int)Forward] = "Forward";
2776  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2777  enum_map_DriveMode[(int)Backward] = "Backward";
2778  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2779  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2780  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2781  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
2782 }
2783 /** Constructor */
2785 {
2786  data_size = sizeof(SetOrientationModeMessage_data_t);
2787  data_ptr = malloc(data_size);
2788  memset(data_ptr, 0, data_size);
2789  data = (SetOrientationModeMessage_data_t *)data_ptr;
2791  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2792  enum_map_DriveMode[(int)Forward] = "Forward";
2793  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2794  enum_map_DriveMode[(int)Backward] = "Backward";
2795  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2796  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2797  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2798  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
2799 }
2800 
2801 /** Destructor */
2803 {
2804  free(data_ptr);
2805 }
2806 
2807 /** Copy constructor.
2808  * @param m message to copy from
2809  */
2811 {
2812  data_size = m->data_size;
2813  data_ptr = malloc(data_size);
2814  memcpy(data_ptr, m->data_ptr, data_size);
2815  data = (SetOrientationModeMessage_data_t *)data_ptr;
2817 }
2818 
2819 /* Methods */
2820 /** Get orientation_mode value.
2821  * Mode how/when to orientate if orientation is given
2822  * @return orientation_mode value
2823  */
2826 {
2827  return (NavigatorInterface::OrientationMode)data->orientation_mode;
2828 }
2829 
2830 /** Get maximum length of orientation_mode value.
2831  * @return length of orientation_mode value, can be length of the array or number of
2832  * maximum number of characters for a string
2833  */
2834 size_t
2836 {
2837  return 1;
2838 }
2839 
2840 /** Set orientation_mode value.
2841  * Mode how/when to orientate if orientation is given
2842  * @param new_orientation_mode new orientation_mode value
2843  */
2844 void
2846 {
2847  data->orientation_mode = new_orientation_mode;
2848 }
2849 
2850 /** Clone this message.
2851  * Produces a message of the same type as this message and copies the
2852  * data to the new message.
2853  * @return clone of this message
2854  */
2855 Message *
2857 {
2859 }
2860 /** @class NavigatorInterface::ResetParametersMessage <interfaces/NavigatorInterface.h>
2861  * ResetParametersMessage Fawkes BlackBoard Interface Message.
2862  *
2863 
2864  */
2865 
2866 
2867 /** Constructor */
2869 {
2870  data_size = sizeof(ResetParametersMessage_data_t);
2871  data_ptr = malloc(data_size);
2872  memset(data_ptr, 0, data_size);
2873  data = (ResetParametersMessage_data_t *)data_ptr;
2875  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2876  enum_map_DriveMode[(int)Forward] = "Forward";
2877  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2878  enum_map_DriveMode[(int)Backward] = "Backward";
2879  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2880  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2881  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2882 }
2883 
2884 /** Destructor */
2886 {
2887  free(data_ptr);
2888 }
2889 
2890 /** Copy constructor.
2891  * @param m message to copy from
2892  */
2894 {
2895  data_size = m->data_size;
2896  data_ptr = malloc(data_size);
2897  memcpy(data_ptr, m->data_ptr, data_size);
2898  data = (ResetParametersMessage_data_t *)data_ptr;
2900 }
2901 
2902 /* Methods */
2903 /** Clone this message.
2904  * Produces a message of the same type as this message and copies the
2905  * data to the new message.
2906  * @return clone of this message
2907  */
2908 Message *
2910 {
2912 }
2913 /** Check if message is valid and can be enqueued.
2914  * @param message Message to check
2915  * @return true if the message is valid, false otherwise.
2916  */
2917 bool
2919 {
2920  const StopMessage *m0 = dynamic_cast<const StopMessage *>(message);
2921  if ( m0 != NULL ) {
2922  return true;
2923  }
2924  const TurnMessage *m1 = dynamic_cast<const TurnMessage *>(message);
2925  if ( m1 != NULL ) {
2926  return true;
2927  }
2928  const CartesianGotoMessage *m2 = dynamic_cast<const CartesianGotoMessage *>(message);
2929  if ( m2 != NULL ) {
2930  return true;
2931  }
2932  const CartesianGotoWithFrameMessage *m3 = dynamic_cast<const CartesianGotoWithFrameMessage *>(message);
2933  if ( m3 != NULL ) {
2934  return true;
2935  }
2936  const PolarGotoMessage *m4 = dynamic_cast<const PolarGotoMessage *>(message);
2937  if ( m4 != NULL ) {
2938  return true;
2939  }
2940  const PlaceGotoMessage *m5 = dynamic_cast<const PlaceGotoMessage *>(message);
2941  if ( m5 != NULL ) {
2942  return true;
2943  }
2944  const PlaceWithOriGotoMessage *m6 = dynamic_cast<const PlaceWithOriGotoMessage *>(message);
2945  if ( m6 != NULL ) {
2946  return true;
2947  }
2948  const ObstacleMessage *m7 = dynamic_cast<const ObstacleMessage *>(message);
2949  if ( m7 != NULL ) {
2950  return true;
2951  }
2952  const ResetOdometryMessage *m8 = dynamic_cast<const ResetOdometryMessage *>(message);
2953  if ( m8 != NULL ) {
2954  return true;
2955  }
2956  const SetMaxVelocityMessage *m9 = dynamic_cast<const SetMaxVelocityMessage *>(message);
2957  if ( m9 != NULL ) {
2958  return true;
2959  }
2960  const SetMaxRotationMessage *m10 = dynamic_cast<const SetMaxRotationMessage *>(message);
2961  if ( m10 != NULL ) {
2962  return true;
2963  }
2964  const SetEscapingMessage *m11 = dynamic_cast<const SetEscapingMessage *>(message);
2965  if ( m11 != NULL ) {
2966  return true;
2967  }
2968  const SetSecurityDistanceMessage *m12 = dynamic_cast<const SetSecurityDistanceMessage *>(message);
2969  if ( m12 != NULL ) {
2970  return true;
2971  }
2972  const SetDriveModeMessage *m13 = dynamic_cast<const SetDriveModeMessage *>(message);
2973  if ( m13 != NULL ) {
2974  return true;
2975  }
2976  const SetStopAtTargetMessage *m14 = dynamic_cast<const SetStopAtTargetMessage *>(message);
2977  if ( m14 != NULL ) {
2978  return true;
2979  }
2980  const SetOrientationModeMessage *m15 = dynamic_cast<const SetOrientationModeMessage *>(message);
2981  if ( m15 != NULL ) {
2982  return true;
2983  }
2984  const ResetParametersMessage *m16 = dynamic_cast<const ResetParametersMessage *>(message);
2985  if ( m16 != NULL ) {
2986  return true;
2987  }
2988  return false;
2989 }
2990 
2991 /// @cond INTERNALS
2992 EXPORT_INTERFACE(NavigatorInterface)
2993 /// @endcond
2994 
2995 
2996 } // end namespace fawkes
bool is_auto_drive_mode() const
Get auto_drive_mode value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
size_t maxlenof_phi() const
Get maximum length of phi value.
float max_velocity() const
Get max_velocity value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
size_t maxlenof_y() const
Get maximum length of y value.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:125
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.
Definition: message.h:41
size_t maxlenof_msgid() const
Get maximum length of msgid value.
void set_dist(const float new_dist)
Set dist value.
void set_angle(const float new_angle)
Set angle value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
size_t maxlenof_dist() const
Get maximum length of dist value.
virtual Message * clone() const
Clone this message.
float orientation() const
Get orientation value.
float velocity() const
Get velocity value.
virtual Message * clone() const
Clone this message.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
void set_hash(unsigned char *ihash)
Set hash.
Definition: interface.cpp:316
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
virtual Message * clone() const
Clone this message.
Fawkes library namespace.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
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.
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:130
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
OrientationMode
Orientation mode enum.
static const uint32_t ERROR_MOTOR
ERROR_MOTOR constant.
SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
bool is_escaping_enabled() const
Get escaping_enabled value.
virtual Message * clone() const
Clone this message.
void set_place(const char *new_place)
Set place value.
static const uint32_t FLAG_CART_GOTO
FLAG_CART_GOTO constant.
float max_rotation() const
Get max_rotation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
string field
Definition: types.h:48
virtual Message * create_message(const char *type) const
Create message based on type name.
PolarGotoMessage Fawkes BlackBoard Interface Message.
float max_velocity() const
Get max_velocity value.
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.
virtual Message * clone() const
Clone this message.
void set_orientation(const float new_orientation)
Set orientation value.
virtual Message * clone() const
Clone this message.
SetOrientationModeMessage Fawkes BlackBoard Interface Message.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:78
size_t maxlenof_dest_dist() const
Get maximum length of dest_dist value.
bool is_stop_at_target() const
Get stop_at_target value.
float dest_ori() const
Get dest_ori value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
void set_phi(const float new_phi)
Set phi value.
const char * tostring_DriveMode(DriveMode value) const
Convert DriveMode constant to string.
size_t maxlenof_y() const
Get maximum length of y value.
float orientation() const
Get orientation value.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
static const uint32_t FLAG_POLAR_GOTO
FLAG_POLAR_GOTO constant.
size_t maxlenof_x() const
Get maximum length of x value.
void set_security_distance(const float new_security_distance)
Set security_distance value.
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:135
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:126
SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
SetEscapingMessage Fawkes BlackBoard Interface Message.
OrientationMode orientation_mode() const
Get orientation_mode value.
virtual Message * clone() const
Clone this message.
Orient when at target, if orientation is given.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
void add_messageinfo(const char *name)
Add an entry to the message info list.
Definition: interface.cpp:375
void set_orientation(const float new_orientation)
Set orientation value.
float dest_y() const
Get dest_y value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
SetDriveModeMessage Fawkes BlackBoard Interface Message.
bool data_changed
Indicator if data has changed.
Definition: interface.h:226
DriveMode drive_mode() const
Get drive_mode value.
PlaceGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_final() const
Get maximum length of final value.
virtual Message * clone() const
Clone this message.
const char * type() const
Get type of interface.
Definition: interface.cpp:640
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:224
virtual Message * clone() const
Clone this message.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
bool is_final() const
Get final value.
SetMaxRotationMessage Fawkes BlackBoard Interface Message.
CartesianGotoMessage Fawkes BlackBoard Interface Message.
CartesianGotoWithFrameMessage Fawkes BlackBoard Interface Message.
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.
DriveMode drive_mode() const
Get drive_mode value.
void set_msgid(const uint32_t new_msgid)
Set 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.
size_t maxlenof_x() const
Get maximum length of x 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.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_y(const float new_y)
Set 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.
void set_width(const float new_width)
Set width value.
float security_distance() const
Get security_distance 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.
float field
Definition: types.h:46
virtual Message * clone() const
Clone this message.
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.
virtual Message * clone() const
Clone this message.
void set_dest_ori(const float new_dest_ori)
Set dest_ori value.
void set_orientation(const float new_orientation)
Set orientation value.
void set_y(const float new_y)
Set y value.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
TurnMessage Fawkes BlackBoard Interface Message.
void set_velocity(const float new_velocity)
Set velocity value.
float x() const
Get x value.
static const uint32_t FLAG_SECURITY_DISTANCE
FLAG_SECURITY_DISTANCE constant.
void set_security_distance(const float new_security_distance)
Set security_distance value.
void set_dest_dist(const float new_dest_dist)
Set dest_dist value.
void set_orientation(const float new_orientation)
Set orientation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
char * target_frame() const
Get target_frame value.
void set_dest_x(const float new_dest_x)
Set dest_x value.
size_t maxlenof_y() const
Get maximum length of y value.
uint32_t msgid() const
Get msgid value.
const char * tostring_OrientationMode(OrientationMode value) const
Convert OrientationMode constant to string.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
Indicating that the robot is at target and has to orient.
Definition: types.h:35
void set_target_frame(const char *new_target_frame)
Set target_frame value.
virtual Message * clone() const
Clone this message.
float dest_x() const
Get dest_x value.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
OrientationMode orientation_mode() const
Get orientation_mode value.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
virtual Message * clone() const
Clone this message.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_place() const
Get maximum length of place value.
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 add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
Definition: message.cpp:410
void set_x(const float new_x)
Set x value.
void set_dest_y(const float new_dest_y)
Set dest_y value.
boolean field
Definition: types.h:37
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.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
uint32_t msgid() const
Get msgid value.
size_t maxlenof_width() const
Get maximum length of width value.
void set_x(const float new_x)
Set x value.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
size_t maxlenof_flags() const
Get maximum length of flags value.
32 bit unsigned integer field
Definition: types.h:43
field with interface specific enum type
Definition: types.h:50
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode 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.
size_t maxlenof_place() const
Get maximum length of place value.
StopMessage Fawkes BlackBoard Interface Message.
NavigatorInterface Fawkes BlackBoard Interface.
float max_rotation() const
Get max_rotation value.
size_t maxlenof_angle() const
Get maximum length of angle value.