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
33namespace 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 */
55const uint32_t NavigatorInterface::ERROR_NONE = 0u;
56/** ERROR_MOTOR constant */
57const uint32_t NavigatorInterface::ERROR_MOTOR = 1u;
58/** ERROR_OBSTRUCTION constant */
60/** ERROR_UNKNOWN_PLACE constant */
62/** ERROR_PATH_GEN_FAIL constant */
64/** FLAG_NONE constant */
65const uint32_t NavigatorInterface::FLAG_NONE = 0u;
66/** FLAG_CART_GOTO constant */
67const uint32_t NavigatorInterface::FLAG_CART_GOTO = 1u;
68/** FLAG_POLAR_GOTO constant */
69const uint32_t NavigatorInterface::FLAG_POLAR_GOTO = 2u;
70/** FLAG_PLACE_GOTO constant */
71const uint32_t NavigatorInterface::FLAG_PLACE_GOTO = 4u;
72/** FLAG_UPDATES_DEST_DIST constant */
74/** FLAG_SECURITY_DISTANCE constant */
76/** FLAG_ESCAPING constant */
77const uint32_t NavigatorInterface::FLAG_ESCAPING = 32u;
78
79/** Constructor */
80NavigatorInterface::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("CartesianGotoWithToleranceMessage");
117 add_messageinfo("CartesianGotoWithFrameMessage");
118 add_messageinfo("CartesianGotoWithFrameWithToleranceMessage");
119 add_messageinfo("PolarGotoMessage");
120 add_messageinfo("PlaceGotoMessage");
121 add_messageinfo("PlaceWithOriGotoMessage");
122 add_messageinfo("ObstacleMessage");
123 add_messageinfo("ResetOdometryMessage");
124 add_messageinfo("SetMaxVelocityMessage");
125 add_messageinfo("SetMaxRotationMessage");
126 add_messageinfo("SetEscapingMessage");
127 add_messageinfo("SetSecurityDistanceMessage");
128 add_messageinfo("SetDriveModeMessage");
129 add_messageinfo("SetStopAtTargetMessage");
130 add_messageinfo("SetOrientationModeMessage");
131 add_messageinfo("ResetParametersMessage");
132 unsigned char tmp_hash[] = {0x5f, 0xf9, 0xaa, 0x1e, 0xb4, 0x6a, 0x4a, 0xa3, 0xe5, 0xe0, 0x2b, 0xbd, 0x73, 0x17, 0x66, 0xea};
133 set_hash(tmp_hash);
134}
135
136/** Destructor */
137NavigatorInterface::~NavigatorInterface()
138{
139 free(data_ptr);
140}
141/** Convert DriveMode constant to string.
142 * @param value value to convert to string
143 * @return constant value as string.
144 */
145const char *
146NavigatorInterface::tostring_DriveMode(DriveMode value) const
147{
148 switch (value) {
149 case MovingNotAllowed: return "MovingNotAllowed";
150 case Forward: return "Forward";
151 case AllowBackward: return "AllowBackward";
152 case Backward: return "Backward";
153 case ESCAPE: return "ESCAPE";
154 default: return "UNKNOWN";
155 }
156}
157/** Convert OrientationMode constant to string.
158 * @param value value to convert to string
159 * @return constant value as string.
160 */
161const char *
162NavigatorInterface::tostring_OrientationMode(OrientationMode value) const
163{
164 switch (value) {
165 case OrientAtTarget: return "OrientAtTarget";
166 case OrientDuringTravel: return "OrientDuringTravel";
167 default: return "UNKNOWN";
168 }
169}
170/* Methods */
171/** Get flags value.
172 * Bit-wise combination of
173 FLAG_* constants denoting navigator component features.
174 * @return flags value
175 */
176uint32_t
177NavigatorInterface::flags() const
178{
179 return data->flags;
180}
181
182/** Get maximum length of flags value.
183 * @return length of flags value, can be length of the array or number of
184 * maximum number of characters for a string
185 */
186size_t
187NavigatorInterface::maxlenof_flags() const
188{
189 return 1;
190}
191
192/** Set flags value.
193 * Bit-wise combination of
194 FLAG_* constants denoting navigator component features.
195 * @param new_flags new flags value
196 */
197void
198NavigatorInterface::set_flags(const uint32_t new_flags)
199{
200 set_field(data->flags, new_flags);
201}
202
203/** Get x value.
204 * Current X-coordinate in the navigator coordinate system.
205 * @return x value
206 */
207float
208NavigatorInterface::x() const
209{
210 return data->x;
211}
212
213/** Get maximum length of x value.
214 * @return length of x value, can be length of the array or number of
215 * maximum number of characters for a string
216 */
217size_t
218NavigatorInterface::maxlenof_x() const
219{
220 return 1;
221}
222
223/** Set x value.
224 * Current X-coordinate in the navigator coordinate system.
225 * @param new_x new x value
226 */
227void
228NavigatorInterface::set_x(const float new_x)
229{
230 set_field(data->x, new_x);
231}
232
233/** Get y value.
234 * Current Y-coordinate in the navigator coordinate system.
235 * @return y value
236 */
237float
238NavigatorInterface::y() const
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 */
247size_t
248NavigatorInterface::maxlenof_y() const
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 */
257void
258NavigatorInterface::set_y(const float new_y)
259{
260 set_field(data->y, new_y);
261}
262
263/** Get dest_x value.
264 * X-coordinate of the current destination, or 0.0 if no target has been set.
265 * @return dest_x value
266 */
267float
268NavigatorInterface::dest_x() const
269{
270 return data->dest_x;
271}
272
273/** Get maximum length of dest_x value.
274 * @return length of dest_x value, can be length of the array or number of
275 * maximum number of characters for a string
276 */
277size_t
278NavigatorInterface::maxlenof_dest_x() const
279{
280 return 1;
281}
282
283/** Set dest_x value.
284 * X-coordinate of the current destination, or 0.0 if no target has been set.
285 * @param new_dest_x new dest_x value
286 */
287void
288NavigatorInterface::set_dest_x(const float new_dest_x)
289{
290 set_field(data->dest_x, new_dest_x);
291}
292
293/** Get dest_y value.
294 * Y-coordinate of the current destination, or 0.0 if no target has been set.
295 * @return dest_y value
296 */
297float
298NavigatorInterface::dest_y() const
299{
300 return data->dest_y;
301}
302
303/** Get maximum length of dest_y value.
304 * @return length of dest_y value, can be length of the array or number of
305 * maximum number of characters for a string
306 */
307size_t
308NavigatorInterface::maxlenof_dest_y() const
309{
310 return 1;
311}
312
313/** Set dest_y value.
314 * Y-coordinate of the current destination, or 0.0 if no target has been set.
315 * @param new_dest_y new dest_y value
316 */
317void
318NavigatorInterface::set_dest_y(const float new_dest_y)
319{
320 set_field(data->dest_y, new_dest_y);
321}
322
323/** Get dest_ori value.
324 * Orientation of the current destination, or 0.0 if no target has been set.
325 * @return dest_ori value
326 */
327float
328NavigatorInterface::dest_ori() const
329{
330 return data->dest_ori;
331}
332
333/** Get maximum length of dest_ori value.
334 * @return length of dest_ori value, can be length of the array or number of
335 * maximum number of characters for a string
336 */
337size_t
338NavigatorInterface::maxlenof_dest_ori() const
339{
340 return 1;
341}
342
343/** Set dest_ori value.
344 * Orientation of the current destination, or 0.0 if no target has been set.
345 * @param new_dest_ori new dest_ori value
346 */
347void
348NavigatorInterface::set_dest_ori(const float new_dest_ori)
349{
350 set_field(data->dest_ori, new_dest_ori);
351}
352
353/** Get dest_dist value.
354 * Distance to destination in m.
355 * @return dest_dist value
356 */
357float
358NavigatorInterface::dest_dist() const
359{
360 return data->dest_dist;
361}
362
363/** Get maximum length of dest_dist value.
364 * @return length of dest_dist value, can be length of the array or number of
365 * maximum number of characters for a string
366 */
367size_t
368NavigatorInterface::maxlenof_dest_dist() const
369{
370 return 1;
371}
372
373/** Set dest_dist value.
374 * Distance to destination in m.
375 * @param new_dest_dist new dest_dist value
376 */
377void
378NavigatorInterface::set_dest_dist(const float new_dest_dist)
379{
380 set_field(data->dest_dist, new_dest_dist);
381}
382
383/** Get msgid value.
384 * The ID of the message that is currently being
385 processed, or 0 if no message is being processed.
386 * @return msgid value
387 */
388uint32_t
389NavigatorInterface::msgid() const
390{
391 return data->msgid;
392}
393
394/** Get maximum length of msgid value.
395 * @return length of msgid value, can be length of the array or number of
396 * maximum number of characters for a string
397 */
398size_t
399NavigatorInterface::maxlenof_msgid() const
400{
401 return 1;
402}
403
404/** Set msgid value.
405 * The ID of the message that is currently being
406 processed, or 0 if no message is being processed.
407 * @param new_msgid new msgid value
408 */
409void
410NavigatorInterface::set_msgid(const uint32_t new_msgid)
411{
412 set_field(data->msgid, new_msgid);
413}
414
415/** Get final value.
416 * True, if the last goto command has been finished,
417 false if it is still running
418 * @return final value
419 */
420bool
421NavigatorInterface::is_final() const
422{
423 return data->final;
424}
425
426/** Get maximum length of final value.
427 * @return length of final value, can be length of the array or number of
428 * maximum number of characters for a string
429 */
430size_t
431NavigatorInterface::maxlenof_final() const
432{
433 return 1;
434}
435
436/** Set final value.
437 * True, if the last goto command has been finished,
438 false if it is still running
439 * @param new_final new final value
440 */
441void
442NavigatorInterface::set_final(const bool new_final)
443{
444 set_field(data->final, new_final);
445}
446
447/** Get error_code value.
448 * Failure code set if
449 final is true. 0 if no error occured, an error code from ERROR_*
450 constants otherwise (or a bit-wise combination).
451 * @return error_code value
452 */
453uint32_t
454NavigatorInterface::error_code() const
455{
456 return data->error_code;
457}
458
459/** Get maximum length of error_code value.
460 * @return length of error_code value, can be length of the array or number of
461 * maximum number of characters for a string
462 */
463size_t
464NavigatorInterface::maxlenof_error_code() const
465{
466 return 1;
467}
468
469/** Set error_code value.
470 * Failure code set if
471 final is true. 0 if no error occured, an error code from ERROR_*
472 constants otherwise (or a bit-wise combination).
473 * @param new_error_code new error_code value
474 */
475void
476NavigatorInterface::set_error_code(const uint32_t new_error_code)
477{
478 set_field(data->error_code, new_error_code);
479}
480
481/** Get max_velocity value.
482 * Maximum velocity
483 * @return max_velocity value
484 */
485float
486NavigatorInterface::max_velocity() const
487{
488 return data->max_velocity;
489}
490
491/** Get maximum length of max_velocity value.
492 * @return length of max_velocity value, can be length of the array or number of
493 * maximum number of characters for a string
494 */
495size_t
496NavigatorInterface::maxlenof_max_velocity() const
497{
498 return 1;
499}
500
501/** Set max_velocity value.
502 * Maximum velocity
503 * @param new_max_velocity new max_velocity value
504 */
505void
506NavigatorInterface::set_max_velocity(const float new_max_velocity)
507{
508 set_field(data->max_velocity, new_max_velocity);
509}
510
511/** Get max_rotation value.
512 * Maximum rotation velocity
513 * @return max_rotation value
514 */
515float
516NavigatorInterface::max_rotation() const
517{
518 return data->max_rotation;
519}
520
521/** Get maximum length of max_rotation value.
522 * @return length of max_rotation value, can be length of the array or number of
523 * maximum number of characters for a string
524 */
525size_t
526NavigatorInterface::maxlenof_max_rotation() const
527{
528 return 1;
529}
530
531/** Set max_rotation value.
532 * Maximum rotation velocity
533 * @param new_max_rotation new max_rotation value
534 */
535void
536NavigatorInterface::set_max_rotation(const float new_max_rotation)
537{
538 set_field(data->max_rotation, new_max_rotation);
539}
540
541/** Get security_distance value.
542 * Security distance to keep to obstacles
543 * @return security_distance value
544 */
545float
546NavigatorInterface::security_distance() const
547{
548 return data->security_distance;
549}
550
551/** Get maximum length of security_distance value.
552 * @return length of security_distance value, can be length of the array or number of
553 * maximum number of characters for a string
554 */
555size_t
556NavigatorInterface::maxlenof_security_distance() const
557{
558 return 1;
559}
560
561/** Set security_distance value.
562 * Security distance to keep to obstacles
563 * @param new_security_distance new security_distance value
564 */
565void
566NavigatorInterface::set_security_distance(const float new_security_distance)
567{
568 set_field(data->security_distance, new_security_distance);
569}
570
571/** Get escaping_enabled value.
572 * This is used for navigation components with integrated collision avoidance,
573 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
574 * @return escaping_enabled value
575 */
576bool
577NavigatorInterface::is_escaping_enabled() const
578{
579 return data->escaping_enabled;
580}
581
582/** Get maximum length of escaping_enabled value.
583 * @return length of escaping_enabled value, can be length of the array or number of
584 * maximum number of characters for a string
585 */
586size_t
587NavigatorInterface::maxlenof_escaping_enabled() const
588{
589 return 1;
590}
591
592/** Set escaping_enabled value.
593 * This is used for navigation components with integrated collision avoidance,
594 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
595 * @param new_escaping_enabled new escaping_enabled value
596 */
597void
598NavigatorInterface::set_escaping_enabled(const bool new_escaping_enabled)
599{
600 set_field(data->escaping_enabled, new_escaping_enabled);
601}
602
603/** Get drive_mode value.
604 * Current drive mode
605 * @return drive_mode value
606 */
608NavigatorInterface::drive_mode() const
609{
610 return (NavigatorInterface::DriveMode)data->drive_mode;
611}
612
613/** Get maximum length of drive_mode value.
614 * @return length of drive_mode value, can be length of the array or number of
615 * maximum number of characters for a string
616 */
617size_t
618NavigatorInterface::maxlenof_drive_mode() const
619{
620 return 1;
621}
622
623/** Set drive_mode value.
624 * Current drive mode
625 * @param new_drive_mode new drive_mode value
626 */
627void
628NavigatorInterface::set_drive_mode(const DriveMode new_drive_mode)
629{
630 set_field(data->drive_mode, new_drive_mode);
631}
632
633/** Get auto_drive_mode value.
634 * True, if the drive mode should be automatically decided each time.
635 False, if the drive mode should not automatically change, which is the case when sending
636 a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
637 * @return auto_drive_mode value
638 */
639bool
640NavigatorInterface::is_auto_drive_mode() const
641{
642 return data->auto_drive_mode;
643}
644
645/** Get maximum length of auto_drive_mode value.
646 * @return length of auto_drive_mode value, can be length of the array or number of
647 * maximum number of characters for a string
648 */
649size_t
650NavigatorInterface::maxlenof_auto_drive_mode() const
651{
652 return 1;
653}
654
655/** Set auto_drive_mode value.
656 * True, if the drive mode should be automatically decided each time.
657 False, if the drive mode should not automatically change, which is the case when sending
658 a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
659 * @param new_auto_drive_mode new auto_drive_mode value
660 */
661void
662NavigatorInterface::set_auto_drive_mode(const bool new_auto_drive_mode)
663{
664 set_field(data->auto_drive_mode, new_auto_drive_mode);
665}
666
667/** Get stop_at_target value.
668 * Stop when target is reached?
669 * @return stop_at_target value
670 */
671bool
672NavigatorInterface::is_stop_at_target() const
673{
674 return data->stop_at_target;
675}
676
677/** Get maximum length of stop_at_target value.
678 * @return length of stop_at_target value, can be length of the array or number of
679 * maximum number of characters for a string
680 */
681size_t
682NavigatorInterface::maxlenof_stop_at_target() const
683{
684 return 1;
685}
686
687/** Set stop_at_target value.
688 * Stop when target is reached?
689 * @param new_stop_at_target new stop_at_target value
690 */
691void
692NavigatorInterface::set_stop_at_target(const bool new_stop_at_target)
693{
694 set_field(data->stop_at_target, new_stop_at_target);
695}
696
697/** Get orientation_mode value.
698 * Mode how/when to orientate if orientation is given
699 * @return orientation_mode value
700 */
702NavigatorInterface::orientation_mode() const
703{
704 return (NavigatorInterface::OrientationMode)data->orientation_mode;
705}
706
707/** Get maximum length of orientation_mode value.
708 * @return length of orientation_mode value, can be length of the array or number of
709 * maximum number of characters for a string
710 */
711size_t
712NavigatorInterface::maxlenof_orientation_mode() const
713{
714 return 1;
715}
716
717/** Set orientation_mode value.
718 * Mode how/when to orientate if orientation is given
719 * @param new_orientation_mode new orientation_mode value
720 */
721void
722NavigatorInterface::set_orientation_mode(const OrientationMode new_orientation_mode)
723{
724 set_field(data->orientation_mode, new_orientation_mode);
725}
726
727/** Get target_frame value.
728 * The target frame to plan into
729 * @return target_frame value
730 */
731char *
732NavigatorInterface::target_frame() const
733{
734 return data->target_frame;
735}
736
737/** Get maximum length of target_frame value.
738 * @return length of target_frame value, can be length of the array or number of
739 * maximum number of characters for a string
740 */
741size_t
742NavigatorInterface::maxlenof_target_frame() const
743{
744 return 64;
745}
746
747/** Set target_frame value.
748 * The target frame to plan into
749 * @param new_target_frame new target_frame value
750 */
751void
752NavigatorInterface::set_target_frame(const char * new_target_frame)
753{
754 set_field(data->target_frame, new_target_frame);
755}
756
757/* =========== message create =========== */
758Message *
759NavigatorInterface::create_message(const char *type) const
760{
761 if ( strncmp("StopMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
762 return new StopMessage();
763 } else if ( strncmp("TurnMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
764 return new TurnMessage();
765 } else if ( strncmp("CartesianGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
766 return new CartesianGotoMessage();
767 } else if ( strncmp("CartesianGotoWithToleranceMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
769 } else if ( strncmp("CartesianGotoWithFrameMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
771 } else if ( strncmp("CartesianGotoWithFrameWithToleranceMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
773 } else if ( strncmp("PolarGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
774 return new PolarGotoMessage();
775 } else if ( strncmp("PlaceGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
776 return new PlaceGotoMessage();
777 } else if ( strncmp("PlaceWithOriGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
778 return new PlaceWithOriGotoMessage();
779 } else if ( strncmp("ObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
780 return new ObstacleMessage();
781 } else if ( strncmp("ResetOdometryMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
782 return new ResetOdometryMessage();
783 } else if ( strncmp("SetMaxVelocityMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
784 return new SetMaxVelocityMessage();
785 } else if ( strncmp("SetMaxRotationMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
786 return new SetMaxRotationMessage();
787 } else if ( strncmp("SetEscapingMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
788 return new SetEscapingMessage();
789 } else if ( strncmp("SetSecurityDistanceMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
790 return new SetSecurityDistanceMessage();
791 } else if ( strncmp("SetDriveModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
792 return new SetDriveModeMessage();
793 } else if ( strncmp("SetStopAtTargetMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
794 return new SetStopAtTargetMessage();
795 } else if ( strncmp("SetOrientationModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
796 return new SetOrientationModeMessage();
797 } else if ( strncmp("ResetParametersMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
798 return new ResetParametersMessage();
799 } else {
800 throw UnknownTypeException("The given type '%s' does not match any known "
801 "message type for this interface type.", type);
802 }
803}
804
805
806/** Copy values from other interface.
807 * @param other other interface to copy values from
808 */
809void
810NavigatorInterface::copy_values(const Interface *other)
811{
812 const NavigatorInterface *oi = dynamic_cast<const NavigatorInterface *>(other);
813 if (oi == NULL) {
814 throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
815 type(), other->type());
816 }
817 memcpy(data, oi->data, sizeof(NavigatorInterface_data_t));
818}
819
820const char *
821NavigatorInterface::enum_tostring(const char *enumtype, int val) const
822{
823 if (strcmp(enumtype, "DriveMode") == 0) {
824 return tostring_DriveMode((DriveMode)val);
825 }
826 if (strcmp(enumtype, "OrientationMode") == 0) {
827 return tostring_OrientationMode((OrientationMode)val);
828 }
829 throw UnknownTypeException("Unknown enum type %s", enumtype);
830}
831
832/* =========== messages =========== */
833/** @class NavigatorInterface::StopMessage <interfaces/NavigatorInterface.h>
834 * StopMessage Fawkes BlackBoard Interface Message.
835 *
836
837 */
838
839
840/** Constructor with initial values.
841 * @param ini_msgid initial value for msgid
842 */
843NavigatorInterface::StopMessage::StopMessage(const uint32_t ini_msgid) : Message("StopMessage")
844{
845 data_size = sizeof(StopMessage_data_t);
846 data_ptr = malloc(data_size);
847 memset(data_ptr, 0, data_size);
848 data = (StopMessage_data_t *)data_ptr;
850 data->msgid = ini_msgid;
851 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
852 enum_map_DriveMode[(int)Forward] = "Forward";
853 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
854 enum_map_DriveMode[(int)Backward] = "Backward";
855 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
856 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
857 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
858 add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
859}
860/** Constructor */
862{
863 data_size = sizeof(StopMessage_data_t);
864 data_ptr = malloc(data_size);
865 memset(data_ptr, 0, data_size);
866 data = (StopMessage_data_t *)data_ptr;
868 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
869 enum_map_DriveMode[(int)Forward] = "Forward";
870 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
871 enum_map_DriveMode[(int)Backward] = "Backward";
872 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
873 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
874 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
875 add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
876}
877
878/** Destructor */
880{
881 free(data_ptr);
882}
883
884/** Copy constructor.
885 * @param m message to copy from
886 */
888{
889 data_size = m->data_size;
890 data_ptr = malloc(data_size);
891 memcpy(data_ptr, m->data_ptr, data_size);
892 data = (StopMessage_data_t *)data_ptr;
894}
895
896/* Methods */
897/** Get msgid value.
898 *
899 If zero, stops any motion. If non-zero, the component shall only
900 stop the motion if the currently executed command was received
901 through a message with that specific ID.
902
903 Use the specific version whenever possible. It avoids a race
904 condition if one intstructing component sends a stop, and
905 another a new drive command at the same time.
906
907 * @return msgid value
908 */
909uint32_t
911{
912 return data->msgid;
913}
914
915/** Get maximum length of msgid value.
916 * @return length of msgid value, can be length of the array or number of
917 * maximum number of characters for a string
918 */
919size_t
921{
922 return 1;
923}
924
925/** Set msgid value.
926 *
927 If zero, stops any motion. If non-zero, the component shall only
928 stop the motion if the currently executed command was received
929 through a message with that specific ID.
930
931 Use the specific version whenever possible. It avoids a race
932 condition if one intstructing component sends a stop, and
933 another a new drive command at the same time.
934
935 * @param new_msgid new msgid value
936 */
937void
939{
940 set_field(data->msgid, new_msgid);
941}
942
943/** Clone this message.
944 * Produces a message of the same type as this message and copies the
945 * data to the new message.
946 * @return clone of this message
947 */
948Message *
950{
951 return new NavigatorInterface::StopMessage(this);
952}
953/** @class NavigatorInterface::TurnMessage <interfaces/NavigatorInterface.h>
954 * TurnMessage Fawkes BlackBoard Interface Message.
955 *
956
957 */
958
959
960/** Constructor with initial values.
961 * @param ini_angle initial value for angle
962 * @param ini_velocity initial value for velocity
963 */
964NavigatorInterface::TurnMessage::TurnMessage(const float ini_angle, const float ini_velocity) : Message("TurnMessage")
965{
966 data_size = sizeof(TurnMessage_data_t);
967 data_ptr = malloc(data_size);
968 memset(data_ptr, 0, data_size);
969 data = (TurnMessage_data_t *)data_ptr;
971 data->angle = ini_angle;
972 data->velocity = ini_velocity;
973 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
974 enum_map_DriveMode[(int)Forward] = "Forward";
975 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
976 enum_map_DriveMode[(int)Backward] = "Backward";
977 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
978 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
979 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
980 add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
981 add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
982}
983/** Constructor */
985{
986 data_size = sizeof(TurnMessage_data_t);
987 data_ptr = malloc(data_size);
988 memset(data_ptr, 0, data_size);
989 data = (TurnMessage_data_t *)data_ptr;
991 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
992 enum_map_DriveMode[(int)Forward] = "Forward";
993 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
994 enum_map_DriveMode[(int)Backward] = "Backward";
995 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
996 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
997 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
998 add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
999 add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
1000}
1001
1002/** Destructor */
1004{
1005 free(data_ptr);
1006}
1007
1008/** Copy constructor.
1009 * @param m message to copy from
1010 */
1012{
1013 data_size = m->data_size;
1014 data_ptr = malloc(data_size);
1015 memcpy(data_ptr, m->data_ptr, data_size);
1016 data = (TurnMessage_data_t *)data_ptr;
1018}
1019
1020/* Methods */
1021/** Get angle value.
1022 * Angle of the turn.
1023 * @return angle value
1024 */
1025float
1027{
1028 return data->angle;
1029}
1030
1031/** Get maximum length of angle value.
1032 * @return length of angle value, can be length of the array or number of
1033 * maximum number of characters for a string
1034 */
1035size_t
1037{
1038 return 1;
1039}
1040
1041/** Set angle value.
1042 * Angle of the turn.
1043 * @param new_angle new angle value
1044 */
1045void
1047{
1048 set_field(data->angle, new_angle);
1049}
1050
1051/** Get velocity value.
1052 * The desired turning velocity in rad/s,
1053 set to zero to use default value.
1054 * @return velocity value
1055 */
1056float
1058{
1059 return data->velocity;
1060}
1061
1062/** Get maximum length of velocity value.
1063 * @return length of velocity value, can be length of the array or number of
1064 * maximum number of characters for a string
1065 */
1066size_t
1068{
1069 return 1;
1070}
1071
1072/** Set velocity value.
1073 * The desired turning velocity in rad/s,
1074 set to zero to use default value.
1075 * @param new_velocity new velocity value
1076 */
1077void
1079{
1080 set_field(data->velocity, new_velocity);
1081}
1082
1083/** Clone this message.
1084 * Produces a message of the same type as this message and copies the
1085 * data to the new message.
1086 * @return clone of this message
1087 */
1088Message *
1090{
1091 return new NavigatorInterface::TurnMessage(this);
1092}
1093/** @class NavigatorInterface::CartesianGotoMessage <interfaces/NavigatorInterface.h>
1094 * CartesianGotoMessage Fawkes BlackBoard Interface Message.
1095 *
1096
1097 */
1098
1099
1100/** Constructor with initial values.
1101 * @param ini_x initial value for x
1102 * @param ini_y initial value for y
1103 * @param ini_orientation initial value for orientation
1104 */
1105NavigatorInterface::CartesianGotoMessage::CartesianGotoMessage(const float ini_x, const float ini_y, const float ini_orientation) : Message("CartesianGotoMessage")
1106{
1107 data_size = sizeof(CartesianGotoMessage_data_t);
1108 data_ptr = malloc(data_size);
1109 memset(data_ptr, 0, data_size);
1110 data = (CartesianGotoMessage_data_t *)data_ptr;
1112 data->x = ini_x;
1113 data->y = ini_y;
1114 data->orientation = ini_orientation;
1115 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1116 enum_map_DriveMode[(int)Forward] = "Forward";
1117 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1118 enum_map_DriveMode[(int)Backward] = "Backward";
1119 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1120 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1121 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1122 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1123 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1124 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1125}
1126/** Constructor */
1128{
1129 data_size = sizeof(CartesianGotoMessage_data_t);
1130 data_ptr = malloc(data_size);
1131 memset(data_ptr, 0, data_size);
1132 data = (CartesianGotoMessage_data_t *)data_ptr;
1134 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1135 enum_map_DriveMode[(int)Forward] = "Forward";
1136 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1137 enum_map_DriveMode[(int)Backward] = "Backward";
1138 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1139 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1140 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1141 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1142 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1143 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1144}
1145
1146/** Destructor */
1148{
1149 free(data_ptr);
1150}
1151
1152/** Copy constructor.
1153 * @param m message to copy from
1154 */
1156{
1157 data_size = m->data_size;
1158 data_ptr = malloc(data_size);
1159 memcpy(data_ptr, m->data_ptr, data_size);
1160 data = (CartesianGotoMessage_data_t *)data_ptr;
1162}
1163
1164/* Methods */
1165/** Get x value.
1166 * X-coordinate of the target, in the robot's coordinate system.
1167 * @return x value
1168 */
1169float
1171{
1172 return data->x;
1173}
1174
1175/** Get maximum length of x value.
1176 * @return length of x value, can be length of the array or number of
1177 * maximum number of characters for a string
1178 */
1179size_t
1181{
1182 return 1;
1183}
1184
1185/** Set x value.
1186 * X-coordinate of the target, in the robot's coordinate system.
1187 * @param new_x new x value
1188 */
1189void
1191{
1192 set_field(data->x, new_x);
1193}
1194
1195/** Get y value.
1196 * Y-coordinate of the target, in the robot's coordinate system.
1197 * @return y value
1198 */
1199float
1201{
1202 return data->y;
1203}
1204
1205/** Get maximum length of y value.
1206 * @return length of y value, can be length of the array or number of
1207 * maximum number of characters for a string
1208 */
1209size_t
1211{
1212 return 1;
1213}
1214
1215/** Set y value.
1216 * Y-coordinate of the target, in the robot's coordinate system.
1217 * @param new_y new y value
1218 */
1219void
1221{
1222 set_field(data->y, new_y);
1223}
1224
1225/** Get orientation value.
1226 * The desired orientation of the robot at the target.
1227 * @return orientation value
1228 */
1229float
1231{
1232 return data->orientation;
1233}
1234
1235/** Get maximum length of orientation value.
1236 * @return length of orientation value, can be length of the array or number of
1237 * maximum number of characters for a string
1238 */
1239size_t
1241{
1242 return 1;
1243}
1244
1245/** Set orientation value.
1246 * The desired orientation of the robot at the target.
1247 * @param new_orientation new orientation value
1248 */
1249void
1251{
1252 set_field(data->orientation, new_orientation);
1253}
1254
1255/** Clone this message.
1256 * Produces a message of the same type as this message and copies the
1257 * data to the new message.
1258 * @return clone of this message
1259 */
1260Message *
1262{
1264}
1265/** @class NavigatorInterface::CartesianGotoWithToleranceMessage <interfaces/NavigatorInterface.h>
1266 * CartesianGotoWithToleranceMessage Fawkes BlackBoard Interface Message.
1267 *
1268
1269 */
1270
1271
1272/** Constructor with initial values.
1273 * @param ini_x initial value for x
1274 * @param ini_y initial value for y
1275 * @param ini_orientation initial value for orientation
1276 * @param ini_translation_tolerance initial value for translation_tolerance
1277 * @param ini_orientation_tolerance initial value for orientation_tolerance
1278 */
1279NavigatorInterface::CartesianGotoWithToleranceMessage::CartesianGotoWithToleranceMessage(const float ini_x, const float ini_y, const float ini_orientation, const float ini_translation_tolerance, const float ini_orientation_tolerance) : Message("CartesianGotoWithToleranceMessage")
1280{
1281 data_size = sizeof(CartesianGotoWithToleranceMessage_data_t);
1282 data_ptr = malloc(data_size);
1283 memset(data_ptr, 0, data_size);
1284 data = (CartesianGotoWithToleranceMessage_data_t *)data_ptr;
1286 data->x = ini_x;
1287 data->y = ini_y;
1288 data->orientation = ini_orientation;
1289 data->translation_tolerance = ini_translation_tolerance;
1290 data->orientation_tolerance = ini_orientation_tolerance;
1291 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1292 enum_map_DriveMode[(int)Forward] = "Forward";
1293 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1294 enum_map_DriveMode[(int)Backward] = "Backward";
1295 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1296 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1297 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1298 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1299 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1300 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1301 add_fieldinfo(IFT_FLOAT, "translation_tolerance", 1, &data->translation_tolerance);
1302 add_fieldinfo(IFT_FLOAT, "orientation_tolerance", 1, &data->orientation_tolerance);
1303}
1304/** Constructor */
1306{
1307 data_size = sizeof(CartesianGotoWithToleranceMessage_data_t);
1308 data_ptr = malloc(data_size);
1309 memset(data_ptr, 0, data_size);
1310 data = (CartesianGotoWithToleranceMessage_data_t *)data_ptr;
1312 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1313 enum_map_DriveMode[(int)Forward] = "Forward";
1314 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1315 enum_map_DriveMode[(int)Backward] = "Backward";
1316 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1317 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1318 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1319 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1320 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1321 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1322 add_fieldinfo(IFT_FLOAT, "translation_tolerance", 1, &data->translation_tolerance);
1323 add_fieldinfo(IFT_FLOAT, "orientation_tolerance", 1, &data->orientation_tolerance);
1324}
1325
1326/** Destructor */
1328{
1329 free(data_ptr);
1330}
1331
1332/** Copy constructor.
1333 * @param m message to copy from
1334 */
1336{
1337 data_size = m->data_size;
1338 data_ptr = malloc(data_size);
1339 memcpy(data_ptr, m->data_ptr, data_size);
1340 data = (CartesianGotoWithToleranceMessage_data_t *)data_ptr;
1342}
1343
1344/* Methods */
1345/** Get x value.
1346 * X-coordinate of the target, in the robot's coordinate system.
1347 * @return x value
1348 */
1349float
1351{
1352 return data->x;
1353}
1354
1355/** Get maximum length of x value.
1356 * @return length of x value, can be length of the array or number of
1357 * maximum number of characters for a string
1358 */
1359size_t
1361{
1362 return 1;
1363}
1364
1365/** Set x value.
1366 * X-coordinate of the target, in the robot's coordinate system.
1367 * @param new_x new x value
1368 */
1369void
1371{
1372 set_field(data->x, new_x);
1373}
1374
1375/** Get y value.
1376 * Y-coordinate of the target, in the robot's coordinate system.
1377 * @return y value
1378 */
1379float
1381{
1382 return data->y;
1383}
1384
1385/** Get maximum length of y value.
1386 * @return length of y value, can be length of the array or number of
1387 * maximum number of characters for a string
1388 */
1389size_t
1391{
1392 return 1;
1393}
1394
1395/** Set y value.
1396 * Y-coordinate of the target, in the robot's coordinate system.
1397 * @param new_y new y value
1398 */
1399void
1401{
1402 set_field(data->y, new_y);
1403}
1404
1405/** Get orientation value.
1406 * The desired orientation of the robot at the target.
1407 * @return orientation value
1408 */
1409float
1411{
1412 return data->orientation;
1413}
1414
1415/** Get maximum length of orientation value.
1416 * @return length of orientation value, can be length of the array or number of
1417 * maximum number of characters for a string
1418 */
1419size_t
1421{
1422 return 1;
1423}
1424
1425/** Set orientation value.
1426 * The desired orientation of the robot at the target.
1427 * @param new_orientation new orientation value
1428 */
1429void
1431{
1432 set_field(data->orientation, new_orientation);
1433}
1434
1435/** Get translation_tolerance value.
1436 * The translation tolerance of the target, in meters.
1437 * @return translation_tolerance value
1438 */
1439float
1441{
1442 return data->translation_tolerance;
1443}
1444
1445/** Get maximum length of translation_tolerance value.
1446 * @return length of translation_tolerance value, can be length of the array or number of
1447 * maximum number of characters for a string
1448 */
1449size_t
1451{
1452 return 1;
1453}
1454
1455/** Set translation_tolerance value.
1456 * The translation tolerance of the target, in meters.
1457 * @param new_translation_tolerance new translation_tolerance value
1458 */
1459void
1461{
1462 set_field(data->translation_tolerance, new_translation_tolerance);
1463}
1464
1465/** Get orientation_tolerance value.
1466 * The orientation tolerance of the target, in radians.
1467 * @return orientation_tolerance value
1468 */
1469float
1471{
1472 return data->orientation_tolerance;
1473}
1474
1475/** Get maximum length of orientation_tolerance value.
1476 * @return length of orientation_tolerance value, can be length of the array or number of
1477 * maximum number of characters for a string
1478 */
1479size_t
1481{
1482 return 1;
1483}
1484
1485/** Set orientation_tolerance value.
1486 * The orientation tolerance of the target, in radians.
1487 * @param new_orientation_tolerance new orientation_tolerance value
1488 */
1489void
1491{
1492 set_field(data->orientation_tolerance, new_orientation_tolerance);
1493}
1494
1495/** Clone this message.
1496 * Produces a message of the same type as this message and copies the
1497 * data to the new message.
1498 * @return clone of this message
1499 */
1500Message *
1502{
1504}
1505/** @class NavigatorInterface::CartesianGotoWithFrameMessage <interfaces/NavigatorInterface.h>
1506 * CartesianGotoWithFrameMessage Fawkes BlackBoard Interface Message.
1507 *
1508
1509 */
1510
1511
1512/** Constructor with initial values.
1513 * @param ini_x initial value for x
1514 * @param ini_y initial value for y
1515 * @param ini_orientation initial value for orientation
1516 * @param ini_target_frame initial value for target_frame
1517 */
1518NavigatorInterface::CartesianGotoWithFrameMessage::CartesianGotoWithFrameMessage(const float ini_x, const float ini_y, const float ini_orientation, const char * ini_target_frame) : Message("CartesianGotoWithFrameMessage")
1519{
1520 data_size = sizeof(CartesianGotoWithFrameMessage_data_t);
1521 data_ptr = malloc(data_size);
1522 memset(data_ptr, 0, data_size);
1523 data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1525 data->x = ini_x;
1526 data->y = ini_y;
1527 data->orientation = ini_orientation;
1528 strncpy(data->target_frame, ini_target_frame, 64-1);
1529 data->target_frame[64-1] = 0;
1530 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1531 enum_map_DriveMode[(int)Forward] = "Forward";
1532 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1533 enum_map_DriveMode[(int)Backward] = "Backward";
1534 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1535 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1536 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1537 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1538 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1539 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1540 add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1541}
1542/** Constructor */
1544{
1545 data_size = sizeof(CartesianGotoWithFrameMessage_data_t);
1546 data_ptr = malloc(data_size);
1547 memset(data_ptr, 0, data_size);
1548 data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1550 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1551 enum_map_DriveMode[(int)Forward] = "Forward";
1552 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1553 enum_map_DriveMode[(int)Backward] = "Backward";
1554 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1555 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1556 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1557 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1558 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1559 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1560 add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1561}
1562
1563/** Destructor */
1565{
1566 free(data_ptr);
1567}
1568
1569/** Copy constructor.
1570 * @param m message to copy from
1571 */
1573{
1574 data_size = m->data_size;
1575 data_ptr = malloc(data_size);
1576 memcpy(data_ptr, m->data_ptr, data_size);
1577 data = (CartesianGotoWithFrameMessage_data_t *)data_ptr;
1579}
1580
1581/* Methods */
1582/** Get x value.
1583 * X-coordinate of the target, in the robot's coordinate system.
1584 * @return x value
1585 */
1586float
1588{
1589 return data->x;
1590}
1591
1592/** Get maximum length of x value.
1593 * @return length of x value, can be length of the array or number of
1594 * maximum number of characters for a string
1595 */
1596size_t
1598{
1599 return 1;
1600}
1601
1602/** Set x value.
1603 * X-coordinate of the target, in the robot's coordinate system.
1604 * @param new_x new x value
1605 */
1606void
1608{
1609 set_field(data->x, new_x);
1610}
1611
1612/** Get y value.
1613 * Y-coordinate of the target, in the robot's coordinate system.
1614 * @return y value
1615 */
1616float
1618{
1619 return data->y;
1620}
1621
1622/** Get maximum length of y value.
1623 * @return length of y value, can be length of the array or number of
1624 * maximum number of characters for a string
1625 */
1626size_t
1628{
1629 return 1;
1630}
1631
1632/** Set y value.
1633 * Y-coordinate of the target, in the robot's coordinate system.
1634 * @param new_y new y value
1635 */
1636void
1638{
1639 set_field(data->y, new_y);
1640}
1641
1642/** Get orientation value.
1643 * The desired orientation of the robot at the target.
1644 * @return orientation value
1645 */
1646float
1648{
1649 return data->orientation;
1650}
1651
1652/** Get maximum length of orientation value.
1653 * @return length of orientation value, can be length of the array or number of
1654 * maximum number of characters for a string
1655 */
1656size_t
1658{
1659 return 1;
1660}
1661
1662/** Set orientation value.
1663 * The desired orientation of the robot at the target.
1664 * @param new_orientation new orientation value
1665 */
1666void
1668{
1669 set_field(data->orientation, new_orientation);
1670}
1671
1672/** Get target_frame value.
1673 * The target frame to plan in.
1674 * @return target_frame value
1675 */
1676char *
1678{
1679 return data->target_frame;
1680}
1681
1682/** Get maximum length of target_frame value.
1683 * @return length of target_frame value, can be length of the array or number of
1684 * maximum number of characters for a string
1685 */
1686size_t
1688{
1689 return 64;
1690}
1691
1692/** Set target_frame value.
1693 * The target frame to plan in.
1694 * @param new_target_frame new target_frame value
1695 */
1696void
1698{
1699 set_field(data->target_frame, new_target_frame);
1700}
1701
1702/** Clone this message.
1703 * Produces a message of the same type as this message and copies the
1704 * data to the new message.
1705 * @return clone of this message
1706 */
1707Message *
1709{
1711}
1712/** @class NavigatorInterface::CartesianGotoWithFrameWithToleranceMessage <interfaces/NavigatorInterface.h>
1713 * CartesianGotoWithFrameWithToleranceMessage Fawkes BlackBoard Interface Message.
1714 *
1715
1716 */
1717
1718
1719/** Constructor with initial values.
1720 * @param ini_x initial value for x
1721 * @param ini_y initial value for y
1722 * @param ini_orientation initial value for orientation
1723 * @param ini_target_frame initial value for target_frame
1724 * @param ini_translation_tolerance initial value for translation_tolerance
1725 * @param ini_orientation_tolerance initial value for orientation_tolerance
1726 */
1727NavigatorInterface::CartesianGotoWithFrameWithToleranceMessage::CartesianGotoWithFrameWithToleranceMessage(const float ini_x, const float ini_y, const float ini_orientation, const char * ini_target_frame, const float ini_translation_tolerance, const float ini_orientation_tolerance) : Message("CartesianGotoWithFrameWithToleranceMessage")
1728{
1729 data_size = sizeof(CartesianGotoWithFrameWithToleranceMessage_data_t);
1730 data_ptr = malloc(data_size);
1731 memset(data_ptr, 0, data_size);
1732 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)data_ptr;
1734 data->x = ini_x;
1735 data->y = ini_y;
1736 data->orientation = ini_orientation;
1737 strncpy(data->target_frame, ini_target_frame, 64-1);
1738 data->target_frame[64-1] = 0;
1739 data->translation_tolerance = ini_translation_tolerance;
1740 data->orientation_tolerance = ini_orientation_tolerance;
1741 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1742 enum_map_DriveMode[(int)Forward] = "Forward";
1743 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1744 enum_map_DriveMode[(int)Backward] = "Backward";
1745 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1746 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1747 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1748 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1749 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1750 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1751 add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1752 add_fieldinfo(IFT_FLOAT, "translation_tolerance", 1, &data->translation_tolerance);
1753 add_fieldinfo(IFT_FLOAT, "orientation_tolerance", 1, &data->orientation_tolerance);
1754}
1755/** Constructor */
1757{
1758 data_size = sizeof(CartesianGotoWithFrameWithToleranceMessage_data_t);
1759 data_ptr = malloc(data_size);
1760 memset(data_ptr, 0, data_size);
1761 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)data_ptr;
1763 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1764 enum_map_DriveMode[(int)Forward] = "Forward";
1765 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1766 enum_map_DriveMode[(int)Backward] = "Backward";
1767 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1768 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1769 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1770 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1771 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1772 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1773 add_fieldinfo(IFT_STRING, "target_frame", 64, data->target_frame);
1774 add_fieldinfo(IFT_FLOAT, "translation_tolerance", 1, &data->translation_tolerance);
1775 add_fieldinfo(IFT_FLOAT, "orientation_tolerance", 1, &data->orientation_tolerance);
1776}
1777
1778/** Destructor */
1780{
1781 free(data_ptr);
1782}
1783
1784/** Copy constructor.
1785 * @param m message to copy from
1786 */
1788{
1789 data_size = m->data_size;
1790 data_ptr = malloc(data_size);
1791 memcpy(data_ptr, m->data_ptr, data_size);
1792 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)data_ptr;
1794}
1795
1796/* Methods */
1797/** Get x value.
1798 * X-coordinate of the target, in the robot's coordinate system.
1799 * @return x value
1800 */
1801float
1803{
1804 return data->x;
1805}
1806
1807/** Get maximum length of x value.
1808 * @return length of x value, can be length of the array or number of
1809 * maximum number of characters for a string
1810 */
1811size_t
1813{
1814 return 1;
1815}
1816
1817/** Set x value.
1818 * X-coordinate of the target, in the robot's coordinate system.
1819 * @param new_x new x value
1820 */
1821void
1823{
1824 set_field(data->x, new_x);
1825}
1826
1827/** Get y value.
1828 * Y-coordinate of the target, in the robot's coordinate system.
1829 * @return y value
1830 */
1831float
1833{
1834 return data->y;
1835}
1836
1837/** Get maximum length of y value.
1838 * @return length of y value, can be length of the array or number of
1839 * maximum number of characters for a string
1840 */
1841size_t
1843{
1844 return 1;
1845}
1846
1847/** Set y value.
1848 * Y-coordinate of the target, in the robot's coordinate system.
1849 * @param new_y new y value
1850 */
1851void
1853{
1854 set_field(data->y, new_y);
1855}
1856
1857/** Get orientation value.
1858 * The desired orientation of the robot at the target.
1859 * @return orientation value
1860 */
1861float
1863{
1864 return data->orientation;
1865}
1866
1867/** Get maximum length of orientation value.
1868 * @return length of orientation value, can be length of the array or number of
1869 * maximum number of characters for a string
1870 */
1871size_t
1873{
1874 return 1;
1875}
1876
1877/** Set orientation value.
1878 * The desired orientation of the robot at the target.
1879 * @param new_orientation new orientation value
1880 */
1881void
1883{
1884 set_field(data->orientation, new_orientation);
1885}
1886
1887/** Get target_frame value.
1888 * The target frame to plan in.
1889 * @return target_frame value
1890 */
1891char *
1893{
1894 return data->target_frame;
1895}
1896
1897/** Get maximum length of target_frame value.
1898 * @return length of target_frame value, can be length of the array or number of
1899 * maximum number of characters for a string
1900 */
1901size_t
1903{
1904 return 64;
1905}
1906
1907/** Set target_frame value.
1908 * The target frame to plan in.
1909 * @param new_target_frame new target_frame value
1910 */
1911void
1913{
1914 set_field(data->target_frame, new_target_frame);
1915}
1916
1917/** Get translation_tolerance value.
1918 * The translation tolerance of the target, in meters.
1919 * @return translation_tolerance value
1920 */
1921float
1923{
1924 return data->translation_tolerance;
1925}
1926
1927/** Get maximum length of translation_tolerance value.
1928 * @return length of translation_tolerance value, can be length of the array or number of
1929 * maximum number of characters for a string
1930 */
1931size_t
1933{
1934 return 1;
1935}
1936
1937/** Set translation_tolerance value.
1938 * The translation tolerance of the target, in meters.
1939 * @param new_translation_tolerance new translation_tolerance value
1940 */
1941void
1943{
1944 set_field(data->translation_tolerance, new_translation_tolerance);
1945}
1946
1947/** Get orientation_tolerance value.
1948 * The orientation tolerance of the target, in radians.
1949 * @return orientation_tolerance value
1950 */
1951float
1953{
1954 return data->orientation_tolerance;
1955}
1956
1957/** Get maximum length of orientation_tolerance value.
1958 * @return length of orientation_tolerance value, can be length of the array or number of
1959 * maximum number of characters for a string
1960 */
1961size_t
1963{
1964 return 1;
1965}
1966
1967/** Set orientation_tolerance value.
1968 * The orientation tolerance of the target, in radians.
1969 * @param new_orientation_tolerance new orientation_tolerance value
1970 */
1971void
1973{
1974 set_field(data->orientation_tolerance, new_orientation_tolerance);
1975}
1976
1977/** Clone this message.
1978 * Produces a message of the same type as this message and copies the
1979 * data to the new message.
1980 * @return clone of this message
1981 */
1982Message *
1984{
1986}
1987/** @class NavigatorInterface::PolarGotoMessage <interfaces/NavigatorInterface.h>
1988 * PolarGotoMessage Fawkes BlackBoard Interface Message.
1989 *
1990
1991 */
1992
1993
1994/** Constructor with initial values.
1995 * @param ini_phi initial value for phi
1996 * @param ini_dist initial value for dist
1997 * @param ini_orientation initial value for orientation
1998 */
1999NavigatorInterface::PolarGotoMessage::PolarGotoMessage(const float ini_phi, const float ini_dist, const float ini_orientation) : Message("PolarGotoMessage")
2000{
2001 data_size = sizeof(PolarGotoMessage_data_t);
2002 data_ptr = malloc(data_size);
2003 memset(data_ptr, 0, data_size);
2004 data = (PolarGotoMessage_data_t *)data_ptr;
2006 data->phi = ini_phi;
2007 data->dist = ini_dist;
2008 data->orientation = ini_orientation;
2009 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2010 enum_map_DriveMode[(int)Forward] = "Forward";
2011 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2012 enum_map_DriveMode[(int)Backward] = "Backward";
2013 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2014 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2015 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2016 add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
2017 add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
2018 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
2019}
2020/** Constructor */
2022{
2023 data_size = sizeof(PolarGotoMessage_data_t);
2024 data_ptr = malloc(data_size);
2025 memset(data_ptr, 0, data_size);
2026 data = (PolarGotoMessage_data_t *)data_ptr;
2028 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2029 enum_map_DriveMode[(int)Forward] = "Forward";
2030 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2031 enum_map_DriveMode[(int)Backward] = "Backward";
2032 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2033 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2034 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2035 add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
2036 add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
2037 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
2038}
2039
2040/** Destructor */
2042{
2043 free(data_ptr);
2044}
2045
2046/** Copy constructor.
2047 * @param m message to copy from
2048 */
2050{
2051 data_size = m->data_size;
2052 data_ptr = malloc(data_size);
2053 memcpy(data_ptr, m->data_ptr, data_size);
2054 data = (PolarGotoMessage_data_t *)data_ptr;
2056}
2057
2058/* Methods */
2059/** Get phi value.
2060 * Angle between the robot's front and the target.
2061 * @return phi value
2062 */
2063float
2065{
2066 return data->phi;
2067}
2068
2069/** Get maximum length of phi value.
2070 * @return length of phi value, can be length of the array or number of
2071 * maximum number of characters for a string
2072 */
2073size_t
2075{
2076 return 1;
2077}
2078
2079/** Set phi value.
2080 * Angle between the robot's front and the target.
2081 * @param new_phi new phi value
2082 */
2083void
2085{
2086 set_field(data->phi, new_phi);
2087}
2088
2089/** Get dist value.
2090 * Distance to the target.
2091 * @return dist value
2092 */
2093float
2095{
2096 return data->dist;
2097}
2098
2099/** Get maximum length of dist value.
2100 * @return length of dist value, can be length of the array or number of
2101 * maximum number of characters for a string
2102 */
2103size_t
2105{
2106 return 1;
2107}
2108
2109/** Set dist value.
2110 * Distance to the target.
2111 * @param new_dist new dist value
2112 */
2113void
2115{
2116 set_field(data->dist, new_dist);
2117}
2118
2119/** Get orientation value.
2120 * The desired orientation of the robot at the target.
2121 * @return orientation value
2122 */
2123float
2125{
2126 return data->orientation;
2127}
2128
2129/** Get maximum length of orientation value.
2130 * @return length of orientation value, can be length of the array or number of
2131 * maximum number of characters for a string
2132 */
2133size_t
2135{
2136 return 1;
2137}
2138
2139/** Set orientation value.
2140 * The desired orientation of the robot at the target.
2141 * @param new_orientation new orientation value
2142 */
2143void
2145{
2146 set_field(data->orientation, new_orientation);
2147}
2148
2149/** Clone this message.
2150 * Produces a message of the same type as this message and copies the
2151 * data to the new message.
2152 * @return clone of this message
2153 */
2154Message *
2156{
2157 return new NavigatorInterface::PolarGotoMessage(this);
2158}
2159/** @class NavigatorInterface::PlaceGotoMessage <interfaces/NavigatorInterface.h>
2160 * PlaceGotoMessage Fawkes BlackBoard Interface Message.
2161 *
2162
2163 */
2164
2165
2166/** Constructor with initial values.
2167 * @param ini_place initial value for place
2168 */
2169NavigatorInterface::PlaceGotoMessage::PlaceGotoMessage(const char * ini_place) : Message("PlaceGotoMessage")
2170{
2171 data_size = sizeof(PlaceGotoMessage_data_t);
2172 data_ptr = malloc(data_size);
2173 memset(data_ptr, 0, data_size);
2174 data = (PlaceGotoMessage_data_t *)data_ptr;
2176 strncpy(data->place, ini_place, 64-1);
2177 data->place[64-1] = 0;
2178 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2179 enum_map_DriveMode[(int)Forward] = "Forward";
2180 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2181 enum_map_DriveMode[(int)Backward] = "Backward";
2182 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2183 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2184 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2185 add_fieldinfo(IFT_STRING, "place", 64, data->place);
2186}
2187/** Constructor */
2189{
2190 data_size = sizeof(PlaceGotoMessage_data_t);
2191 data_ptr = malloc(data_size);
2192 memset(data_ptr, 0, data_size);
2193 data = (PlaceGotoMessage_data_t *)data_ptr;
2195 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2196 enum_map_DriveMode[(int)Forward] = "Forward";
2197 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2198 enum_map_DriveMode[(int)Backward] = "Backward";
2199 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2200 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2201 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2202 add_fieldinfo(IFT_STRING, "place", 64, data->place);
2203}
2204
2205/** Destructor */
2207{
2208 free(data_ptr);
2209}
2210
2211/** Copy constructor.
2212 * @param m message to copy from
2213 */
2215{
2216 data_size = m->data_size;
2217 data_ptr = malloc(data_size);
2218 memcpy(data_ptr, m->data_ptr, data_size);
2219 data = (PlaceGotoMessage_data_t *)data_ptr;
2221}
2222
2223/* Methods */
2224/** Get place value.
2225 * Place to go to.
2226 * @return place value
2227 */
2228char *
2230{
2231 return data->place;
2232}
2233
2234/** Get maximum length of place value.
2235 * @return length of place value, can be length of the array or number of
2236 * maximum number of characters for a string
2237 */
2238size_t
2240{
2241 return 64;
2242}
2243
2244/** Set place value.
2245 * Place to go to.
2246 * @param new_place new place value
2247 */
2248void
2250{
2251 set_field(data->place, new_place);
2252}
2253
2254/** Clone this message.
2255 * Produces a message of the same type as this message and copies the
2256 * data to the new message.
2257 * @return clone of this message
2258 */
2259Message *
2261{
2262 return new NavigatorInterface::PlaceGotoMessage(this);
2263}
2264/** @class NavigatorInterface::PlaceWithOriGotoMessage <interfaces/NavigatorInterface.h>
2265 * PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
2266 *
2267
2268 */
2269
2270
2271/** Constructor with initial values.
2272 * @param ini_place initial value for place
2273 * @param ini_orientation initial value for orientation
2274 */
2275NavigatorInterface::PlaceWithOriGotoMessage::PlaceWithOriGotoMessage(const char * ini_place, const float ini_orientation) : Message("PlaceWithOriGotoMessage")
2276{
2277 data_size = sizeof(PlaceWithOriGotoMessage_data_t);
2278 data_ptr = malloc(data_size);
2279 memset(data_ptr, 0, data_size);
2280 data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
2282 strncpy(data->place, ini_place, 64-1);
2283 data->place[64-1] = 0;
2284 data->orientation = ini_orientation;
2285 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2286 enum_map_DriveMode[(int)Forward] = "Forward";
2287 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2288 enum_map_DriveMode[(int)Backward] = "Backward";
2289 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2290 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2291 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2292 add_fieldinfo(IFT_STRING, "place", 64, data->place);
2293 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
2294}
2295/** Constructor */
2297{
2298 data_size = sizeof(PlaceWithOriGotoMessage_data_t);
2299 data_ptr = malloc(data_size);
2300 memset(data_ptr, 0, data_size);
2301 data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
2303 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2304 enum_map_DriveMode[(int)Forward] = "Forward";
2305 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2306 enum_map_DriveMode[(int)Backward] = "Backward";
2307 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2308 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2309 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2310 add_fieldinfo(IFT_STRING, "place", 64, data->place);
2311 add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
2312}
2313
2314/** Destructor */
2316{
2317 free(data_ptr);
2318}
2319
2320/** Copy constructor.
2321 * @param m message to copy from
2322 */
2324{
2325 data_size = m->data_size;
2326 data_ptr = malloc(data_size);
2327 memcpy(data_ptr, m->data_ptr, data_size);
2328 data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
2330}
2331
2332/* Methods */
2333/** Get place value.
2334 * Place to go to.
2335 * @return place value
2336 */
2337char *
2339{
2340 return data->place;
2341}
2342
2343/** Get maximum length of place value.
2344 * @return length of place value, can be length of the array or number of
2345 * maximum number of characters for a string
2346 */
2347size_t
2349{
2350 return 64;
2351}
2352
2353/** Set place value.
2354 * Place to go to.
2355 * @param new_place new place value
2356 */
2357void
2359{
2360 set_field(data->place, new_place);
2361}
2362
2363/** Get orientation value.
2364 * The desired orientation of the robot at the target.
2365 * @return orientation value
2366 */
2367float
2369{
2370 return data->orientation;
2371}
2372
2373/** Get maximum length of orientation value.
2374 * @return length of orientation value, can be length of the array or number of
2375 * maximum number of characters for a string
2376 */
2377size_t
2379{
2380 return 1;
2381}
2382
2383/** Set orientation value.
2384 * The desired orientation of the robot at the target.
2385 * @param new_orientation new orientation value
2386 */
2387void
2389{
2390 set_field(data->orientation, new_orientation);
2391}
2392
2393/** Clone this message.
2394 * Produces a message of the same type as this message and copies the
2395 * data to the new message.
2396 * @return clone of this message
2397 */
2398Message *
2400{
2402}
2403/** @class NavigatorInterface::ObstacleMessage <interfaces/NavigatorInterface.h>
2404 * ObstacleMessage Fawkes BlackBoard Interface Message.
2405 *
2406
2407 */
2408
2409
2410/** Constructor with initial values.
2411 * @param ini_x initial value for x
2412 * @param ini_y initial value for y
2413 * @param ini_width initial value for width
2414 */
2415NavigatorInterface::ObstacleMessage::ObstacleMessage(const float ini_x, const float ini_y, const float ini_width) : Message("ObstacleMessage")
2416{
2417 data_size = sizeof(ObstacleMessage_data_t);
2418 data_ptr = malloc(data_size);
2419 memset(data_ptr, 0, data_size);
2420 data = (ObstacleMessage_data_t *)data_ptr;
2422 data->x = ini_x;
2423 data->y = ini_y;
2424 data->width = ini_width;
2425 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2426 enum_map_DriveMode[(int)Forward] = "Forward";
2427 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2428 enum_map_DriveMode[(int)Backward] = "Backward";
2429 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2430 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2431 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2432 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
2433 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
2434 add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
2435}
2436/** Constructor */
2438{
2439 data_size = sizeof(ObstacleMessage_data_t);
2440 data_ptr = malloc(data_size);
2441 memset(data_ptr, 0, data_size);
2442 data = (ObstacleMessage_data_t *)data_ptr;
2444 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2445 enum_map_DriveMode[(int)Forward] = "Forward";
2446 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2447 enum_map_DriveMode[(int)Backward] = "Backward";
2448 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2449 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2450 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2451 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
2452 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
2453 add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
2454}
2455
2456/** Destructor */
2458{
2459 free(data_ptr);
2460}
2461
2462/** Copy constructor.
2463 * @param m message to copy from
2464 */
2466{
2467 data_size = m->data_size;
2468 data_ptr = malloc(data_size);
2469 memcpy(data_ptr, m->data_ptr, data_size);
2470 data = (ObstacleMessage_data_t *)data_ptr;
2472}
2473
2474/* Methods */
2475/** Get x value.
2476 * X-coordinate of the obstacle.
2477 * @return x value
2478 */
2479float
2481{
2482 return data->x;
2483}
2484
2485/** Get maximum length of x value.
2486 * @return length of x value, can be length of the array or number of
2487 * maximum number of characters for a string
2488 */
2489size_t
2491{
2492 return 1;
2493}
2494
2495/** Set x value.
2496 * X-coordinate of the obstacle.
2497 * @param new_x new x value
2498 */
2499void
2501{
2502 set_field(data->x, new_x);
2503}
2504
2505/** Get y value.
2506 * Y-coordinate of the obstacle.
2507 * @return y value
2508 */
2509float
2511{
2512 return data->y;
2513}
2514
2515/** Get maximum length of y value.
2516 * @return length of y value, can be length of the array or number of
2517 * maximum number of characters for a string
2518 */
2519size_t
2521{
2522 return 1;
2523}
2524
2525/** Set y value.
2526 * Y-coordinate of the obstacle.
2527 * @param new_y new y value
2528 */
2529void
2531{
2532 set_field(data->y, new_y);
2533}
2534
2535/** Get width value.
2536 * Width of the obstacle.
2537 * @return width value
2538 */
2539float
2541{
2542 return data->width;
2543}
2544
2545/** Get maximum length of width value.
2546 * @return length of width value, can be length of the array or number of
2547 * maximum number of characters for a string
2548 */
2549size_t
2551{
2552 return 1;
2553}
2554
2555/** Set width value.
2556 * Width of the obstacle.
2557 * @param new_width new width value
2558 */
2559void
2561{
2562 set_field(data->width, new_width);
2563}
2564
2565/** Clone this message.
2566 * Produces a message of the same type as this message and copies the
2567 * data to the new message.
2568 * @return clone of this message
2569 */
2570Message *
2572{
2573 return new NavigatorInterface::ObstacleMessage(this);
2574}
2575/** @class NavigatorInterface::ResetOdometryMessage <interfaces/NavigatorInterface.h>
2576 * ResetOdometryMessage Fawkes BlackBoard Interface Message.
2577 *
2578
2579 */
2580
2581
2582/** Constructor */
2584{
2585 data_size = sizeof(ResetOdometryMessage_data_t);
2586 data_ptr = malloc(data_size);
2587 memset(data_ptr, 0, data_size);
2588 data = (ResetOdometryMessage_data_t *)data_ptr;
2590 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2591 enum_map_DriveMode[(int)Forward] = "Forward";
2592 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2593 enum_map_DriveMode[(int)Backward] = "Backward";
2594 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2595 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2596 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2597}
2598
2599/** Destructor */
2601{
2602 free(data_ptr);
2603}
2604
2605/** Copy constructor.
2606 * @param m message to copy from
2607 */
2609{
2610 data_size = m->data_size;
2611 data_ptr = malloc(data_size);
2612 memcpy(data_ptr, m->data_ptr, data_size);
2613 data = (ResetOdometryMessage_data_t *)data_ptr;
2615}
2616
2617/* Methods */
2618/** Clone this message.
2619 * Produces a message of the same type as this message and copies the
2620 * data to the new message.
2621 * @return clone of this message
2622 */
2623Message *
2625{
2627}
2628/** @class NavigatorInterface::SetMaxVelocityMessage <interfaces/NavigatorInterface.h>
2629 * SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
2630 *
2631
2632 */
2633
2634
2635/** Constructor with initial values.
2636 * @param ini_max_velocity initial value for max_velocity
2637 */
2638NavigatorInterface::SetMaxVelocityMessage::SetMaxVelocityMessage(const float ini_max_velocity) : Message("SetMaxVelocityMessage")
2639{
2640 data_size = sizeof(SetMaxVelocityMessage_data_t);
2641 data_ptr = malloc(data_size);
2642 memset(data_ptr, 0, data_size);
2643 data = (SetMaxVelocityMessage_data_t *)data_ptr;
2645 data->max_velocity = ini_max_velocity;
2646 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2647 enum_map_DriveMode[(int)Forward] = "Forward";
2648 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2649 enum_map_DriveMode[(int)Backward] = "Backward";
2650 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2651 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2652 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2653 add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
2654}
2655/** Constructor */
2657{
2658 data_size = sizeof(SetMaxVelocityMessage_data_t);
2659 data_ptr = malloc(data_size);
2660 memset(data_ptr, 0, data_size);
2661 data = (SetMaxVelocityMessage_data_t *)data_ptr;
2663 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2664 enum_map_DriveMode[(int)Forward] = "Forward";
2665 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2666 enum_map_DriveMode[(int)Backward] = "Backward";
2667 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2668 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2669 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2670 add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
2671}
2672
2673/** Destructor */
2675{
2676 free(data_ptr);
2677}
2678
2679/** Copy constructor.
2680 * @param m message to copy from
2681 */
2683{
2684 data_size = m->data_size;
2685 data_ptr = malloc(data_size);
2686 memcpy(data_ptr, m->data_ptr, data_size);
2687 data = (SetMaxVelocityMessage_data_t *)data_ptr;
2689}
2690
2691/* Methods */
2692/** Get max_velocity value.
2693 * Maximum velocity
2694 * @return max_velocity value
2695 */
2696float
2698{
2699 return data->max_velocity;
2700}
2701
2702/** Get maximum length of max_velocity value.
2703 * @return length of max_velocity value, can be length of the array or number of
2704 * maximum number of characters for a string
2705 */
2706size_t
2708{
2709 return 1;
2710}
2711
2712/** Set max_velocity value.
2713 * Maximum velocity
2714 * @param new_max_velocity new max_velocity value
2715 */
2716void
2718{
2719 set_field(data->max_velocity, new_max_velocity);
2720}
2721
2722/** Clone this message.
2723 * Produces a message of the same type as this message and copies the
2724 * data to the new message.
2725 * @return clone of this message
2726 */
2727Message *
2729{
2731}
2732/** @class NavigatorInterface::SetMaxRotationMessage <interfaces/NavigatorInterface.h>
2733 * SetMaxRotationMessage Fawkes BlackBoard Interface Message.
2734 *
2735
2736 */
2737
2738
2739/** Constructor with initial values.
2740 * @param ini_max_rotation initial value for max_rotation
2741 */
2742NavigatorInterface::SetMaxRotationMessage::SetMaxRotationMessage(const float ini_max_rotation) : Message("SetMaxRotationMessage")
2743{
2744 data_size = sizeof(SetMaxRotationMessage_data_t);
2745 data_ptr = malloc(data_size);
2746 memset(data_ptr, 0, data_size);
2747 data = (SetMaxRotationMessage_data_t *)data_ptr;
2749 data->max_rotation = ini_max_rotation;
2750 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2751 enum_map_DriveMode[(int)Forward] = "Forward";
2752 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2753 enum_map_DriveMode[(int)Backward] = "Backward";
2754 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2755 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2756 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2757 add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
2758}
2759/** Constructor */
2761{
2762 data_size = sizeof(SetMaxRotationMessage_data_t);
2763 data_ptr = malloc(data_size);
2764 memset(data_ptr, 0, data_size);
2765 data = (SetMaxRotationMessage_data_t *)data_ptr;
2767 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2768 enum_map_DriveMode[(int)Forward] = "Forward";
2769 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2770 enum_map_DriveMode[(int)Backward] = "Backward";
2771 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2772 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2773 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2774 add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
2775}
2776
2777/** Destructor */
2779{
2780 free(data_ptr);
2781}
2782
2783/** Copy constructor.
2784 * @param m message to copy from
2785 */
2787{
2788 data_size = m->data_size;
2789 data_ptr = malloc(data_size);
2790 memcpy(data_ptr, m->data_ptr, data_size);
2791 data = (SetMaxRotationMessage_data_t *)data_ptr;
2793}
2794
2795/* Methods */
2796/** Get max_rotation value.
2797 * Maximum rotation velocity
2798 * @return max_rotation value
2799 */
2800float
2802{
2803 return data->max_rotation;
2804}
2805
2806/** Get maximum length of max_rotation value.
2807 * @return length of max_rotation value, can be length of the array or number of
2808 * maximum number of characters for a string
2809 */
2810size_t
2812{
2813 return 1;
2814}
2815
2816/** Set max_rotation value.
2817 * Maximum rotation velocity
2818 * @param new_max_rotation new max_rotation value
2819 */
2820void
2822{
2823 set_field(data->max_rotation, new_max_rotation);
2824}
2825
2826/** Clone this message.
2827 * Produces a message of the same type as this message and copies the
2828 * data to the new message.
2829 * @return clone of this message
2830 */
2831Message *
2833{
2835}
2836/** @class NavigatorInterface::SetEscapingMessage <interfaces/NavigatorInterface.h>
2837 * SetEscapingMessage Fawkes BlackBoard Interface Message.
2838 *
2839
2840 */
2841
2842
2843/** Constructor with initial values.
2844 * @param ini_escaping_enabled initial value for escaping_enabled
2845 */
2846NavigatorInterface::SetEscapingMessage::SetEscapingMessage(const bool ini_escaping_enabled) : Message("SetEscapingMessage")
2847{
2848 data_size = sizeof(SetEscapingMessage_data_t);
2849 data_ptr = malloc(data_size);
2850 memset(data_ptr, 0, data_size);
2851 data = (SetEscapingMessage_data_t *)data_ptr;
2853 data->escaping_enabled = ini_escaping_enabled;
2854 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2855 enum_map_DriveMode[(int)Forward] = "Forward";
2856 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2857 enum_map_DriveMode[(int)Backward] = "Backward";
2858 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2859 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2860 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2861 add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2862}
2863/** Constructor */
2865{
2866 data_size = sizeof(SetEscapingMessage_data_t);
2867 data_ptr = malloc(data_size);
2868 memset(data_ptr, 0, data_size);
2869 data = (SetEscapingMessage_data_t *)data_ptr;
2871 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2872 enum_map_DriveMode[(int)Forward] = "Forward";
2873 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2874 enum_map_DriveMode[(int)Backward] = "Backward";
2875 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2876 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2877 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2878 add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2879}
2880
2881/** Destructor */
2883{
2884 free(data_ptr);
2885}
2886
2887/** Copy constructor.
2888 * @param m message to copy from
2889 */
2891{
2892 data_size = m->data_size;
2893 data_ptr = malloc(data_size);
2894 memcpy(data_ptr, m->data_ptr, data_size);
2895 data = (SetEscapingMessage_data_t *)data_ptr;
2897}
2898
2899/* Methods */
2900/** Get escaping_enabled value.
2901 * This is used for navigation components with integrated collision avoidance,
2902 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2903 * @return escaping_enabled value
2904 */
2905bool
2907{
2908 return data->escaping_enabled;
2909}
2910
2911/** Get maximum length of escaping_enabled value.
2912 * @return length of escaping_enabled value, can be length of the array or number of
2913 * maximum number of characters for a string
2914 */
2915size_t
2917{
2918 return 1;
2919}
2920
2921/** Set escaping_enabled value.
2922 * This is used for navigation components with integrated collision avoidance,
2923 to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2924 * @param new_escaping_enabled new escaping_enabled value
2925 */
2926void
2928{
2929 set_field(data->escaping_enabled, new_escaping_enabled);
2930}
2931
2932/** Clone this message.
2933 * Produces a message of the same type as this message and copies the
2934 * data to the new message.
2935 * @return clone of this message
2936 */
2937Message *
2939{
2941}
2942/** @class NavigatorInterface::SetSecurityDistanceMessage <interfaces/NavigatorInterface.h>
2943 * SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
2944 *
2945
2946 */
2947
2948
2949/** Constructor with initial values.
2950 * @param ini_security_distance initial value for security_distance
2951 */
2952NavigatorInterface::SetSecurityDistanceMessage::SetSecurityDistanceMessage(const float ini_security_distance) : Message("SetSecurityDistanceMessage")
2953{
2954 data_size = sizeof(SetSecurityDistanceMessage_data_t);
2955 data_ptr = malloc(data_size);
2956 memset(data_ptr, 0, data_size);
2957 data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2959 data->security_distance = ini_security_distance;
2960 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2961 enum_map_DriveMode[(int)Forward] = "Forward";
2962 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2963 enum_map_DriveMode[(int)Backward] = "Backward";
2964 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2965 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2966 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2967 add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2968}
2969/** Constructor */
2971{
2972 data_size = sizeof(SetSecurityDistanceMessage_data_t);
2973 data_ptr = malloc(data_size);
2974 memset(data_ptr, 0, data_size);
2975 data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2977 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2978 enum_map_DriveMode[(int)Forward] = "Forward";
2979 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2980 enum_map_DriveMode[(int)Backward] = "Backward";
2981 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2982 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2983 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2984 add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2985}
2986
2987/** Destructor */
2989{
2990 free(data_ptr);
2991}
2992
2993/** Copy constructor.
2994 * @param m message to copy from
2995 */
2997{
2998 data_size = m->data_size;
2999 data_ptr = malloc(data_size);
3000 memcpy(data_ptr, m->data_ptr, data_size);
3001 data = (SetSecurityDistanceMessage_data_t *)data_ptr;
3003}
3004
3005/* Methods */
3006/** Get security_distance value.
3007 * Security distance to keep to obstacles
3008 * @return security_distance value
3009 */
3010float
3012{
3013 return data->security_distance;
3014}
3015
3016/** Get maximum length of security_distance value.
3017 * @return length of security_distance value, can be length of the array or number of
3018 * maximum number of characters for a string
3019 */
3020size_t
3022{
3023 return 1;
3024}
3025
3026/** Set security_distance value.
3027 * Security distance to keep to obstacles
3028 * @param new_security_distance new security_distance value
3029 */
3030void
3032{
3033 set_field(data->security_distance, new_security_distance);
3034}
3035
3036/** Clone this message.
3037 * Produces a message of the same type as this message and copies the
3038 * data to the new message.
3039 * @return clone of this message
3040 */
3041Message *
3043{
3045}
3046/** @class NavigatorInterface::SetDriveModeMessage <interfaces/NavigatorInterface.h>
3047 * SetDriveModeMessage Fawkes BlackBoard Interface Message.
3048 *
3049
3050 */
3051
3052
3053/** Constructor with initial values.
3054 * @param ini_drive_mode initial value for drive_mode
3055 */
3057{
3058 data_size = sizeof(SetDriveModeMessage_data_t);
3059 data_ptr = malloc(data_size);
3060 memset(data_ptr, 0, data_size);
3061 data = (SetDriveModeMessage_data_t *)data_ptr;
3063 data->drive_mode = ini_drive_mode;
3064 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3065 enum_map_DriveMode[(int)Forward] = "Forward";
3066 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3067 enum_map_DriveMode[(int)Backward] = "Backward";
3068 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3069 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3070 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3071 add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
3072}
3073/** Constructor */
3075{
3076 data_size = sizeof(SetDriveModeMessage_data_t);
3077 data_ptr = malloc(data_size);
3078 memset(data_ptr, 0, data_size);
3079 data = (SetDriveModeMessage_data_t *)data_ptr;
3081 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3082 enum_map_DriveMode[(int)Forward] = "Forward";
3083 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3084 enum_map_DriveMode[(int)Backward] = "Backward";
3085 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3086 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3087 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3088 add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
3089}
3090
3091/** Destructor */
3093{
3094 free(data_ptr);
3095}
3096
3097/** Copy constructor.
3098 * @param m message to copy from
3099 */
3101{
3102 data_size = m->data_size;
3103 data_ptr = malloc(data_size);
3104 memcpy(data_ptr, m->data_ptr, data_size);
3105 data = (SetDriveModeMessage_data_t *)data_ptr;
3107}
3108
3109/* Methods */
3110/** Get drive_mode value.
3111 * Current drive mode
3112 * @return drive_mode value
3113 */
3116{
3117 return (NavigatorInterface::DriveMode)data->drive_mode;
3118}
3119
3120/** Get maximum length of drive_mode value.
3121 * @return length of drive_mode value, can be length of the array or number of
3122 * maximum number of characters for a string
3123 */
3124size_t
3126{
3127 return 1;
3128}
3129
3130/** Set drive_mode value.
3131 * Current drive mode
3132 * @param new_drive_mode new drive_mode value
3133 */
3134void
3136{
3137 set_field(data->drive_mode, new_drive_mode);
3138}
3139
3140/** Clone this message.
3141 * Produces a message of the same type as this message and copies the
3142 * data to the new message.
3143 * @return clone of this message
3144 */
3145Message *
3147{
3149}
3150/** @class NavigatorInterface::SetStopAtTargetMessage <interfaces/NavigatorInterface.h>
3151 * SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
3152 *
3153
3154 */
3155
3156
3157/** Constructor with initial values.
3158 * @param ini_stop_at_target initial value for stop_at_target
3159 */
3160NavigatorInterface::SetStopAtTargetMessage::SetStopAtTargetMessage(const bool ini_stop_at_target) : Message("SetStopAtTargetMessage")
3161{
3162 data_size = sizeof(SetStopAtTargetMessage_data_t);
3163 data_ptr = malloc(data_size);
3164 memset(data_ptr, 0, data_size);
3165 data = (SetStopAtTargetMessage_data_t *)data_ptr;
3167 data->stop_at_target = ini_stop_at_target;
3168 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3169 enum_map_DriveMode[(int)Forward] = "Forward";
3170 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3171 enum_map_DriveMode[(int)Backward] = "Backward";
3172 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3173 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3174 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3175 add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
3176}
3177/** Constructor */
3179{
3180 data_size = sizeof(SetStopAtTargetMessage_data_t);
3181 data_ptr = malloc(data_size);
3182 memset(data_ptr, 0, data_size);
3183 data = (SetStopAtTargetMessage_data_t *)data_ptr;
3185 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3186 enum_map_DriveMode[(int)Forward] = "Forward";
3187 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3188 enum_map_DriveMode[(int)Backward] = "Backward";
3189 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3190 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3191 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3192 add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
3193}
3194
3195/** Destructor */
3197{
3198 free(data_ptr);
3199}
3200
3201/** Copy constructor.
3202 * @param m message to copy from
3203 */
3205{
3206 data_size = m->data_size;
3207 data_ptr = malloc(data_size);
3208 memcpy(data_ptr, m->data_ptr, data_size);
3209 data = (SetStopAtTargetMessage_data_t *)data_ptr;
3211}
3212
3213/* Methods */
3214/** Get stop_at_target value.
3215 * Stop when target is reached?
3216 * @return stop_at_target value
3217 */
3218bool
3220{
3221 return data->stop_at_target;
3222}
3223
3224/** Get maximum length of stop_at_target value.
3225 * @return length of stop_at_target value, can be length of the array or number of
3226 * maximum number of characters for a string
3227 */
3228size_t
3230{
3231 return 1;
3232}
3233
3234/** Set stop_at_target value.
3235 * Stop when target is reached?
3236 * @param new_stop_at_target new stop_at_target value
3237 */
3238void
3240{
3241 set_field(data->stop_at_target, new_stop_at_target);
3242}
3243
3244/** Clone this message.
3245 * Produces a message of the same type as this message and copies the
3246 * data to the new message.
3247 * @return clone of this message
3248 */
3249Message *
3251{
3253}
3254/** @class NavigatorInterface::SetOrientationModeMessage <interfaces/NavigatorInterface.h>
3255 * SetOrientationModeMessage Fawkes BlackBoard Interface Message.
3256 *
3257
3258 */
3259
3260
3261/** Constructor with initial values.
3262 * @param ini_orientation_mode initial value for orientation_mode
3263 */
3265{
3266 data_size = sizeof(SetOrientationModeMessage_data_t);
3267 data_ptr = malloc(data_size);
3268 memset(data_ptr, 0, data_size);
3269 data = (SetOrientationModeMessage_data_t *)data_ptr;
3271 data->orientation_mode = ini_orientation_mode;
3272 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3273 enum_map_DriveMode[(int)Forward] = "Forward";
3274 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3275 enum_map_DriveMode[(int)Backward] = "Backward";
3276 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3277 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3278 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3279 add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
3280}
3281/** Constructor */
3283{
3284 data_size = sizeof(SetOrientationModeMessage_data_t);
3285 data_ptr = malloc(data_size);
3286 memset(data_ptr, 0, data_size);
3287 data = (SetOrientationModeMessage_data_t *)data_ptr;
3289 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3290 enum_map_DriveMode[(int)Forward] = "Forward";
3291 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3292 enum_map_DriveMode[(int)Backward] = "Backward";
3293 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3294 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3295 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3296 add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
3297}
3298
3299/** Destructor */
3301{
3302 free(data_ptr);
3303}
3304
3305/** Copy constructor.
3306 * @param m message to copy from
3307 */
3309{
3310 data_size = m->data_size;
3311 data_ptr = malloc(data_size);
3312 memcpy(data_ptr, m->data_ptr, data_size);
3313 data = (SetOrientationModeMessage_data_t *)data_ptr;
3315}
3316
3317/* Methods */
3318/** Get orientation_mode value.
3319 * Mode how/when to orientate if orientation is given
3320 * @return orientation_mode value
3321 */
3324{
3325 return (NavigatorInterface::OrientationMode)data->orientation_mode;
3326}
3327
3328/** Get maximum length of orientation_mode value.
3329 * @return length of orientation_mode value, can be length of the array or number of
3330 * maximum number of characters for a string
3331 */
3332size_t
3334{
3335 return 1;
3336}
3337
3338/** Set orientation_mode value.
3339 * Mode how/when to orientate if orientation is given
3340 * @param new_orientation_mode new orientation_mode value
3341 */
3342void
3344{
3345 set_field(data->orientation_mode, new_orientation_mode);
3346}
3347
3348/** Clone this message.
3349 * Produces a message of the same type as this message and copies the
3350 * data to the new message.
3351 * @return clone of this message
3352 */
3353Message *
3355{
3357}
3358/** @class NavigatorInterface::ResetParametersMessage <interfaces/NavigatorInterface.h>
3359 * ResetParametersMessage Fawkes BlackBoard Interface Message.
3360 *
3361
3362 */
3363
3364
3365/** Constructor */
3367{
3368 data_size = sizeof(ResetParametersMessage_data_t);
3369 data_ptr = malloc(data_size);
3370 memset(data_ptr, 0, data_size);
3371 data = (ResetParametersMessage_data_t *)data_ptr;
3373 enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
3374 enum_map_DriveMode[(int)Forward] = "Forward";
3375 enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
3376 enum_map_DriveMode[(int)Backward] = "Backward";
3377 enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
3378 enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
3379 enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
3380}
3381
3382/** Destructor */
3384{
3385 free(data_ptr);
3386}
3387
3388/** Copy constructor.
3389 * @param m message to copy from
3390 */
3392{
3393 data_size = m->data_size;
3394 data_ptr = malloc(data_size);
3395 memcpy(data_ptr, m->data_ptr, data_size);
3396 data = (ResetParametersMessage_data_t *)data_ptr;
3398}
3399
3400/* Methods */
3401/** Clone this message.
3402 * Produces a message of the same type as this message and copies the
3403 * data to the new message.
3404 * @return clone of this message
3405 */
3406Message *
3408{
3410}
3411/** Check if message is valid and can be enqueued.
3412 * @param message Message to check
3413 * @return true if the message is valid, false otherwise.
3414 */
3415bool
3417{
3418 const StopMessage *m0 = dynamic_cast<const StopMessage *>(message);
3419 if ( m0 != NULL ) {
3420 return true;
3421 }
3422 const TurnMessage *m1 = dynamic_cast<const TurnMessage *>(message);
3423 if ( m1 != NULL ) {
3424 return true;
3425 }
3426 const CartesianGotoMessage *m2 = dynamic_cast<const CartesianGotoMessage *>(message);
3427 if ( m2 != NULL ) {
3428 return true;
3429 }
3430 const CartesianGotoWithToleranceMessage *m3 = dynamic_cast<const CartesianGotoWithToleranceMessage *>(message);
3431 if ( m3 != NULL ) {
3432 return true;
3433 }
3434 const CartesianGotoWithFrameMessage *m4 = dynamic_cast<const CartesianGotoWithFrameMessage *>(message);
3435 if ( m4 != NULL ) {
3436 return true;
3437 }
3439 if ( m5 != NULL ) {
3440 return true;
3441 }
3442 const PolarGotoMessage *m6 = dynamic_cast<const PolarGotoMessage *>(message);
3443 if ( m6 != NULL ) {
3444 return true;
3445 }
3446 const PlaceGotoMessage *m7 = dynamic_cast<const PlaceGotoMessage *>(message);
3447 if ( m7 != NULL ) {
3448 return true;
3449 }
3450 const PlaceWithOriGotoMessage *m8 = dynamic_cast<const PlaceWithOriGotoMessage *>(message);
3451 if ( m8 != NULL ) {
3452 return true;
3453 }
3454 const ObstacleMessage *m9 = dynamic_cast<const ObstacleMessage *>(message);
3455 if ( m9 != NULL ) {
3456 return true;
3457 }
3458 const ResetOdometryMessage *m10 = dynamic_cast<const ResetOdometryMessage *>(message);
3459 if ( m10 != NULL ) {
3460 return true;
3461 }
3462 const SetMaxVelocityMessage *m11 = dynamic_cast<const SetMaxVelocityMessage *>(message);
3463 if ( m11 != NULL ) {
3464 return true;
3465 }
3466 const SetMaxRotationMessage *m12 = dynamic_cast<const SetMaxRotationMessage *>(message);
3467 if ( m12 != NULL ) {
3468 return true;
3469 }
3470 const SetEscapingMessage *m13 = dynamic_cast<const SetEscapingMessage *>(message);
3471 if ( m13 != NULL ) {
3472 return true;
3473 }
3474 const SetSecurityDistanceMessage *m14 = dynamic_cast<const SetSecurityDistanceMessage *>(message);
3475 if ( m14 != NULL ) {
3476 return true;
3477 }
3478 const SetDriveModeMessage *m15 = dynamic_cast<const SetDriveModeMessage *>(message);
3479 if ( m15 != NULL ) {
3480 return true;
3481 }
3482 const SetStopAtTargetMessage *m16 = dynamic_cast<const SetStopAtTargetMessage *>(message);
3483 if ( m16 != NULL ) {
3484 return true;
3485 }
3486 const SetOrientationModeMessage *m17 = dynamic_cast<const SetOrientationModeMessage *>(message);
3487 if ( m17 != NULL ) {
3488 return true;
3489 }
3490 const ResetParametersMessage *m18 = dynamic_cast<const ResetParametersMessage *>(message);
3491 if ( m18 != NULL ) {
3492 return true;
3493 }
3494 return false;
3495}
3496
3497/// @cond INTERNALS
3498EXPORT_INTERFACE(NavigatorInterface)
3499/// @endcond
3500
3501
3502} // end namespace fawkes
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:244
void set_field(FieldT &field, DataT &data)
Set a field, set data_changed to true and update data_changed accordingly.
Definition: interface.h:304
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
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:435
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:146
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:156
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:147
CartesianGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_orientation(const float new_orientation)
Set orientation value.
float orientation() const
Get orientation value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
CartesianGotoWithFrameMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
size_t maxlenof_y() const
Get maximum length of y value.
void set_orientation(const float new_orientation)
Set orientation value.
CartesianGotoWithFrameWithToleranceMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_orientation_tolerance() const
Get maximum length of orientation_tolerance value.
void set_orientation_tolerance(const float new_orientation_tolerance)
Set orientation_tolerance value.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
void set_translation_tolerance(const float new_translation_tolerance)
Set translation_tolerance value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
CartesianGotoWithToleranceMessage Fawkes BlackBoard Interface Message.
float orientation_tolerance() const
Get orientation_tolerance value.
void set_orientation_tolerance(const float new_orientation_tolerance)
Set orientation_tolerance value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_orientation_tolerance() const
Get maximum length of orientation_tolerance value.
void set_translation_tolerance(const float new_translation_tolerance)
Set translation_tolerance value.
float translation_tolerance() const
Get translation_tolerance value.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
ObstacleMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_y(const float new_y)
Set y value.
void set_width(const float new_width)
Set width value.
size_t maxlenof_width() const
Get maximum length of width value.
void set_x(const float new_x)
Set x value.
PlaceGotoMessage Fawkes BlackBoard Interface Message.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_place() const
Get maximum length of place value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_place() const
Get maximum length of place value.
PolarGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_phi() const
Get maximum length of phi value.
float orientation() const
Get orientation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
size_t maxlenof_dist() const
Get maximum length of dist value.
void set_dist(const float new_dist)
Set dist value.
virtual Message * clone() const
Clone this message.
void set_phi(const float new_phi)
Set phi value.
void set_orientation(const float new_orientation)
Set orientation value.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
ResetParametersMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
SetDriveModeMessage Fawkes BlackBoard Interface Message.
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
virtual Message * clone() const
Clone this message.
DriveMode drive_mode() const
Get drive_mode value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
SetEscapingMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
bool is_escaping_enabled() const
Get escaping_enabled value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
SetMaxRotationMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
virtual Message * clone() const
Clone this message.
float max_rotation() const
Get max_rotation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
float max_velocity() const
Get max_velocity value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
SetOrientationModeMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
OrientationMode orientation_mode() const
Get orientation_mode value.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
void set_security_distance(const float new_security_distance)
Set security_distance value.
virtual Message * clone() const
Clone this message.
float security_distance() const
Get security_distance value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
bool is_stop_at_target() const
Get stop_at_target value.
virtual Message * clone() const
Clone this message.
StopMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
virtual Message * clone() const
Clone this message.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
uint32_t msgid() const
Get msgid value.
TurnMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
float velocity() const
Get velocity value.
virtual Message * clone() const
Clone this message.
void set_angle(const float new_angle)
Set angle value.
size_t maxlenof_angle() const
Get maximum length of angle value.
void set_velocity(const float new_velocity)
Set velocity value.
NavigatorInterface Fawkes BlackBoard Interface.
static const uint32_t FLAG_SECURITY_DISTANCE
FLAG_SECURITY_DISTANCE constant.
static const uint32_t FLAG_PLACE_GOTO
FLAG_PLACE_GOTO constant.
static const uint32_t ERROR_UNKNOWN_PLACE
ERROR_UNKNOWN_PLACE constant.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
@ Forward
Moving forward constant.
@ AllowBackward
Moving allow backward constant.
@ Backward
Moving backward constant.
@ MovingNotAllowed
Moving not allowed constant.
static const uint32_t FLAG_CART_GOTO
FLAG_CART_GOTO constant.
OrientationMode
Orientation mode enum.
@ OrientDuringTravel
Orient during travel BUT NOT at target, if omnidirectional platform and orientation is given.
@ OrientAtTarget
Orient when at target, if orientation is given.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t ERROR_PATH_GEN_FAIL
ERROR_PATH_GEN_FAIL constant.
static const uint32_t FLAG_UPDATES_DEST_DIST
FLAG_UPDATES_DEST_DIST constant.
static const uint32_t FLAG_ESCAPING
FLAG_ESCAPING constant.
static const uint32_t ERROR_MOTOR
ERROR_MOTOR constant.
static const uint32_t ERROR_OBSTRUCTION
ERROR_OBSTRUCTION constant.
static const uint32_t FLAG_NONE
FLAG_NONE constant.
static const uint32_t FLAG_POLAR_GOTO
FLAG_POLAR_GOTO constant.
Fawkes library namespace.
@ OrientAtTarget
Indicating that the robot is at target and has to orient.
Definition: types.h:35
@ IFT_UINT32
32 bit unsigned integer field
Definition: types.h:43
@ IFT_FLOAT
float field
Definition: types.h:46
@ IFT_STRING
string field
Definition: types.h:48
@ IFT_BOOL
boolean field
Definition: types.h:37
@ IFT_ENUM
field with interface specific enum type
Definition: types.h:50
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:152