1 #ifndef NODE_ROS_PUBSUB_WRAPPER_H
2 #define NODE_ROS_PUBSUB_WRAPPER_H
4 #pragma GCC diagnostic ignored "-Wunused-function"
5 #pragma GCC diagnostic ignored "-Wunused-variable"
7 #include "rclcpp/rclcpp.hpp"
12 #include "rmw/types.h"
17 const char* TOPIC_MEASUREMENT =
"measurements";
18 const char* TOPIC_MOTION =
"motion";
19 const char* TOPIC_LIGHTS =
"lights";
20 const char* TOPIC_SERVICESTATE =
"servicestate";
21 const char* TOPIC_PATHPOLYNOM =
"pathpolynom";
22 const char* TOPIC_SETTINGSVALUES =
"settingsvalues";
23 const char* TOPIC_DEBUGPOLYNOM =
"debugpolynom";
24 const char* TOPIC_IDENTIFICATION =
"identification";
25 const char* TOPIC_POINTSLIST =
"pointslist";
26 const char* TOPIC_MARVELMINDCONTROL =
"marvelmindcontrol";
27 const char* TOPIC_DEBUGCONTROLLER =
"debugcontroller";
28 const char* TOPIC_MARVELMIND =
"marvelmind";
29 const char* TOPIC_HEARTBEAT =
"heartbeat";
30 const char* TOPIC_OBJECTVECTOR =
"objects_vector";
31 const char* TOPIC_BUTTON_STATE =
"buttonState";
32 const char* TOPIC_DEBUGMAPDATA =
"/galaxis/map/debug/data";
33 const char* TOPIC_CONTROLLERREF =
"/galaxis/controller/reference";
34 const char* TOPIC_OBSTACLES =
"/galaxis/objectdetection/obstacles";
35 const char* TOPIC_CAR_POSE =
"/galaxis/ap/carpose";
36 const char* TOPIC_SYSTEM_SETTINGS =
"/galaxis/systemsettings";
37 const char* TOPIC_QR_CODE_DETECTTION=
"/galaxis/qrcodedetection/state";
38 const char* TOPIC_STOP_LINE =
"/galaxis/stopline";
39 const char* TOPIC_PARKING_STATE =
"/galaxis/parking/state";
40 const char* TOPIC_PARKING_OPERATION =
"/galaxis/ap/parkingoperation";
44 const char* TOPIC_CAMERA_RAW =
"/galaxis/camera_raw";
45 const char* TOPIC_CAMERA_RAW_BE =
"/galaxis/camera_raw/best_effort";
46 const char* TOPIC_CAMERA_COMPRESSED =
"/galaxis/camera_compressed";
47 const char* TOPIC_VCI_LANE_IMAGE =
"/galaxis/laneimage";
48 const char* TOPIC_VCI_LANE_IMAGE_SIMULATION =
"/galaxis/simulation/laneimage";
49 const char* TOPIC_AP_DATA_IMAGE_DEBUG =
"/galaxis/debug/ap/map/lanes";
50 const char* TOPIC_AP_FULL_MAP_DATA_IMAGE_DEBUG =
"/galaxis/debug/ap/map/full";
51 const char* TOPIC_AP_DRIVE_LANE_DEBUG =
"/galaxis/debug/ap/drivelanes";
52 const char* TOPIC_AP_CONTROLLER_DATA_DEBUG =
"/galaxis/debug/controller/trajectory";
53 const char* TOPIC_STOP_LINE_IMAGE =
"/galaxis/stoplineimage";
54 const char* TOPIC_START_LINE_IMAGE =
"/galaxis/startline/debug";
55 const char* TOPIC_STOP_LINE_IMAGE_RIGHT =
"/galaxis/stoplineimageright";
56 const char* TOPIC_STOP_LINE_IMAGE_LEFT =
"/galaxis/stoplineimageleft";
57 const char* TOPIC_STOP_LINE_IMAGE_RIGHT_BORDER =
"/galaxis/stoplineimagerightborder";
65 static const rmw_qos_profile_t qos_profile_default = {
66 RMW_QOS_POLICY_HISTORY_KEEP_LAST,
68 RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT,
69 RMW_QOS_POLICY_DURABILITY_VOLATILE,
70 RMW_QOS_DEADLINE_DEFAULT,
71 RMW_QOS_LIFESPAN_DEFAULT,
72 RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT,
73 RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT,
77 static const rmw_qos_profile_t qos_profile_reliable = {
78 RMW_QOS_POLICY_HISTORY_KEEP_LAST,
80 RMW_QOS_POLICY_RELIABILITY_RELIABLE,
81 RMW_QOS_POLICY_DURABILITY_VOLATILE,
82 RMW_QOS_DEADLINE_DEFAULT,
83 RMW_QOS_LIFESPAN_DEFAULT,
84 RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT,
85 RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT,
89 rclcpp::QoS get_qos_profile(QoS_Profile_t p_qos_settings) {
90 rclcpp::QoS qos_params = rclcpp::QoS(rclcpp::KeepLast(1), qos_profile_default);
92 switch(p_qos_settings) {
94 qos_params = rclcpp::QoS(rclcpp::KeepLast(1), qos_profile_default);
97 qos_params = rclcpp::QoS(rclcpp::KeepLast(1), qos_profile_reliable);
108 template <
typename CallbackT>
109 void create_subscription(
110 rclcpp::Node* p_nodePtr,
111 rclcpp::Subscription<MeasurementsType>::SharedPtr& p_subSPtr,
112 CallbackT&& p_bind) {
113 if(p_nodePtr ==
nullptr) {
116 std::string topic = TOPIC_MEASUREMENT;
118 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
120 p_subSPtr = p_nodePtr->create_subscription<
MeasurementsType>(topic, qos_params, p_bind);
124 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<MeasurementsType>::SharedPtr& p_pubSPtr) {
125 if(p_nodePtr ==
nullptr) {
128 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
129 std::string topic = TOPIC_MEASUREMENT;
130 p_pubSPtr = p_nodePtr->create_publisher<
MeasurementsType>(topic, qos_params);
134 template <
typename CallbackT>
135 void create_subscription(
136 rclcpp::Node* p_nodePtr,
137 rclcpp::Subscription<ControlMotionType>::SharedPtr& p_subSPtr,
138 CallbackT&& p_bind) {
139 if(p_nodePtr ==
nullptr) {
142 std::string topic = TOPIC_MOTION;
144 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
146 p_subSPtr = p_nodePtr->create_subscription<
ControlMotionType>(topic, qos_params, p_bind);
150 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ControlMotionType>::SharedPtr& p_pubSPtr) {
151 if(p_nodePtr ==
nullptr) {
154 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
155 std::string topic = TOPIC_MOTION;
160 template <
typename CallbackT>
161 void create_subscription(
162 rclcpp::Node* p_nodePtr,
163 rclcpp::Subscription<PathpolynomType>::SharedPtr& p_subSPtr,
164 CallbackT&& p_bind) {
165 if(p_nodePtr ==
nullptr) {
168 std::string topic = TOPIC_PATHPOLYNOM;
170 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
172 p_subSPtr = p_nodePtr->create_subscription<
PathpolynomType>(topic, qos_params, p_bind);
176 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<PathpolynomType>::SharedPtr& p_pubSPtr) {
177 if(p_nodePtr ==
nullptr) {
180 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
181 std::string topic = TOPIC_PATHPOLYNOM;
182 p_pubSPtr = p_nodePtr->create_publisher<
PathpolynomType>(topic, qos_params);
186 template <
typename CallbackT>
187 void create_subscription(
188 rclcpp::Node* p_nodePtr,
189 rclcpp::Subscription<DebugPolynomType>::SharedPtr& p_subSPtr,
190 CallbackT&& p_bind) {
191 if(p_nodePtr ==
nullptr) {
194 std::string topic = TOPIC_DEBUGPOLYNOM;
196 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
198 p_subSPtr = p_nodePtr->create_subscription<
DebugPolynomType>(topic, qos_params, p_bind);
202 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<DebugPolynomType>::SharedPtr& p_pubSPtr) {
203 if(p_nodePtr ==
nullptr) {
206 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
207 std::string topic = TOPIC_DEBUGPOLYNOM;
208 p_pubSPtr = p_nodePtr->create_publisher<
DebugPolynomType>(topic, qos_params);
212 template <
typename CallbackT>
213 void create_subscription(
214 rclcpp::Node* p_nodePtr,
215 rclcpp::Subscription<SettingsValuesType>::SharedPtr& p_subSPtr,
216 CallbackT&& p_bind) {
217 if(p_nodePtr ==
nullptr) {
220 std::string topic = TOPIC_SETTINGSVALUES;
222 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
224 p_subSPtr = p_nodePtr->create_subscription<
SettingsValuesType>(topic, qos_params, p_bind);
228 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<SettingsValuesType>::SharedPtr& p_pubSPtr) {
229 if(p_nodePtr ==
nullptr) {
232 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
233 std::string topic = TOPIC_SETTINGSVALUES;
238 template <
typename CallbackT>
239 void create_subscription(
240 rclcpp::Node* p_nodePtr,
241 rclcpp::Subscription<ServiceStateType>::SharedPtr& p_subSPtr,
242 CallbackT&& p_bind) {
243 if(p_nodePtr ==
nullptr) {
246 std::string topic = TOPIC_SERVICESTATE;
248 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
250 p_subSPtr = p_nodePtr->create_subscription<
ServiceStateType>(topic, qos_params, p_bind);
254 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ServiceStateType>::SharedPtr& p_pubSPtr) {
255 if(p_nodePtr ==
nullptr) {
258 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
259 std::string topic = TOPIC_SERVICESTATE;
260 p_pubSPtr = p_nodePtr->create_publisher<
ServiceStateType>(topic, qos_params);
264 template <
typename CallbackT>
265 void create_subscription(
266 rclcpp::Node* p_nodePtr,
267 rclcpp::Subscription<IdentificationType>::SharedPtr& p_subSPtr,
268 CallbackT&& p_bind) {
269 if(p_nodePtr ==
nullptr) {
272 std::string topic = TOPIC_IDENTIFICATION;
274 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
276 p_subSPtr = p_nodePtr->create_subscription<
IdentificationType>(topic, qos_params, p_bind);
280 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<IdentificationType>::SharedPtr& p_pubSPtr) {
281 if(p_nodePtr ==
nullptr) {
284 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
285 std::string topic = TOPIC_IDENTIFICATION;
290 template <
typename CallbackT>
291 void create_subscription(
292 rclcpp::Node* p_nodePtr,
293 rclcpp::Subscription<PointsListType>::SharedPtr& p_subSPtr,
294 CallbackT&& p_bind) {
295 if(p_nodePtr ==
nullptr) {
298 std::string topic = TOPIC_POINTSLIST;
300 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
302 p_subSPtr = p_nodePtr->create_subscription<
PointsListType>(topic, qos_params, p_bind);
306 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<PointsListType>::SharedPtr& p_pubSPtr) {
307 if(p_nodePtr ==
nullptr) {
310 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
311 std::string topic = TOPIC_POINTSLIST;
312 p_pubSPtr = p_nodePtr->create_publisher<
PointsListType>(topic, qos_params);
316 template <
typename CallbackT>
317 void create_subscription(
318 rclcpp::Node* p_nodePtr,
319 rclcpp::Subscription<MarvelMindControlType>::SharedPtr& p_subSPtr,
320 CallbackT&& p_bind) {
322 if(p_nodePtr ==
nullptr) {
325 std::string topic = TOPIC_MARVELMINDCONTROL;
327 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
333 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<MarvelMindControlType>::SharedPtr& p_pubSPtr) {
334 if(p_nodePtr ==
nullptr) {
337 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
338 std::string topic = TOPIC_MARVELMINDCONTROL;
343 template <
typename CallbackT>
344 void create_subscription(
345 rclcpp::Node* p_nodePtr,
346 rclcpp::Subscription<ControllerReferenceType>::SharedPtr& p_subSPtr,
347 CallbackT&& p_bind) {
348 if(p_nodePtr ==
nullptr) {
351 std::string topic = TOPIC_CONTROLLERREF;
353 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
359 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ControllerReferenceType>::SharedPtr& p_pubSPtr) {
360 if(p_nodePtr ==
nullptr) {
363 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
364 std::string topic = TOPIC_CONTROLLERREF;
369 template <
typename CallbackT>
370 void create_subscription(
371 rclcpp::Node* p_nodePtr,
372 rclcpp::Subscription<GPSDataType>::SharedPtr& p_subSPtr,
373 CallbackT&& p_bind) {
374 if(p_nodePtr ==
nullptr) {
377 std::string topic = TOPIC_MARVELMIND;
379 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
381 p_subSPtr = p_nodePtr->create_subscription<
GPSDataType>(topic, qos_params, p_bind);
385 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<GPSDataType>::SharedPtr& p_pubSPtr) {
386 if(p_nodePtr ==
nullptr) {
389 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
390 std::string topic = TOPIC_MARVELMIND;
391 p_pubSPtr = p_nodePtr->create_publisher<
GPSDataType>(topic, qos_params);
395 template <
typename CallbackT>
396 void create_subscription(
397 rclcpp::Node* p_nodePtr,
398 rclcpp::Subscription<ControlLightsType>::SharedPtr& p_subSPtr,
399 CallbackT&& p_bind) {
400 if(p_nodePtr ==
nullptr) {
403 std::string topic = TOPIC_LIGHTS;
405 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
407 p_subSPtr = p_nodePtr->create_subscription<
ControlLightsType>(topic, qos_params, p_bind);
411 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ControlLightsType>::SharedPtr& p_pubSPtr) {
412 if(p_nodePtr ==
nullptr) {
415 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
416 std::string topic = TOPIC_LIGHTS;
421 template <
typename CallbackT>
422 void create_subscription(
423 rclcpp::Node* p_nodePtr,
424 rclcpp::Subscription<DebugControllerType>::SharedPtr& p_subSPtr,
425 CallbackT&& p_bind) {
426 if(p_nodePtr ==
nullptr) {
429 std::string topic = TOPIC_DEBUGCONTROLLER;
431 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
433 p_subSPtr = p_nodePtr->create_subscription<
DebugControllerType>(topic, qos_params, p_bind);
437 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<DebugControllerType>::SharedPtr& p_pubSPtr) {
438 if(p_nodePtr ==
nullptr) {
441 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
442 std::string topic = TOPIC_DEBUGCONTROLLER;
448 template <
typename CallbackT>
449 void create_subscription(
450 rclcpp::Node* p_nodePtr,
451 rclcpp::Subscription<HeartbeatMessageType>::SharedPtr& p_subSPtr,
452 CallbackT&& p_bind) {
453 if(p_nodePtr ==
nullptr) {
456 std::string topic = TOPIC_HEARTBEAT;
458 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
464 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<HeartbeatMessageType>::SharedPtr& p_pubSPtr) {
465 if(p_nodePtr ==
nullptr) {
468 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
469 std::string topic = TOPIC_HEARTBEAT;
474 template <
typename CallbackT>
475 void create_subscription(
476 rclcpp::Node* p_nodePtr,
477 rclcpp::Subscription<ObjectVectorMessageType>::SharedPtr& p_subSPtr,
478 CallbackT&& p_bind) {
479 if(p_nodePtr ==
nullptr) {
482 std::string topic = TOPIC_OBJECTVECTOR;
484 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
490 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ObjectVectorMessageType>::SharedPtr& p_pubSPtr) {
491 if(p_nodePtr ==
nullptr) {
494 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
495 std::string topic = TOPIC_OBJECTVECTOR;
500 template <
typename CallbackT>
501 void create_subscription(
502 rclcpp::Node* p_nodePtr,
503 rclcpp::Subscription<ButtonStateMessageType>::SharedPtr& p_subSPtr,
504 CallbackT&& p_bind) {
505 if(p_nodePtr ==
nullptr) {
508 std::string topic = TOPIC_BUTTON_STATE;
510 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
516 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ButtonStateMessageType>::SharedPtr& p_pubSPtr) {
517 if(p_nodePtr ==
nullptr) {
520 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
521 std::string topic = TOPIC_BUTTON_STATE;
526 template <
typename CallbackT>
527 void create_subscription(
528 rclcpp::Node* p_nodePtr,
529 rclcpp::Subscription<ObstacleListType>::SharedPtr& p_subSPtr,
530 CallbackT&& p_bind) {
531 if(p_nodePtr ==
nullptr) {
534 std::string topic = TOPIC_OBSTACLES;
536 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
538 p_subSPtr = p_nodePtr->create_subscription<
ObstacleListType>(topic, qos_params, p_bind);
542 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ObstacleListType>::SharedPtr& p_pubSPtr) {
543 if(p_nodePtr ==
nullptr) {
546 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
547 std::string topic = TOPIC_OBSTACLES;
548 p_pubSPtr = p_nodePtr->create_publisher<
ObstacleListType>(topic, qos_params);
552 template <
typename CallbackT>
553 void create_subscription(
554 rclcpp::Node* p_nodePtr,
555 rclcpp::Subscription<CarPoseEstimatedType>::SharedPtr& p_subSPtr,
556 CallbackT&& p_bind) {
557 if(p_nodePtr ==
nullptr) {
560 std::string topic = TOPIC_CAR_POSE;
562 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
568 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<CarPoseEstimatedType>::SharedPtr& p_pubSPtr) {
569 if(p_nodePtr ==
nullptr) {
572 rclcpp::QoS qos_params = get_qos_profile(QOS_BEST_EFFORT);
573 std::string topic = TOPIC_CAR_POSE;
578 template <
typename CallbackT>
579 void create_subscription(
580 rclcpp::Node* p_nodePtr,
581 rclcpp::Subscription<SystemSettingsType>::SharedPtr& p_subSPtr,
582 CallbackT&& p_bind) {
583 if(p_nodePtr ==
nullptr) {
586 std::string topic = TOPIC_SYSTEM_SETTINGS;
588 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
590 p_subSPtr = p_nodePtr->create_subscription<
SystemSettingsType>(topic, qos_params, p_bind);
594 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<SystemSettingsType>::SharedPtr& p_pubSPtr) {
595 if(p_nodePtr ==
nullptr) {
598 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
599 std::string topic = TOPIC_SYSTEM_SETTINGS;
604 template <
typename CallbackT>
605 void create_subscription(
606 rclcpp::Node* p_nodePtr,
607 rclcpp::Subscription<StopLineType>::SharedPtr& p_subSPtr,
608 CallbackT&& p_bind) {
609 if(p_nodePtr ==
nullptr) {
612 std::string topic = TOPIC_STOP_LINE;
614 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
616 p_subSPtr = p_nodePtr->create_subscription<
StopLineType>(topic, qos_params, p_bind);
620 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<StopLineType>::SharedPtr& p_pubSPtr) {
621 if(p_nodePtr ==
nullptr) {
624 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
625 std::string topic = TOPIC_STOP_LINE;
626 p_pubSPtr = p_nodePtr->create_publisher<
StopLineType>(topic, qos_params);
630 template <
typename CallbackT>
631 void create_subscription(
632 rclcpp::Node* p_nodePtr,
633 rclcpp::Subscription<QRCodeDetectType>::SharedPtr& p_subSPtr,
634 CallbackT&& p_bind) {
635 if(p_nodePtr ==
nullptr) {
638 std::string topic = TOPIC_QR_CODE_DETECTTION;
640 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
642 p_subSPtr = p_nodePtr->create_subscription<
QRCodeDetectType>(topic, qos_params, p_bind);
646 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<QRCodeDetectType>::SharedPtr& p_pubSPtr) {
647 if(p_nodePtr ==
nullptr) {
650 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
651 std::string topic = TOPIC_QR_CODE_DETECTTION;
652 p_pubSPtr = p_nodePtr->create_publisher<
QRCodeDetectType>(topic, qos_params);
656 template <
typename CallbackT>
657 void create_subscription(
658 rclcpp::Node* p_nodePtr,
659 rclcpp::Subscription<ParkingStateType>::SharedPtr& p_subSPtr,
660 CallbackT&& p_bind) {
661 if(p_nodePtr ==
nullptr) {
664 std::string topic = TOPIC_PARKING_STATE;
666 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
668 p_subSPtr = p_nodePtr->create_subscription<
ParkingStateType>(topic, qos_params, p_bind);
672 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ParkingStateType>::SharedPtr& p_pubSPtr) {
673 if(p_nodePtr ==
nullptr) {
676 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
677 std::string topic = TOPIC_PARKING_STATE;
678 p_pubSPtr = p_nodePtr->create_publisher<
ParkingStateType>(topic, qos_params);
682 template <
typename CallbackT>
683 void create_subscription(
684 rclcpp::Node* p_nodePtr,
685 rclcpp::Subscription<ParkingOperationType>::SharedPtr& p_subSPtr,
686 CallbackT&& p_bind) {
687 if(p_nodePtr ==
nullptr) {
690 std::string topic = TOPIC_PARKING_OPERATION;
692 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
698 void create_publisher(rclcpp::Node* p_nodePtr, rclcpp::Publisher<ParkingOperationType>::SharedPtr& p_pubSPtr) {
699 if(p_nodePtr ==
nullptr) {
702 rclcpp::QoS qos_params = get_qos_profile(QOS_RELIABLE);
703 std::string topic = TOPIC_PARKING_OPERATION;
711 #pragma GCC diagnostic pop
712 #pragma GCC diagnostic pop
714 #endif //NODE_ROS_PUBSUB_WRAPPER_H