24#include <interfaces/NavigatorInterface.h>
26#include <core/exceptions/software.h>
80NavigatorInterface::NavigatorInterface() : Interface()
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};
137NavigatorInterface::~NavigatorInterface()
146NavigatorInterface::tostring_DriveMode(
DriveMode value)
const
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";
166 case OrientDuringTravel:
return "OrientDuringTravel";
167 default:
return "UNKNOWN";
177NavigatorInterface::flags()
const
187NavigatorInterface::maxlenof_flags()
const
198NavigatorInterface::set_flags(
const uint32_t new_flags)
200 set_field(data->flags, new_flags);
208NavigatorInterface::x()
const
218NavigatorInterface::maxlenof_x()
const
228NavigatorInterface::set_x(
const float new_x)
230 set_field(data->x, new_x);
238NavigatorInterface::y()
const
248NavigatorInterface::maxlenof_y()
const
258NavigatorInterface::set_y(
const float new_y)
260 set_field(data->y, new_y);
268NavigatorInterface::dest_x()
const
278NavigatorInterface::maxlenof_dest_x()
const
288NavigatorInterface::set_dest_x(
const float new_dest_x)
290 set_field(data->dest_x, new_dest_x);
298NavigatorInterface::dest_y()
const
308NavigatorInterface::maxlenof_dest_y()
const
318NavigatorInterface::set_dest_y(
const float new_dest_y)
320 set_field(data->dest_y, new_dest_y);
328NavigatorInterface::dest_ori()
const
330 return data->dest_ori;
338NavigatorInterface::maxlenof_dest_ori()
const
348NavigatorInterface::set_dest_ori(
const float new_dest_ori)
350 set_field(data->dest_ori, new_dest_ori);
358NavigatorInterface::dest_dist()
const
360 return data->dest_dist;
368NavigatorInterface::maxlenof_dest_dist()
const
378NavigatorInterface::set_dest_dist(
const float new_dest_dist)
380 set_field(data->dest_dist, new_dest_dist);
389NavigatorInterface::msgid()
const
399NavigatorInterface::maxlenof_msgid()
const
410NavigatorInterface::set_msgid(
const uint32_t new_msgid)
412 set_field(data->msgid, new_msgid);
421NavigatorInterface::is_final()
const
431NavigatorInterface::maxlenof_final()
const
442NavigatorInterface::set_final(
const bool new_final)
444 set_field(data->final, new_final);
454NavigatorInterface::error_code()
const
456 return data->error_code;
464NavigatorInterface::maxlenof_error_code()
const
476NavigatorInterface::set_error_code(
const uint32_t new_error_code)
478 set_field(data->error_code, new_error_code);
486NavigatorInterface::max_velocity()
const
488 return data->max_velocity;
496NavigatorInterface::maxlenof_max_velocity()
const
506NavigatorInterface::set_max_velocity(
const float new_max_velocity)
508 set_field(data->max_velocity, new_max_velocity);
516NavigatorInterface::max_rotation()
const
518 return data->max_rotation;
526NavigatorInterface::maxlenof_max_rotation()
const
536NavigatorInterface::set_max_rotation(
const float new_max_rotation)
538 set_field(data->max_rotation, new_max_rotation);
546NavigatorInterface::security_distance()
const
548 return data->security_distance;
556NavigatorInterface::maxlenof_security_distance()
const
566NavigatorInterface::set_security_distance(
const float new_security_distance)
568 set_field(data->security_distance, new_security_distance);
577NavigatorInterface::is_escaping_enabled()
const
579 return data->escaping_enabled;
587NavigatorInterface::maxlenof_escaping_enabled()
const
598NavigatorInterface::set_escaping_enabled(
const bool new_escaping_enabled)
600 set_field(data->escaping_enabled, new_escaping_enabled);
608NavigatorInterface::drive_mode()
const
618NavigatorInterface::maxlenof_drive_mode()
const
628NavigatorInterface::set_drive_mode(
const DriveMode new_drive_mode)
630 set_field(data->drive_mode, new_drive_mode);
640NavigatorInterface::is_auto_drive_mode()
const
642 return data->auto_drive_mode;
650NavigatorInterface::maxlenof_auto_drive_mode()
const
662NavigatorInterface::set_auto_drive_mode(
const bool new_auto_drive_mode)
664 set_field(data->auto_drive_mode, new_auto_drive_mode);
672NavigatorInterface::is_stop_at_target()
const
674 return data->stop_at_target;
682NavigatorInterface::maxlenof_stop_at_target()
const
692NavigatorInterface::set_stop_at_target(
const bool new_stop_at_target)
694 set_field(data->stop_at_target, new_stop_at_target);
702NavigatorInterface::orientation_mode()
const
712NavigatorInterface::maxlenof_orientation_mode()
const
724 set_field(data->orientation_mode, new_orientation_mode);
732NavigatorInterface::target_frame()
const
734 return data->target_frame;
742NavigatorInterface::maxlenof_target_frame()
const
752NavigatorInterface::set_target_frame(
const char * new_target_frame)
754 set_field(data->target_frame, new_target_frame);
759NavigatorInterface::create_message(
const char *type)
const
761 if ( strncmp(
"StopMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
763 }
else if ( strncmp(
"TurnMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
765 }
else if ( strncmp(
"CartesianGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
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 ) {
775 }
else if ( strncmp(
"PlaceGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
777 }
else if ( strncmp(
"PlaceWithOriGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
779 }
else if ( strncmp(
"ObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
781 }
else if ( strncmp(
"ResetOdometryMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
783 }
else if ( strncmp(
"SetMaxVelocityMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
785 }
else if ( strncmp(
"SetMaxRotationMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
787 }
else if ( strncmp(
"SetEscapingMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
789 }
else if ( strncmp(
"SetSecurityDistanceMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
791 }
else if ( strncmp(
"SetDriveModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
793 }
else if ( strncmp(
"SetStopAtTargetMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
795 }
else if ( strncmp(
"SetOrientationModeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
797 }
else if ( strncmp(
"ResetParametersMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
801 "message type for this interface type.", type);
815 type(), other->
type());
817 memcpy(data, oi->data,
sizeof(NavigatorInterface_data_t));
821NavigatorInterface::enum_tostring(
const char *enumtype,
int val)
const
823 if (strcmp(enumtype,
"DriveMode") == 0) {
824 return tostring_DriveMode((
DriveMode)val);
826 if (strcmp(enumtype,
"OrientationMode") == 0) {
843NavigatorInterface::StopMessage::StopMessage(
const uint32_t ini_msgid) :
Message(
"StopMessage")
848 data = (StopMessage_data_t *)
data_ptr;
850 data->msgid = ini_msgid;
852 enum_map_DriveMode[(int)
Forward] =
"Forward";
854 enum_map_DriveMode[(int)
Backward] =
"Backward";
855 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
866 data = (StopMessage_data_t *)
data_ptr;
869 enum_map_DriveMode[(int)
Forward] =
"Forward";
871 enum_map_DriveMode[(int)
Backward] =
"Backward";
872 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
892 data = (StopMessage_data_t *)
data_ptr;
969 data = (TurnMessage_data_t *)
data_ptr;
971 data->angle = ini_angle;
972 data->velocity = ini_velocity;
974 enum_map_DriveMode[(int)
Forward] =
"Forward";
976 enum_map_DriveMode[(int)
Backward] =
"Backward";
977 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
989 data = (TurnMessage_data_t *)
data_ptr;
992 enum_map_DriveMode[(int)
Forward] =
"Forward";
994 enum_map_DriveMode[(int)
Backward] =
"Backward";
995 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1016 data = (TurnMessage_data_t *)
data_ptr;
1059 return data->velocity;
1080 set_field(data->velocity, new_velocity);
1107 data_size =
sizeof(CartesianGotoMessage_data_t);
1110 data = (CartesianGotoMessage_data_t *)
data_ptr;
1114 data->orientation = ini_orientation;
1116 enum_map_DriveMode[(int)
Forward] =
"Forward";
1118 enum_map_DriveMode[(int)
Backward] =
"Backward";
1119 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1120 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1129 data_size =
sizeof(CartesianGotoMessage_data_t);
1132 data = (CartesianGotoMessage_data_t *)
data_ptr;
1135 enum_map_DriveMode[(int)
Forward] =
"Forward";
1137 enum_map_DriveMode[(int)
Backward] =
"Backward";
1138 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1139 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1160 data = (CartesianGotoMessage_data_t *)
data_ptr;
1232 return data->orientation;
1252 set_field(data->orientation, new_orientation);
1281 data_size =
sizeof(CartesianGotoWithToleranceMessage_data_t);
1284 data = (CartesianGotoWithToleranceMessage_data_t *)
data_ptr;
1288 data->orientation = ini_orientation;
1289 data->translation_tolerance = ini_translation_tolerance;
1290 data->orientation_tolerance = ini_orientation_tolerance;
1292 enum_map_DriveMode[(int)
Forward] =
"Forward";
1294 enum_map_DriveMode[(int)
Backward] =
"Backward";
1295 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1296 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1307 data_size =
sizeof(CartesianGotoWithToleranceMessage_data_t);
1310 data = (CartesianGotoWithToleranceMessage_data_t *)
data_ptr;
1313 enum_map_DriveMode[(int)
Forward] =
"Forward";
1315 enum_map_DriveMode[(int)
Backward] =
"Backward";
1316 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1317 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1340 data = (CartesianGotoWithToleranceMessage_data_t *)
data_ptr;
1412 return data->orientation;
1432 set_field(data->orientation, new_orientation);
1442 return data->translation_tolerance;
1462 set_field(data->translation_tolerance, new_translation_tolerance);
1472 return data->orientation_tolerance;
1492 set_field(data->orientation_tolerance, new_orientation_tolerance);
1520 data_size =
sizeof(CartesianGotoWithFrameMessage_data_t);
1523 data = (CartesianGotoWithFrameMessage_data_t *)
data_ptr;
1527 data->orientation = ini_orientation;
1528 strncpy(data->target_frame, ini_target_frame, 64-1);
1529 data->target_frame[64-1] = 0;
1531 enum_map_DriveMode[(int)
Forward] =
"Forward";
1533 enum_map_DriveMode[(int)
Backward] =
"Backward";
1534 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1535 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1545 data_size =
sizeof(CartesianGotoWithFrameMessage_data_t);
1548 data = (CartesianGotoWithFrameMessage_data_t *)
data_ptr;
1551 enum_map_DriveMode[(int)
Forward] =
"Forward";
1553 enum_map_DriveMode[(int)
Backward] =
"Backward";
1554 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1555 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1577 data = (CartesianGotoWithFrameMessage_data_t *)
data_ptr;
1649 return data->orientation;
1669 set_field(data->orientation, new_orientation);
1679 return data->target_frame;
1699 set_field(data->target_frame, new_target_frame);
1729 data_size =
sizeof(CartesianGotoWithFrameWithToleranceMessage_data_t);
1732 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)
data_ptr;
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;
1742 enum_map_DriveMode[(int)
Forward] =
"Forward";
1744 enum_map_DriveMode[(int)
Backward] =
"Backward";
1745 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1746 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1758 data_size =
sizeof(CartesianGotoWithFrameWithToleranceMessage_data_t);
1761 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)
data_ptr;
1764 enum_map_DriveMode[(int)
Forward] =
"Forward";
1766 enum_map_DriveMode[(int)
Backward] =
"Backward";
1767 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
1768 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
1792 data = (CartesianGotoWithFrameWithToleranceMessage_data_t *)
data_ptr;
1864 return data->orientation;
1884 set_field(data->orientation, new_orientation);
1894 return data->target_frame;
1914 set_field(data->target_frame, new_target_frame);
1924 return data->translation_tolerance;
1944 set_field(data->translation_tolerance, new_translation_tolerance);
1954 return data->orientation_tolerance;
1974 set_field(data->orientation_tolerance, new_orientation_tolerance);
2001 data_size =
sizeof(PolarGotoMessage_data_t);
2004 data = (PolarGotoMessage_data_t *)
data_ptr;
2006 data->phi = ini_phi;
2007 data->dist = ini_dist;
2008 data->orientation = ini_orientation;
2010 enum_map_DriveMode[(int)
Forward] =
"Forward";
2012 enum_map_DriveMode[(int)
Backward] =
"Backward";
2013 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2014 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2023 data_size =
sizeof(PolarGotoMessage_data_t);
2026 data = (PolarGotoMessage_data_t *)
data_ptr;
2029 enum_map_DriveMode[(int)
Forward] =
"Forward";
2031 enum_map_DriveMode[(int)
Backward] =
"Backward";
2032 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2033 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2054 data = (PolarGotoMessage_data_t *)
data_ptr;
2126 return data->orientation;
2146 set_field(data->orientation, new_orientation);
2171 data_size =
sizeof(PlaceGotoMessage_data_t);
2174 data = (PlaceGotoMessage_data_t *)
data_ptr;
2176 strncpy(data->place, ini_place, 64-1);
2177 data->place[64-1] = 0;
2179 enum_map_DriveMode[(int)
Forward] =
"Forward";
2181 enum_map_DriveMode[(int)
Backward] =
"Backward";
2182 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2183 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2190 data_size =
sizeof(PlaceGotoMessage_data_t);
2193 data = (PlaceGotoMessage_data_t *)
data_ptr;
2196 enum_map_DriveMode[(int)
Forward] =
"Forward";
2198 enum_map_DriveMode[(int)
Backward] =
"Backward";
2199 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2200 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2219 data = (PlaceGotoMessage_data_t *)
data_ptr;
2277 data_size =
sizeof(PlaceWithOriGotoMessage_data_t);
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;
2286 enum_map_DriveMode[(int)
Forward] =
"Forward";
2288 enum_map_DriveMode[(int)
Backward] =
"Backward";
2289 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2290 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2298 data_size =
sizeof(PlaceWithOriGotoMessage_data_t);
2301 data = (PlaceWithOriGotoMessage_data_t *)
data_ptr;
2304 enum_map_DriveMode[(int)
Forward] =
"Forward";
2306 enum_map_DriveMode[(int)
Backward] =
"Backward";
2307 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2308 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2328 data = (PlaceWithOriGotoMessage_data_t *)
data_ptr;
2370 return data->orientation;
2390 set_field(data->orientation, new_orientation);
2417 data_size =
sizeof(ObstacleMessage_data_t);
2420 data = (ObstacleMessage_data_t *)
data_ptr;
2424 data->width = ini_width;
2426 enum_map_DriveMode[(int)
Forward] =
"Forward";
2428 enum_map_DriveMode[(int)
Backward] =
"Backward";
2429 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2430 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2439 data_size =
sizeof(ObstacleMessage_data_t);
2442 data = (ObstacleMessage_data_t *)
data_ptr;
2445 enum_map_DriveMode[(int)
Forward] =
"Forward";
2447 enum_map_DriveMode[(int)
Backward] =
"Backward";
2448 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2449 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2470 data = (ObstacleMessage_data_t *)
data_ptr;
2585 data_size =
sizeof(ResetOdometryMessage_data_t);
2588 data = (ResetOdometryMessage_data_t *)
data_ptr;
2591 enum_map_DriveMode[(int)
Forward] =
"Forward";
2593 enum_map_DriveMode[(int)
Backward] =
"Backward";
2594 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2595 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2613 data = (ResetOdometryMessage_data_t *)
data_ptr;
2640 data_size =
sizeof(SetMaxVelocityMessage_data_t);
2643 data = (SetMaxVelocityMessage_data_t *)
data_ptr;
2645 data->max_velocity = ini_max_velocity;
2647 enum_map_DriveMode[(int)
Forward] =
"Forward";
2649 enum_map_DriveMode[(int)
Backward] =
"Backward";
2650 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2651 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2658 data_size =
sizeof(SetMaxVelocityMessage_data_t);
2661 data = (SetMaxVelocityMessage_data_t *)
data_ptr;
2664 enum_map_DriveMode[(int)
Forward] =
"Forward";
2666 enum_map_DriveMode[(int)
Backward] =
"Backward";
2667 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2668 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2687 data = (SetMaxVelocityMessage_data_t *)
data_ptr;
2699 return data->max_velocity;
2719 set_field(data->max_velocity, new_max_velocity);
2744 data_size =
sizeof(SetMaxRotationMessage_data_t);
2747 data = (SetMaxRotationMessage_data_t *)
data_ptr;
2749 data->max_rotation = ini_max_rotation;
2751 enum_map_DriveMode[(int)
Forward] =
"Forward";
2753 enum_map_DriveMode[(int)
Backward] =
"Backward";
2754 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2755 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2762 data_size =
sizeof(SetMaxRotationMessage_data_t);
2765 data = (SetMaxRotationMessage_data_t *)
data_ptr;
2768 enum_map_DriveMode[(int)
Forward] =
"Forward";
2770 enum_map_DriveMode[(int)
Backward] =
"Backward";
2771 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2772 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2791 data = (SetMaxRotationMessage_data_t *)
data_ptr;
2803 return data->max_rotation;
2823 set_field(data->max_rotation, new_max_rotation);
2848 data_size =
sizeof(SetEscapingMessage_data_t);
2851 data = (SetEscapingMessage_data_t *)
data_ptr;
2853 data->escaping_enabled = ini_escaping_enabled;
2855 enum_map_DriveMode[(int)
Forward] =
"Forward";
2857 enum_map_DriveMode[(int)
Backward] =
"Backward";
2858 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2859 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2866 data_size =
sizeof(SetEscapingMessage_data_t);
2869 data = (SetEscapingMessage_data_t *)
data_ptr;
2872 enum_map_DriveMode[(int)
Forward] =
"Forward";
2874 enum_map_DriveMode[(int)
Backward] =
"Backward";
2875 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2876 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2895 data = (SetEscapingMessage_data_t *)
data_ptr;
2908 return data->escaping_enabled;
2929 set_field(data->escaping_enabled, new_escaping_enabled);
2954 data_size =
sizeof(SetSecurityDistanceMessage_data_t);
2957 data = (SetSecurityDistanceMessage_data_t *)
data_ptr;
2959 data->security_distance = ini_security_distance;
2961 enum_map_DriveMode[(int)
Forward] =
"Forward";
2963 enum_map_DriveMode[(int)
Backward] =
"Backward";
2964 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2965 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
2972 data_size =
sizeof(SetSecurityDistanceMessage_data_t);
2975 data = (SetSecurityDistanceMessage_data_t *)
data_ptr;
2978 enum_map_DriveMode[(int)
Forward] =
"Forward";
2980 enum_map_DriveMode[(int)
Backward] =
"Backward";
2981 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
2982 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3001 data = (SetSecurityDistanceMessage_data_t *)
data_ptr;
3013 return data->security_distance;
3033 set_field(data->security_distance, new_security_distance);
3058 data_size =
sizeof(SetDriveModeMessage_data_t);
3061 data = (SetDriveModeMessage_data_t *)
data_ptr;
3063 data->drive_mode = ini_drive_mode;
3065 enum_map_DriveMode[(int)
Forward] =
"Forward";
3067 enum_map_DriveMode[(int)
Backward] =
"Backward";
3068 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3069 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3076 data_size =
sizeof(SetDriveModeMessage_data_t);
3079 data = (SetDriveModeMessage_data_t *)
data_ptr;
3082 enum_map_DriveMode[(int)
Forward] =
"Forward";
3084 enum_map_DriveMode[(int)
Backward] =
"Backward";
3085 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3086 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3105 data = (SetDriveModeMessage_data_t *)
data_ptr;
3137 set_field(data->drive_mode, new_drive_mode);
3162 data_size =
sizeof(SetStopAtTargetMessage_data_t);
3165 data = (SetStopAtTargetMessage_data_t *)
data_ptr;
3167 data->stop_at_target = ini_stop_at_target;
3169 enum_map_DriveMode[(int)
Forward] =
"Forward";
3171 enum_map_DriveMode[(int)
Backward] =
"Backward";
3172 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3173 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3180 data_size =
sizeof(SetStopAtTargetMessage_data_t);
3183 data = (SetStopAtTargetMessage_data_t *)
data_ptr;
3186 enum_map_DriveMode[(int)
Forward] =
"Forward";
3188 enum_map_DriveMode[(int)
Backward] =
"Backward";
3189 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3190 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3209 data = (SetStopAtTargetMessage_data_t *)
data_ptr;
3221 return data->stop_at_target;
3241 set_field(data->stop_at_target, new_stop_at_target);
3266 data_size =
sizeof(SetOrientationModeMessage_data_t);
3269 data = (SetOrientationModeMessage_data_t *)
data_ptr;
3271 data->orientation_mode = ini_orientation_mode;
3273 enum_map_DriveMode[(int)
Forward] =
"Forward";
3275 enum_map_DriveMode[(int)
Backward] =
"Backward";
3276 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3277 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3279 add_fieldinfo(
IFT_ENUM,
"orientation_mode", 1, &data->orientation_mode,
"OrientationMode", &enum_map_OrientationMode);
3284 data_size =
sizeof(SetOrientationModeMessage_data_t);
3287 data = (SetOrientationModeMessage_data_t *)
data_ptr;
3290 enum_map_DriveMode[(int)
Forward] =
"Forward";
3292 enum_map_DriveMode[(int)
Backward] =
"Backward";
3293 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3294 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3296 add_fieldinfo(
IFT_ENUM,
"orientation_mode", 1, &data->orientation_mode,
"OrientationMode", &enum_map_OrientationMode);
3313 data = (SetOrientationModeMessage_data_t *)
data_ptr;
3345 set_field(data->orientation_mode, new_orientation_mode);
3368 data_size =
sizeof(ResetParametersMessage_data_t);
3371 data = (ResetParametersMessage_data_t *)
data_ptr;
3374 enum_map_DriveMode[(int)
Forward] =
"Forward";
3376 enum_map_DriveMode[(int)
Backward] =
"Backward";
3377 enum_map_DriveMode[(int)
ESCAPE] =
"ESCAPE";
3378 enum_map_OrientationMode[(int)
OrientAtTarget] =
"OrientAtTarget";
3396 data = (ResetParametersMessage_data_t *)
data_ptr;
3459 if ( m10 != NULL ) {
3463 if ( m11 != NULL ) {
3467 if ( m12 != NULL ) {
3471 if ( m13 != NULL ) {
3475 if ( m14 != NULL ) {
3479 if ( m15 != NULL ) {
3483 if ( m16 != NULL ) {
3487 if ( m17 != NULL ) {
3491 if ( m18 != NULL ) {
Base class for all Fawkes BlackBoard interfaces.
const char * type() const
Get type of interface.
void * data_ptr
Pointer to local memory storage.
void set_field(FieldT &field, DataT &data)
Set a field, set data_changed to true and update data_changed accordingly.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
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.
void * data_ptr
Pointer to memory that contains local data.
message_data_ts_t * data_ts
data timestamp aliasing pointer
unsigned int data_size
Size of memory needed to hold all data.
CartesianGotoMessage Fawkes BlackBoard Interface Message.
void set_y(const float new_y)
Set y value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_orientation(const float new_orientation)
Set orientation value.
float x() const
Get x value.
float orientation() const
Get orientation value.
virtual Message * clone() const
Clone this message.
~CartesianGotoMessage()
Destructor.
void set_x(const float new_x)
Set x value.
float y() const
Get y value.
size_t maxlenof_y() const
Get maximum length of y value.
CartesianGotoMessage()
Constructor.
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.
~CartesianGotoWithFrameMessage()
Destructor.
char * target_frame() const
Get target_frame 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.
float y() const
Get y 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.
void set_y(const float new_y)
Set y value.
void set_x(const float new_x)
Set x value.
float x() const
Get x value.
CartesianGotoWithFrameMessage()
Constructor.
float orientation() const
Get orientation value.
CartesianGotoWithFrameWithToleranceMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
float orientation() const
Get orientation value.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
void set_y(const float new_y)
Set y value.
float x() const
Get x value.
void set_target_frame(const char *new_target_frame)
Set target_frame value.
float orientation_tolerance() const
Get orientation_tolerance 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.
~CartesianGotoWithFrameWithToleranceMessage()
Destructor.
char * target_frame() const
Get target_frame value.
CartesianGotoWithFrameWithToleranceMessage()
Constructor.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_target_frame() const
Get maximum length of target_frame value.
size_t maxlenof_y() const
Get maximum length of y value.
float translation_tolerance() const
Get translation_tolerance value.
virtual Message * clone() const
Clone this message.
void set_translation_tolerance(const float new_translation_tolerance)
Set translation_tolerance value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_x(const float new_x)
Set x value.
CartesianGotoWithToleranceMessage Fawkes BlackBoard Interface Message.
float x() const
Get x value.
~CartesianGotoWithToleranceMessage()
Destructor.
void set_x(const float new_x)
Set x value.
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.
CartesianGotoWithToleranceMessage()
Constructor.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
virtual Message * clone() const
Clone this message.
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_y(const float new_y)
Set y value.
void set_orientation(const float new_orientation)
Set orientation value.
float y() const
Get y value.
float orientation() const
Get orientation value.
size_t maxlenof_translation_tolerance() const
Get maximum length of translation_tolerance value.
ObstacleMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
~ObstacleMessage()
Destructor.
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.
float x() const
Get x value.
ObstacleMessage()
Constructor.
float width() const
Get width 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.
~PlaceGotoMessage()
Destructor.
void set_place(const char *new_place)
Set place value.
PlaceGotoMessage()
Constructor.
virtual Message * clone() const
Clone this message.
size_t maxlenof_place() const
Get maximum length of place value.
char * place() const
Get place value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
~PlaceWithOriGotoMessage()
Destructor.
char * place() const
Get place value.
void set_orientation(const float new_orientation)
Set orientation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
PlaceWithOriGotoMessage()
Constructor.
size_t maxlenof_place() const
Get maximum length of place value.
float orientation() const
Get orientation value.
PolarGotoMessage Fawkes BlackBoard Interface Message.
float phi() const
Get phi value.
size_t maxlenof_phi() const
Get maximum length of phi value.
PolarGotoMessage()
Constructor.
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.
float dist() const
Get dist value.
~PolarGotoMessage()
Destructor.
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.
~ResetOdometryMessage()
Destructor.
virtual Message * clone() const
Clone this message.
ResetOdometryMessage()
Constructor.
ResetParametersMessage Fawkes BlackBoard Interface Message.
~ResetParametersMessage()
Destructor.
virtual Message * clone() const
Clone this message.
ResetParametersMessage()
Constructor.
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.
~SetDriveModeMessage()
Destructor.
SetDriveModeMessage()
Constructor.
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.
~SetEscapingMessage()
Destructor.
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.
SetEscapingMessage()
Constructor.
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.
SetMaxRotationMessage()
Constructor.
float max_rotation() const
Get max_rotation value.
~SetMaxRotationMessage()
Destructor.
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.
~SetMaxVelocityMessage()
Destructor.
SetMaxVelocityMessage()
Constructor.
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.
SetOrientationModeMessage()
Constructor.
virtual Message * clone() const
Clone this message.
OrientationMode orientation_mode() const
Get orientation_mode value.
~SetOrientationModeMessage()
Destructor.
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.
~SetSecurityDistanceMessage()
Destructor.
virtual Message * clone() const
Clone this message.
SetSecurityDistanceMessage()
Constructor.
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.
~SetStopAtTargetMessage()
Destructor.
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.
SetStopAtTargetMessage()
Constructor.
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.
~StopMessage()
Destructor.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
StopMessage()
Constructor.
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.
~TurnMessage()
Destructor.
virtual Message * clone() const
Clone this message.
void set_angle(const float new_angle)
Set angle value.
float angle() const
Get angle value.
size_t maxlenof_angle() const
Get maximum length of angle value.
void set_velocity(const float new_velocity)
Set velocity value.
TurnMessage()
Constructor.
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.
DriveMode
Drive modes enum.
@ 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.
@ IFT_UINT32
32 bit unsigned integer field
@ IFT_ENUM
field with interface specific enum type
Timestamp data, must be present and first entries for each interface data structs!...