36 InputTypes<
std::shared_ptr<InType0>, std::shared_ptr<InType1>,
37 std::shared_ptr<InType2>, std::shared_ptr<InType3>>,
57 auto apollo_reader_1 =
58 cyber_node_->template CreateReader<InType1>(reader_cfg_1);
62 auto apollo_reader_2 =
63 cyber_node_->template CreateReader<InType2>(reader_cfg_2);
67 auto apollo_reader_3 =
68 cyber_node_->template CreateReader<InType3>(reader_cfg_3);
72 auto apollo_blocker_1 =
75 auto apollo_blocker_2 =
78 auto apollo_blocker_3 =
81#ifdef RCLCPP__RCLCPP_HPP_
82 auto ros_publisher_0 =
83 ros_node_->create_publisher<OutType0>(ros_topic_name_0, 10);
84 ros_publishers_.push_back(std::move(ros_publisher_0));
85 auto func = [
this, ros_publisher_0, apollo_blocker_1, apollo_blocker_2,
86 apollo_blocker_3](
const std::shared_ptr<InType0> in) {
88 auto func = [
this, apollo_blocker_1, apollo_blocker_2,
89 apollo_blocker_3](
const std::shared_ptr<InType0> in) {
91 auto out = std::make_shared<OutType0>();
92 if (!apollo_blocker_1->IsPublishedEmpty() &&
93 !apollo_blocker_2->IsPublishedEmpty() &&
94 !apollo_blocker_3->IsPublishedEmpty()) {
95 auto msg1 = apollo_blocker_1->GetLatestPublishedPtr();
96 auto msg2 = apollo_blocker_2->GetLatestPublishedPtr();
97 auto msg3 = apollo_blocker_3->GetLatestPublishedPtr();
100 std::shared_ptr<InType2>, std::shared_ptr<InType3>>{
101 std::make_tuple(in, msg1, msg2, msg3)};
104 this->
ConvertMsg(in_container, out_container);
105#ifdef RCLCPP__RCLCPP_HPP_
106 ros_publisher_0->publish(*out);
110 auto apollo_reader_0 =
111 cyber_node_->template CreateReader<InType0>(reader_cfg_0, func);
122 InputTypes<std::shared_ptr<InType0>, std::shared_ptr<InType1>,
123 std::shared_ptr<InType2>, std::shared_ptr<InType3>>& input,
124 OutputTypes<std::shared_ptr<OutType0>>& output) = 0;
139 InputTypes<
std::shared_ptr<InType0>, std::shared_ptr<InType1>,
140 std::shared_ptr<InType2>, std::shared_ptr<InType3>>,
141 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>>>
147 bool Init()
override;
151 InputTypes<std::shared_ptr<InType0>, std::shared_ptr<InType1>,
152 std::shared_ptr<InType2>, std::shared_ptr<InType3>>& input,
153 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>>&
176 auto apollo_reader_1 =
177 cyber_node_->template CreateReader<InType1>(reader_cfg_1);
181 auto apollo_reader_2 =
182 cyber_node_->template CreateReader<InType2>(reader_cfg_2);
186 auto apollo_reader_3 =
187 cyber_node_->template CreateReader<InType3>(reader_cfg_3);
192 auto apollo_blocker_1 =
195 auto apollo_blocker_2 =
198 auto apollo_blocker_3 =
202#ifdef RCLCPP__RCLCPP_HPP_
203 auto ros_publisher_0 =
204 ros_node_->create_publisher<OutType0>(ros_topic_name_0, 10);
205 auto ros_publisher_1 =
206 ros_node_->create_publisher<OutType1>(ros_topic_name_1, 10);
207 ros_publishers_.push_back(std::move(ros_publisher_0));
208 ros_publishers_.push_back(std::move(ros_publisher_1));
209 auto func = [
this, apollo_blocker_1, apollo_blocker_2, apollo_blocker_3,
211 ros_publisher_1](
const std::shared_ptr<InType0> in) {
213 auto func = [
this, apollo_blocker_1, apollo_blocker_2,
214 apollo_blocker_3](
const std::shared_ptr<InType0> in) {
216 if (!apollo_blocker_1->IsPublishedEmpty() &&
217 !apollo_blocker_2->IsPublishedEmpty() &&
218 !apollo_blocker_3->IsPublishedEmpty()) {
219 auto msg1 = apollo_blocker_1->GetLatestPublishedPtr();
220 auto msg2 = apollo_blocker_2->GetLatestPublishedPtr();
221 auto msg3 = apollo_blocker_3->GetLatestPublishedPtr();
222 auto out_0 = std::make_shared<OutType0>();
223 auto out_1 = std::make_shared<OutType1>();
226 std::shared_ptr<InType2>, std::shared_ptr<InType3>>{
227 std::make_tuple(in, msg1, msg2, msg3)};
230 std::make_tuple(out_0, out_1)};
231 this->
ConvertMsg(in_container, out_container);
232#ifdef RCLCPP__RCLCPP_HPP_
233 ros_publisher_0->publish(*out_0);
234 ros_publisher_1->publish(*out_1);
238 auto apollo_reader_0 =
239 cyber_node_->template CreateReader<InType0>(reader_cfg_0, func);
252 InputTypes<
std::shared_ptr<InType0>, std::shared_ptr<InType1>,
253 std::shared_ptr<InType2>, std::shared_ptr<InType3>>,
254 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
260 bool Init()
override;
264 InputTypes<std::shared_ptr<InType0>, std::shared_ptr<InType1>,
265 std::shared_ptr<InType2>, std::shared_ptr<InType3>>& input,
266 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
267 std::shared_ptr<OutType2>>& output) = 0;
291 auto apollo_reader_1 =
292 cyber_node_->template CreateReader<InType1>(reader_cfg_1);
296 auto apollo_reader_2 =
297 cyber_node_->template CreateReader<InType2>(reader_cfg_2);
301 auto apollo_reader_3 =
302 cyber_node_->template CreateReader<InType3>(reader_cfg_3);
304 auto apollo_blocker_1 =
307 auto apollo_blocker_2 =
310 auto apollo_blocker_3 =
318#ifdef RCLCPP__RCLCPP_HPP_
319 auto ros_publisher_0 =
320 ros_node_->create_publisher<OutType0>(ros_topic_name_0, 10);
321 auto ros_publisher_1 =
322 ros_node_->create_publisher<OutType1>(ros_topic_name_1, 10);
323 auto ros_publisher_2 =
324 ros_node_->create_publisher<OutType2>(ros_topic_name_2, 10);
325 ros_publishers_.push_back(std::move(ros_publisher_0));
326 ros_publishers_.push_back(std::move(ros_publisher_1));
327 ros_publishers_.push_back(std::move(ros_publisher_2));
328 auto func = [
this, apollo_blocker_1, apollo_blocker_2, apollo_blocker_3,
329 ros_publisher_0, ros_publisher_1,
330 ros_publisher_2](
const std::shared_ptr<InType0> in) {
332 auto func = [
this, apollo_blocker_1, apollo_blocker_2,
333 apollo_blocker_3](
const std::shared_ptr<InType0> in) {
335 if (!apollo_blocker_1->IsPublishedEmpty() &&
336 !apollo_blocker_1->IsPublishedEmpty() &&
337 !apollo_blocker_1->IsPublishedEmpty()) {
338 auto msg1 = apollo_blocker_1->GetLatestPublishedPtr();
339 auto msg2 = apollo_blocker_2->GetLatestPublishedPtr();
340 auto msg3 = apollo_blocker_3->GetLatestPublishedPtr();
341 auto out_0 = std::make_shared<OutType0>();
342 auto out_1 = std::make_shared<OutType1>();
343 auto out_2 = std::make_shared<OutType2>();
346 std::shared_ptr<InType2>, std::shared_ptr<InType3>>{
347 std::make_tuple(in, msg1, msg2, msg3)};
350 std::shared_ptr<OutType2>>{
351 std::make_tuple(out_0, out_1, out_2)};
352 this->
ConvertMsg(in_container, out_container);
353#ifdef RCLCPP__RCLCPP_HPP_
354 ros_publisher_0->publish(*out_0);
355 ros_publisher_1->publish(*out_1);
356 ros_publisher_2->publish(*out_2);
360 auto apollo_reader_0 =
361 cyber_node_->template CreateReader<InType0>(reader_cfg_0, func);
374 InputTypes<
std::shared_ptr<InType0>, std::shared_ptr<InType1>,
375 std::shared_ptr<InType2>, std::shared_ptr<InType3>>,
376 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
377 std::shared_ptr<OutType2>, std::shared_ptr<OutType3>>>
383 bool Init()
override;
387 InputTypes<std::shared_ptr<InType0>, std::shared_ptr<InType1>,
388 std::shared_ptr<InType2>, std::shared_ptr<InType3>>& input,
389 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
390 std::shared_ptr<OutType2>, std::shared_ptr<OutType3>>&
401 std::shared_ptr<OutType2>, std::shared_ptr<OutType3>>>
::Init() {
415 auto apollo_reader_1 =
416 cyber_node_->template CreateReader<InType1>(reader_cfg_1);
420 auto apollo_reader_2 =
421 cyber_node_->template CreateReader<InType2>(reader_cfg_2);
425 auto apollo_reader_3 =
426 cyber_node_->template CreateReader<InType3>(reader_cfg_3);
428 auto apollo_blocker_1 =
431 auto apollo_blocker_2 =
434 auto apollo_blocker_3 =
443#ifdef RCLCPP__RCLCPP_HPP_
444 auto ros_publisher_0 =
445 ros_node_->create_publisher<OutType0>(ros_topic_name_0, 10);
446 auto ros_publisher_1 =
447 ros_node_->create_publisher<OutType1>(ros_topic_name_1, 10);
448 auto ros_publisher_2 =
449 ros_node_->create_publisher<OutType2>(ros_topic_name_2, 10);
450 auto ros_publisher_3 =
451 ros_node_->create_publisher<OutType2>(ros_topic_name_3, 10);
452 ros_publishers_.push_back(std::move(ros_publisher_0));
453 ros_publishers_.push_back(std::move(ros_publisher_1));
454 ros_publishers_.push_back(std::move(ros_publisher_2));
455 ros_publishers_.push_back(std::move(ros_publisher_3));
456 auto func = [
this, apollo_blocker_1, apollo_blocker_2, apollo_blocker_3,
457 ros_publisher_0, ros_publisher_1, ros_publisher_2,
458 ros_publisher_3](
const std::shared_ptr<InType0> in) {
460 auto func = [
this, apollo_blocker_1, apollo_blocker_2,
461 apollo_blocker_3](
const std::shared_ptr<InType0> in) {
463 if (!apollo_blocker_1->IsPublishedEmpty() &&
464 !apollo_blocker_2->IsPublishedEmpty() &&
465 !apollo_blocker_3->IsPublishedEmpty()) {
466 auto msg1 = apollo_blocker_1->GetLatestPublishedPtr();
467 auto msg2 = apollo_blocker_2->GetLatestPublishedPtr();
468 auto msg3 = apollo_blocker_3->GetLatestPublishedPtr();
469 auto out_0 = std::make_shared<OutType0>();
470 auto out_1 = std::make_shared<OutType1>();
471 auto out_2 = std::make_shared<OutType2>();
472 auto out_3 = std::make_shared<OutType3>();
475 std::shared_ptr<InType2>, std::shared_ptr<InType3>>{
476 std::make_tuple(in, msg1, msg2, msg3)};
479 std::shared_ptr<OutType2>, std::shared_ptr<OutType3>>{
480 std::make_tuple(out_0, out_1, out_2, out_3)};
481 this->
ConvertMsg(in_container, out_container);
482#ifdef RCLCPP__RCLCPP_HPP_
483 ros_publisher_0->publish(*out_0);
484 ros_publisher_1->publish(*out_1);
485 ros_publisher_2->publish(*out_2);
486 ros_publisher_3->publish(*out_2);
490 auto apollo_reader_0 =
491 cyber_node_->template CreateReader<InType0>(reader_cfg_0, func);