24 #ifndef __INTERFACES_NAVGRAPHGENERATORINTERFACE_H_ 25 #define __INTERFACES_NAVGRAPHGENERATORINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 127 typedef struct __attribute__((packed)) {
128 int64_t timestamp_sec;
129 int64_t timestamp_usec;
139 } NavGraphGeneratorInterface_data_t;
141 NavGraphGeneratorInterface_data_t *data;
152 typedef struct __attribute__((packed)) {
153 int64_t timestamp_sec;
154 int64_t timestamp_usec;
155 } ClearMessage_data_t;
157 ClearMessage_data_t *data;
168 virtual Message * clone()
const;
175 typedef struct __attribute__((packed)) {
176 int64_t timestamp_sec;
177 int64_t timestamp_usec;
182 } SetBoundingBoxMessage_data_t;
184 SetBoundingBoxMessage_data_t *data;
190 SetBoundingBoxMessage(
const float ini_p1_x,
const float ini_p1_y,
const float ini_p2_x,
const float ini_p2_y);
197 void set_p1_x(
const float new_p1_x);
198 size_t maxlenof_p1_x()
const;
200 void set_p1_y(
const float new_p1_y);
201 size_t maxlenof_p1_y()
const;
203 void set_p2_x(
const float new_p2_x);
204 size_t maxlenof_p2_x()
const;
206 void set_p2_y(
const float new_p2_y);
207 size_t maxlenof_p2_y()
const;
208 virtual Message * clone()
const;
215 typedef struct __attribute__((packed)) {
216 int64_t timestamp_sec;
217 int64_t timestamp_usec;
222 } SetFilterMessage_data_t;
224 SetFilterMessage_data_t *data;
236 FilterType filter()
const;
237 void set_filter(
const FilterType new_filter);
238 size_t maxlenof_filter()
const;
239 bool is_enable()
const;
240 void set_enable(
const bool new_enable);
241 size_t maxlenof_enable()
const;
242 virtual Message * clone()
const;
249 typedef struct __attribute__((packed)) {
250 int64_t timestamp_sec;
251 int64_t timestamp_usec;
258 } SetFilterParamFloatMessage_data_t;
260 SetFilterParamFloatMessage_data_t *data;
272 FilterType filter()
const;
273 void set_filter(
const FilterType new_filter);
274 size_t maxlenof_filter()
const;
275 char * param()
const;
276 void set_param(
const char * new_param);
277 size_t maxlenof_param()
const;
279 void set_value(
const float new_value);
280 size_t maxlenof_value()
const;
281 virtual Message * clone()
const;
288 typedef struct __attribute__((packed)) {
289 int64_t timestamp_sec;
290 int64_t timestamp_usec;
291 float max_line_point_distance;
295 } AddMapObstaclesMessage_data_t;
297 AddMapObstaclesMessage_data_t *data;
309 float max_line_point_distance()
const;
310 void set_max_line_point_distance(
const float new_max_line_point_distance);
311 size_t maxlenof_max_line_point_distance()
const;
312 virtual Message * clone()
const;
319 typedef struct __attribute__((packed)) {
320 int64_t timestamp_sec;
321 int64_t timestamp_usec;
327 } AddObstacleMessage_data_t;
329 AddObstacleMessage_data_t *data;
342 void set_name(
const char * new_name);
343 size_t maxlenof_name()
const;
345 void set_x(
const float new_x);
346 size_t maxlenof_x()
const;
348 void set_y(
const float new_y);
349 size_t maxlenof_y()
const;
350 virtual Message * clone()
const;
357 typedef struct __attribute__((packed)) {
358 int64_t timestamp_sec;
359 int64_t timestamp_usec;
363 } RemoveObstacleMessage_data_t;
365 RemoveObstacleMessage_data_t *data;
378 void set_name(
const char * new_name);
379 size_t maxlenof_name()
const;
380 virtual Message * clone()
const;
387 typedef struct __attribute__((packed)) {
388 int64_t timestamp_sec;
389 int64_t timestamp_usec;
398 } AddPointOfInterestMessage_data_t;
400 AddPointOfInterestMessage_data_t *data;
413 void set_name(
const char * new_name);
414 size_t maxlenof_name()
const;
416 void set_x(
const float new_x);
417 size_t maxlenof_x()
const;
419 void set_y(
const float new_y);
420 size_t maxlenof_y()
const;
421 ConnectionMode mode()
const;
422 void set_mode(
const ConnectionMode new_mode);
423 size_t maxlenof_mode()
const;
424 virtual Message * clone()
const;
431 typedef struct __attribute__((packed)) {
432 int64_t timestamp_sec;
433 int64_t timestamp_usec;
443 } AddPointOfInterestWithOriMessage_data_t;
445 AddPointOfInterestWithOriMessage_data_t *data;
458 void set_name(
const char * new_name);
459 size_t maxlenof_name()
const;
461 void set_x(
const float new_x);
462 size_t maxlenof_x()
const;
464 void set_y(
const float new_y);
465 size_t maxlenof_y()
const;
467 void set_ori(
const float new_ori);
468 size_t maxlenof_ori()
const;
469 ConnectionMode mode()
const;
470 void set_mode(
const ConnectionMode new_mode);
471 size_t maxlenof_mode()
const;
472 virtual Message * clone()
const;
479 typedef struct __attribute__((packed)) {
480 int64_t timestamp_sec;
481 int64_t timestamp_usec;
485 char property_name[64];
486 char property_value[1024];
488 } SetPointOfInterestPropertyMessage_data_t;
490 SetPointOfInterestPropertyMessage_data_t *data;
503 void set_name(
const char * new_name);
504 size_t maxlenof_name()
const;
505 char * property_name()
const;
506 void set_property_name(
const char * new_property_name);
507 size_t maxlenof_property_name()
const;
508 char * property_value()
const;
509 void set_property_value(
const char * new_property_value);
510 size_t maxlenof_property_value()
const;
511 virtual Message * clone()
const;
518 typedef struct __attribute__((packed)) {
519 int64_t timestamp_sec;
520 int64_t timestamp_usec;
528 } AddEdgeMessage_data_t;
530 AddEdgeMessage_data_t *data;
536 AddEdgeMessage(
const char * ini_p1,
const char * ini_p2,
const bool ini_directed,
const EdgeMode ini_mode);
543 void set_p1(
const char * new_p1);
544 size_t maxlenof_p1()
const;
546 void set_p2(
const char * new_p2);
547 size_t maxlenof_p2()
const;
548 bool is_directed()
const;
549 void set_directed(
const bool new_directed);
550 size_t maxlenof_directed()
const;
551 EdgeMode mode()
const;
552 void set_mode(
const EdgeMode new_mode);
553 size_t maxlenof_mode()
const;
554 virtual Message * clone()
const;
561 typedef struct __attribute__((packed)) {
562 int64_t timestamp_sec;
563 int64_t timestamp_usec;
564 char property_name[64];
565 char property_value[1024];
567 } SetGraphDefaultPropertyMessage_data_t;
569 SetGraphDefaultPropertyMessage_data_t *data;
581 char * property_name()
const;
582 void set_property_name(
const char * new_property_name);
583 size_t maxlenof_property_name()
const;
584 char * property_value()
const;
585 void set_property_value(
const char * new_property_value);
586 size_t maxlenof_property_value()
const;
587 virtual Message * clone()
const;
594 typedef struct __attribute__((packed)) {
595 int64_t timestamp_sec;
596 int64_t timestamp_usec;
599 } SetCopyGraphDefaultPropertiesMessage_data_t;
601 SetCopyGraphDefaultPropertiesMessage_data_t *data;
613 bool is_enable_copy()
const;
614 void set_enable_copy(
const bool new_enable_copy);
615 size_t maxlenof_enable_copy()
const;
616 virtual Message * clone()
const;
623 typedef struct __attribute__((packed)) {
624 int64_t timestamp_sec;
625 int64_t timestamp_usec;
629 } RemovePointOfInterestMessage_data_t;
631 RemovePointOfInterestMessage_data_t *data;
644 void set_name(
const char * new_name);
645 size_t maxlenof_name()
const;
646 virtual Message * clone()
const;
653 typedef struct __attribute__((packed)) {
654 int64_t timestamp_sec;
655 int64_t timestamp_usec;
656 } ComputeMessage_data_t;
658 ComputeMessage_data_t *data;
669 virtual Message * clone()
const;
679 uint32_t
msgid()
const;
680 void set_msgid(
const uint32_t new_msgid);
688 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
void set_msgid(const uint32_t new_msgid)
Set msgid value.
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
The node is marked as unconnected and will not be connected to another node.
EdgeMode
When adding edges, the mode defines how to add edges.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
const char * tostring_EdgeMode(EdgeMode value) const
Convert EdgeMode constant to string.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
Fawkes library namespace.
SetFilterMessage Fawkes BlackBoard Interface Message.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
If enabled, filters out all nodes which are not connected to any other node.
ConnectionMode
Drive modes enum.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
const char * tostring_FilterType(FilterType value) const
Convert FilterType constant to string.
Sometimes after applying other filters one can end up with multiple disconnected graphs.
The node is will not be initially connected.
Base class for all Fawkes BlackBoard interfaces.
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
virtual Message * create_message(const char *type) const
Create message based on type name.
AddObstacleMessage Fawkes BlackBoard Interface Message.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
uint32_t msgid() const
Get msgid value.
The edge is added as-is, it may overlap or intersect with other edges.
bool is_final() const
Get final value.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
ComputeMessage Fawkes BlackBoard Interface Message.
const char * type() const
Get type of interface.
void set_final(const bool new_final)
Set final value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
size_t maxlenof_final() const
Get maximum length of final value.
Only insert edge if it does not intersect with any other existing edge in the graph.
FilterType
Post-processing filtering type.
const char * tostring_ConnectionMode(ConnectionMode value) const
Convert ConnectionMode constant to string.
ClearMessage Fawkes BlackBoard Interface Message.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
First try the CLOSEST_EDGE method.
Connect point to the node on the graph closest to the given point.
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
AddEdgeMessage Fawkes BlackBoard Interface Message.
Connect point to the edge in which segment it lies, i.e.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.