24 #include <interfaces/NavGraphGeneratorInterface.h> 26 #include <core/exceptions/software.h> 59 NavGraphGeneratorInterface::NavGraphGeneratorInterface() : Interface()
61 data_size =
sizeof(NavGraphGeneratorInterface_data_t);
62 data_ptr = malloc(data_size);
63 data = (NavGraphGeneratorInterface_data_t *)data_ptr;
64 data_ts = (interface_data_ts_t *)data_ptr;
65 memset(data_ptr, 0, data_size);
66 enum_map_ConnectionMode[(int)NOT_CONNECTED] =
"NOT_CONNECTED";
67 enum_map_ConnectionMode[(int)UNCONNECTED] =
"UNCONNECTED";
68 enum_map_ConnectionMode[(int)CLOSEST_NODE] =
"CLOSEST_NODE";
69 enum_map_ConnectionMode[(int)CLOSEST_EDGE] =
"CLOSEST_EDGE";
70 enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] =
"CLOSEST_EDGE_OR_NODE";
71 enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] =
"FILTER_EDGES_BY_MAP";
72 enum_map_FilterType[(int)FILTER_ORPHAN_NODES] =
"FILTER_ORPHAN_NODES";
73 enum_map_FilterType[(int)FILTER_MULTI_GRAPH] =
"FILTER_MULTI_GRAPH";
74 enum_map_EdgeMode[(int)NO_INTERSECTION] =
"NO_INTERSECTION";
75 enum_map_EdgeMode[(int)SPLIT_INTERSECTION] =
"SPLIT_INTERSECTION";
76 enum_map_EdgeMode[(int)FORCE] =
"FORCE";
77 enum_map_Algorithm[(int)ALGORITHM_VORONOI] =
"ALGORITHM_VORONOI";
78 enum_map_Algorithm[(int)ALGORITHM_GRID] =
"ALGORITHM_GRID";
79 add_fieldinfo(IFT_UINT32,
"msgid", 1, &data->msgid);
80 add_fieldinfo(IFT_BOOL,
"final", 1, &data->final);
81 add_fieldinfo(IFT_BOOL,
"ok", 1, &data->ok);
82 add_fieldinfo(IFT_STRING,
"error_message", 128, data->error_message);
83 add_messageinfo(
"ClearMessage");
84 add_messageinfo(
"SetAlgorithmMessage");
85 add_messageinfo(
"SetAlgorithmParameterMessage");
86 add_messageinfo(
"SetBoundingBoxMessage");
87 add_messageinfo(
"SetFilterMessage");
88 add_messageinfo(
"SetFilterParamFloatMessage");
89 add_messageinfo(
"AddMapObstaclesMessage");
90 add_messageinfo(
"AddObstacleMessage");
91 add_messageinfo(
"RemoveObstacleMessage");
92 add_messageinfo(
"AddPointOfInterestMessage");
93 add_messageinfo(
"AddPointOfInterestWithOriMessage");
94 add_messageinfo(
"SetPointOfInterestPropertyMessage");
95 add_messageinfo(
"AddEdgeMessage");
96 add_messageinfo(
"SetGraphDefaultPropertyMessage");
97 add_messageinfo(
"SetCopyGraphDefaultPropertiesMessage");
98 add_messageinfo(
"RemovePointOfInterestMessage");
99 add_messageinfo(
"ComputeMessage");
100 unsigned char tmp_hash[] = {0xec, 0x52, 0xc2, 0x84, 0x36, 0x53, 0x28, 0xc3, 0xdd, 0x79, 0x9f, 0x29, 0xe0, 0x48, 0xab, 0x6};
105 NavGraphGeneratorInterface::~NavGraphGeneratorInterface()
117 case NOT_CONNECTED:
return "NOT_CONNECTED";
118 case UNCONNECTED:
return "UNCONNECTED";
119 case CLOSEST_NODE:
return "CLOSEST_NODE";
120 case CLOSEST_EDGE:
return "CLOSEST_EDGE";
121 case CLOSEST_EDGE_OR_NODE:
return "CLOSEST_EDGE_OR_NODE";
122 default:
return "UNKNOWN";
130 NavGraphGeneratorInterface::tostring_FilterType(
FilterType value)
const 133 case FILTER_EDGES_BY_MAP:
return "FILTER_EDGES_BY_MAP";
134 case FILTER_ORPHAN_NODES:
return "FILTER_ORPHAN_NODES";
135 case FILTER_MULTI_GRAPH:
return "FILTER_MULTI_GRAPH";
136 default:
return "UNKNOWN";
144 NavGraphGeneratorInterface::tostring_EdgeMode(
EdgeMode value)
const 147 case NO_INTERSECTION:
return "NO_INTERSECTION";
148 case SPLIT_INTERSECTION:
return "SPLIT_INTERSECTION";
149 case FORCE:
return "FORCE";
150 default:
return "UNKNOWN";
158 NavGraphGeneratorInterface::tostring_Algorithm(
Algorithm value)
const 161 case ALGORITHM_VORONOI:
return "ALGORITHM_VORONOI";
162 case ALGORITHM_GRID:
return "ALGORITHM_GRID";
163 default:
return "UNKNOWN";
175 NavGraphGeneratorInterface::msgid()
const 185 NavGraphGeneratorInterface::maxlenof_msgid()
const 198 NavGraphGeneratorInterface::set_msgid(
const uint32_t new_msgid)
200 data->msgid = new_msgid;
213 NavGraphGeneratorInterface::is_final()
const 223 NavGraphGeneratorInterface::maxlenof_final()
const 237 NavGraphGeneratorInterface::set_final(
const bool new_final)
239 data->final = new_final;
251 NavGraphGeneratorInterface::is_ok()
const 261 NavGraphGeneratorInterface::maxlenof_ok()
const 274 NavGraphGeneratorInterface::set_ok(
const bool new_ok)
288 NavGraphGeneratorInterface::error_message()
const 290 return data->error_message;
298 NavGraphGeneratorInterface::maxlenof_error_message()
const 311 NavGraphGeneratorInterface::set_error_message(
const char * new_error_message)
313 strncpy(data->error_message, new_error_message,
sizeof(data->error_message)-1);
314 data->error_message[
sizeof(data->error_message)-1] = 0;
320 NavGraphGeneratorInterface::create_message(
const char *type)
const 322 if ( strncmp(
"ClearMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
324 }
else if ( strncmp(
"SetAlgorithmMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
326 }
else if ( strncmp(
"SetAlgorithmParameterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
328 }
else if ( strncmp(
"SetBoundingBoxMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
330 }
else if ( strncmp(
"SetFilterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
332 }
else if ( strncmp(
"SetFilterParamFloatMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
334 }
else if ( strncmp(
"AddMapObstaclesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
336 }
else if ( strncmp(
"AddObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
338 }
else if ( strncmp(
"RemoveObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
340 }
else if ( strncmp(
"AddPointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
342 }
else if ( strncmp(
"AddPointOfInterestWithOriMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
344 }
else if ( strncmp(
"SetPointOfInterestPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
346 }
else if ( strncmp(
"AddEdgeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
348 }
else if ( strncmp(
"SetGraphDefaultPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
350 }
else if ( strncmp(
"SetCopyGraphDefaultPropertiesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
352 }
else if ( strncmp(
"RemovePointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
354 }
else if ( strncmp(
"ComputeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_) == 0 ) {
358 "message type for this interface type.", type);
367 NavGraphGeneratorInterface::copy_values(
const Interface *other)
372 type(), other->
type());
374 memcpy(data, oi->data,
sizeof(NavGraphGeneratorInterface_data_t));
378 NavGraphGeneratorInterface::enum_tostring(
const char *enumtype,
int val)
const 380 if (strcmp(enumtype,
"ConnectionMode") == 0) {
383 if (strcmp(enumtype,
"FilterType") == 0) {
386 if (strcmp(enumtype,
"EdgeMode") == 0) {
387 return tostring_EdgeMode((
EdgeMode)val);
389 if (strcmp(enumtype,
"Algorithm") == 0) {
390 return tostring_Algorithm((
Algorithm)val);
404 NavGraphGeneratorInterface::ClearMessage::ClearMessage() :
Message(
"ClearMessage")
409 data = (ClearMessage_data_t *)
data_ptr;
411 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
412 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
413 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
414 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
421 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
440 data = (ClearMessage_data_t *)
data_ptr;
467 data_size =
sizeof(SetAlgorithmMessage_data_t);
470 data = (SetAlgorithmMessage_data_t *)
data_ptr;
472 data->algorithm = ini_algorithm;
473 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
474 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
475 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
476 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
483 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
491 data_size =
sizeof(SetAlgorithmMessage_data_t);
494 data = (SetAlgorithmMessage_data_t *)
data_ptr;
496 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
497 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
498 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
499 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
506 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
526 data = (SetAlgorithmMessage_data_t *)
data_ptr;
558 data->algorithm = new_algorithm;
584 data_size =
sizeof(SetAlgorithmParameterMessage_data_t);
587 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
589 strncpy(data->param, ini_param, 32-1);
590 data->param[32-1] = 0;
591 strncpy(data->value, ini_value, 64-1);
592 data->value[64-1] = 0;
593 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
594 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
595 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
596 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
603 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
612 data_size =
sizeof(SetAlgorithmParameterMessage_data_t);
615 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
617 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
618 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
619 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
620 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
627 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
648 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
684 strncpy(data->param, new_param,
sizeof(data->param)-1);
685 data->param[
sizeof(data->param)-1] = 0;
721 strncpy(data->value, new_value,
sizeof(data->value)-1);
722 data->value[
sizeof(data->value)-1] = 0;
750 data_size =
sizeof(SetBoundingBoxMessage_data_t);
753 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
755 data->p1_x = ini_p1_x;
756 data->p1_y = ini_p1_y;
757 data->p2_x = ini_p2_x;
758 data->p2_y = ini_p2_y;
759 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
760 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
761 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
762 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
769 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
780 data_size =
sizeof(SetBoundingBoxMessage_data_t);
783 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
785 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
786 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
787 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
788 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
795 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
818 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
850 data->p1_x = new_p1_x;
880 data->p1_y = new_p1_y;
910 data->p2_x = new_p2_x;
940 data->p2_y = new_p2_y;
966 data_size =
sizeof(SetFilterMessage_data_t);
969 data = (SetFilterMessage_data_t *)
data_ptr;
971 data->filter = ini_filter;
972 data->enable = ini_enable;
973 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
974 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
975 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
976 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
983 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
992 data_size =
sizeof(SetFilterMessage_data_t);
995 data = (SetFilterMessage_data_t *)
data_ptr;
997 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
998 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
999 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1000 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1007 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1028 data = (SetFilterMessage_data_t *)
data_ptr;
1062 data->filter = new_filter;
1073 return data->enable;
1094 data->enable = new_enable;
1121 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
1124 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1126 data->filter = ini_filter;
1127 strncpy(data->param, ini_param, 32-1);
1128 data->param[32-1] = 0;
1129 data->value = ini_value;
1130 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1131 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1132 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1133 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1140 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1150 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
1153 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1155 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1156 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1157 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1158 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1165 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1187 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1221 data->filter = new_filter;
1253 strncpy(data->param, new_param,
sizeof(data->param)-1);
1254 data->param[
sizeof(data->param)-1] = 0;
1286 data->value = new_value;
1311 data_size =
sizeof(AddMapObstaclesMessage_data_t);
1314 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1316 data->max_line_point_distance = ini_max_line_point_distance;
1317 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1318 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1319 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1320 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1327 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1335 data_size =
sizeof(AddMapObstaclesMessage_data_t);
1338 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1340 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1341 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1342 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1343 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1350 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1370 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1385 return data->max_line_point_distance;
1408 data->max_line_point_distance = new_max_line_point_distance;
1435 data_size =
sizeof(AddObstacleMessage_data_t);
1438 data = (AddObstacleMessage_data_t *)
data_ptr;
1440 strncpy(data->name, ini_name, 64-1);
1441 data->name[64-1] = 0;
1444 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1445 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1446 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1447 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1454 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1464 data_size =
sizeof(AddObstacleMessage_data_t);
1467 data = (AddObstacleMessage_data_t *)
data_ptr;
1469 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1470 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1471 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1472 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1479 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1501 data = (AddObstacleMessage_data_t *)
data_ptr;
1537 strncpy(data->name, new_name,
sizeof(data->name)-1);
1538 data->name[
sizeof(data->name)-1] = 0;
1623 data_size =
sizeof(RemoveObstacleMessage_data_t);
1626 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1628 strncpy(data->name, ini_name, 64-1);
1629 data->name[64-1] = 0;
1630 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1631 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1632 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1633 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1640 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1648 data_size =
sizeof(RemoveObstacleMessage_data_t);
1651 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1653 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1654 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1655 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1656 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1663 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1683 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1719 strncpy(data->name, new_name,
sizeof(data->name)-1);
1720 data->name[
sizeof(data->name)-1] = 0;
1748 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1751 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1753 strncpy(data->name, ini_name, 64-1);
1754 data->name[64-1] = 0;
1757 data->mode = ini_mode;
1758 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1759 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1760 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1761 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1768 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1779 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1782 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1784 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1785 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1786 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1787 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1794 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1817 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1853 strncpy(data->name, new_name,
sizeof(data->name)-1);
1854 data->name[
sizeof(data->name)-1] = 0;
1948 data->mode = new_mode;
1977 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
1980 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
1982 strncpy(data->name, ini_name, 64-1);
1983 data->name[64-1] = 0;
1986 data->ori = ini_ori;
1987 data->mode = ini_mode;
1988 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1989 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1990 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1991 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1998 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2010 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
2013 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
2015 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2016 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2017 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2018 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2025 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2049 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
2085 strncpy(data->name, new_name,
sizeof(data->name)-1);
2086 data->name[
sizeof(data->name)-1] = 0;
2176 data->ori = new_ori;
2210 data->mode = new_mode;
2237 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
2240 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2242 strncpy(data->name, ini_name, 64-1);
2243 data->name[64-1] = 0;
2244 strncpy(data->property_name, ini_property_name, 64-1);
2245 data->property_name[64-1] = 0;
2246 strncpy(data->property_value, ini_property_value, 1024-1);
2247 data->property_value[1024-1] = 0;
2248 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2249 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2250 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2251 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2258 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2268 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
2271 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2273 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2274 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2275 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2276 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2283 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2305 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2341 strncpy(data->name, new_name,
sizeof(data->name)-1);
2342 data->name[
sizeof(data->name)-1] = 0;
2352 return data->property_name;
2372 strncpy(data->property_name, new_property_name,
sizeof(data->property_name)-1);
2373 data->property_name[
sizeof(data->property_name)-1] = 0;
2384 return data->property_value;
2405 strncpy(data->property_value, new_property_value,
sizeof(data->property_value)-1);
2406 data->property_value[
sizeof(data->property_value)-1] = 0;
2434 data_size =
sizeof(AddEdgeMessage_data_t);
2437 data = (AddEdgeMessage_data_t *)
data_ptr;
2439 strncpy(data->p1, ini_p1, 64-1);
2441 strncpy(data->p2, ini_p2, 64-1);
2443 data->directed = ini_directed;
2444 data->mode = ini_mode;
2445 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2446 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2447 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2448 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2455 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2466 data_size =
sizeof(AddEdgeMessage_data_t);
2469 data = (AddEdgeMessage_data_t *)
data_ptr;
2471 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2472 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2473 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2474 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2481 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2504 data = (AddEdgeMessage_data_t *)
data_ptr;
2536 strncpy(data->p1, new_p1,
sizeof(data->p1)-1);
2537 data->p1[
sizeof(data->p1)-1] = 0;
2567 strncpy(data->p2, new_p2,
sizeof(data->p2)-1);
2568 data->p2[
sizeof(data->p2)-1] = 0;
2581 return data->directed;
2604 data->directed = new_directed;
2634 data->mode = new_mode;
2660 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2663 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2665 strncpy(data->property_name, ini_property_name, 64-1);
2666 data->property_name[64-1] = 0;
2667 strncpy(data->property_value, ini_property_value, 1024-1);
2668 data->property_value[1024-1] = 0;
2669 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2670 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2671 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2672 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2679 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2688 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2691 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2693 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2694 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2695 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2696 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2703 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2724 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2736 return data->property_name;
2756 strncpy(data->property_name, new_property_name,
sizeof(data->property_name)-1);
2757 data->property_name[
sizeof(data->property_name)-1] = 0;
2768 return data->property_value;
2789 strncpy(data->property_value, new_property_value,
sizeof(data->property_value)-1);
2790 data->property_value[
sizeof(data->property_value)-1] = 0;
2815 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2818 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2820 data->enable_copy = ini_enable_copy;
2821 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2822 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2823 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2824 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2831 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2839 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2842 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2844 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2845 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2846 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2847 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2854 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2874 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2887 return data->enable_copy;
2908 data->enable_copy = new_enable_copy;
2933 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2936 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2938 strncpy(data->name, ini_name, 64-1);
2939 data->name[64-1] = 0;
2940 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2941 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2942 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2943 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2950 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2958 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2961 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2963 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2964 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2965 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2966 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2973 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2993 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
3029 strncpy(data->name, new_name,
sizeof(data->name)-1);
3030 data->name[
sizeof(data->name)-1] = 0;
3053 data_size =
sizeof(ComputeMessage_data_t);
3056 data = (ComputeMessage_data_t *)
data_ptr;
3058 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
3059 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
3060 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
3061 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
3068 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
3087 data = (ComputeMessage_data_t *)
data_ptr;
3109 const ClearMessage *m0 = dynamic_cast<const ClearMessage *>(message);
3125 const SetFilterMessage *m4 = dynamic_cast<const SetFilterMessage *>(message);
3150 if ( m10 != NULL ) {
3154 if ( m11 != NULL ) {
3157 const AddEdgeMessage *m12 = dynamic_cast<const AddEdgeMessage *>(message);
3158 if ( m12 != NULL ) {
3162 if ( m13 != NULL ) {
3166 if ( m14 != NULL ) {
3170 if ( m15 != NULL ) {
3173 const ComputeMessage *m16 = dynamic_cast<const ComputeMessage *>(message);
3174 if ( m16 != NULL ) {
~AddObstacleMessage()
Destructor.
char * name() const
Get name value.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_name(const char *new_name)
Set name value.
void set_y(const float new_y)
Set y value.
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
FilterType filter() const
Get filter value.
void set_p2_y(const float new_p2_y)
Set p2_y value.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
SetAlgorithmMessage Fawkes BlackBoard Interface Message.
float p2_y() const
Get p2_y value.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_p2_x() const
Get maximum length of p2_x value.
The node is marked as unconnected and will not be connected to another node.
size_t maxlenof_name() const
Get maximum length of name value.
~AddPointOfInterestMessage()
Destructor.
virtual Message * clone() const
Clone this message.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_max_line_point_distance(const float new_max_line_point_distance)
Set max_line_point_distance value.
EdgeMode
When adding edges, the mode defines how to add edges.
void * data_ptr
Pointer to memory that contains local data.
~ClearMessage()
Destructor.
size_t maxlenof_y() const
Get maximum length of y value.
float value() const
Get value value.
float max_line_point_distance() const
Get max_line_point_distance value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_property_value(const char *new_property_value)
Set property_value value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_x() const
Get maximum length of x value.
Algorithm
Available generator algorithms.
virtual Message * clone() const
Clone this message.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
~AddMapObstaclesMessage()
Destructor.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
void set_property_name(const char *new_property_name)
Set property_name value.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
size_t maxlenof_name() const
Get maximum length of name value.
virtual Message * clone() const
Clone this message.
char * value() const
Get value value.
float p1_x() const
Get p1_x value.
ComputeMessage()
Constructor.
char * name() const
Get name value.
Fawkes library namespace.
void set_p1(const char *new_p1)
Set p1 value.
float p2_x() const
Get p2_x value.
size_t maxlenof_value() const
Get maximum length of value value.
Timestamp data, must be present and first entries for each interface data structs!...
~RemovePointOfInterestMessage()
Destructor.
size_t maxlenof_max_line_point_distance() const
Get maximum length of max_line_point_distance value.
SetFilterMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_ori() const
Get maximum length of ori value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
void set_x(const float new_x)
Set x value.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
void set_filter(const FilterType new_filter)
Set filter value.
float x() const
Get x value.
void set_param(const char *new_param)
Set param value.
If enabled, filters out all nodes which are not connected to any other node.
SetFilterParamFloatMessage()
Constructor.
EdgeMode mode() const
Get mode value.
ConnectionMode
Describe how to connect nodes to the graph.
RemoveObstacleMessage()
Constructor.
ClearMessage()
Constructor.
Sometimes after applying other filters one can end up with multiple disconnected graphs.
virtual Message * clone() const
Clone this message.
size_t maxlenof_filter() const
Get maximum length of filter value.
The node is will not be initially connected.
Base class for all Fawkes BlackBoard interfaces.
void set_ori(const float new_ori)
Set ori value.
SetAlgorithmParameterMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_directed() const
Get maximum length of directed value.
size_t maxlenof_name() const
Get maximum length of name value.
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
size_t maxlenof_property_value() const
Get maximum length of property_value value.
AddObstacleMessage Fawkes BlackBoard Interface Message.
~SetCopyGraphDefaultPropertiesMessage()
Destructor.
size_t maxlenof_algorithm() const
Get maximum length of algorithm value.
float p1_y() const
Get p1_y value.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
size_t maxlenof_filter() const
Get maximum length of filter value.
size_t maxlenof_param() const
Get maximum length of param value.
size_t maxlenof_name() const
Get maximum length of name value.
ConnectionMode mode() const
Get mode value.
virtual Message * clone() const
Clone this message.
void set_y(const float new_y)
Set y value.
virtual Message * clone() const
Clone this message.
~SetFilterParamFloatMessage()
Destructor.
void set_value(const char *new_value)
Set value value.
void set_value(const float new_value)
Set value value.
Voronoi-based algorithm for navgraph generation.
message_data_ts_t * data_ts
data timestamp aliasing pointer
~SetAlgorithmMessage()
Destructor.
char * name() const
Get name value.
unsigned int data_size
Size of memory needed to hold all data.
The edge is added as-is, it may overlap or intersect with other edges.
virtual Message * clone() const
Clone this message.
FilterType filter() const
Get filter value.
char * name() const
Get name value.
SetAlgorithmParameterMessage()
Constructor.
AddPointOfInterestWithOriMessage()
Constructor.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
SetCopyGraphDefaultPropertiesMessage()
Constructor.
float y() const
Get y value.
SetPointOfInterestPropertyMessage()
Constructor.
virtual Message * clone() const
Clone this message.
ComputeMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
size_t maxlenof_enable() const
Get maximum length of enable value.
~AddPointOfInterestWithOriMessage()
Destructor.
size_t maxlenof_p1_x() const
Get maximum length of p1_x value.
size_t maxlenof_p2_y() const
Get maximum length of p2_y value.
char * property_name() const
Get property_name value.
const char * type() const
Get type of interface.
~SetBoundingBoxMessage()
Destructor.
void * data_ptr
Pointer to local memory storage.
Algorithm algorithm() const
Get algorithm value.
~RemoveObstacleMessage()
Destructor.
float x() const
Get x value.
size_t maxlenof_p2() const
Get maximum length of p2 value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_name(const char *new_name)
Set name value.
float ori() const
Get ori value.
void set_y(const float new_y)
Set y value.
char * param() const
Get param value.
char * p1() const
Get p1 value.
~SetAlgorithmParameterMessage()
Destructor.
void set_p2(const char *new_p2)
Set p2 value.
size_t maxlenof_x() const
Get maximum length of x value.
char * property_value() const
Get property_value value.
void set_x(const float new_x)
Set x value.
SetFilterMessage()
Constructor.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
char * property_value() const
Get property_value value.
bool is_enable_copy() const
Get enable_copy value.
char * p2() const
Get p2 value.
SetAlgorithmMessage()
Constructor.
Grid-based algorithm with customizable spacing.
void set_name(const char *new_name)
Set name value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
void set_p2_x(const float new_p2_x)
Set p2_x value.
void set_filter(const FilterType new_filter)
Set filter value.
AddObstacleMessage()
Constructor.
bool is_enable() const
Get enable value.
Only insert edge if it does not intersect with any other existing edge in the graph.
size_t maxlenof_value() const
Get maximum length of value value.
void set_property_value(const char *new_property_value)
Set property_value value.
void set_p1_x(const float new_p1_x)
Set p1_x value.
void set_algorithm(const Algorithm new_algorithm)
Set algorithm value.
FilterType
Post-processing filtering type.
void set_property_name(const char *new_property_name)
Set property_name value.
size_t maxlenof_p1() const
Get maximum length of p1 value.
virtual Message * clone() const
Clone this message.
~SetPointOfInterestPropertyMessage()
Destructor.
ClearMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
ConnectionMode mode() const
Get mode value.
SetGraphDefaultPropertyMessage()
Constructor.
~SetGraphDefaultPropertyMessage()
Destructor.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_enable_copy(const bool new_enable_copy)
Set enable_copy value.
size_t maxlenof_p1_y() const
Get maximum length of p1_y value.
virtual Message * clone() const
Clone this message.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
~SetFilterMessage()
Destructor.
char * param() const
Get param value.
RemovePointOfInterestMessage()
Constructor.
SetBoundingBoxMessage()
Constructor.
void set_name(const char *new_name)
Set name value.
~AddEdgeMessage()
Destructor.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_mode(const EdgeMode new_mode)
Set mode value.
size_t maxlenof_enable_copy() const
Get maximum length of enable_copy value.
void set_x(const float new_x)
Set x value.
First try the CLOSEST_EDGE method.
float y() const
Get y value.
~ComputeMessage()
Destructor.
char * name() const
Get name value.
Connect point to the node on the graph closest to the given point.
virtual Message * clone() const
Clone this message.
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.
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
void set_name(const char *new_name)
Set name value.
AddEdgeMessage Fawkes BlackBoard Interface Message.
void set_directed(const bool new_directed)
Set directed value.
Connect point to the edge in which segment it lies, i.e.
float x() const
Get x value.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_y() const
Get maximum length of y value.
bool is_directed() const
Get directed value.
size_t maxlenof_x() const
Get maximum length of x value.
char * name() const
Get name value.
void set_name(const char *new_name)
Set name value.
AddPointOfInterestMessage()
Constructor.
size_t maxlenof_param() const
Get maximum length of param value.
field with interface specific enum type
AddEdgeMessage()
Constructor.
void set_p1_y(const float new_p1_y)
Set p1_y value.
void set_param(const char *new_param)
Set param value.
size_t maxlenof_y() const
Get maximum length of y value.
AddMapObstaclesMessage()
Constructor.
char * property_name() const
Get property_name value.
void set_enable(const bool new_enable)
Set enable value.