395 {
398 return false;
399 }
401 return false;
402 }
403
405 std::make_shared<apollo::cyber::proto::RoleAttributes>());
407
409 std::make_shared<apollo::cyber::proto::RoleAttributes>());
411
413 std::make_shared<apollo::cyber::proto::RoleAttributes>());
415
417 std::make_shared<apollo::cyber::proto::RoleAttributes>());
419
423
424 apollo_writer_0_ =
426 apollo_writer_1_ =
428 apollo_writer_2_ =
430 apollo_writer_3_ =
432#ifdef RCLCPP__RCLCPP_HPP_
433 ros_msg_subs_.push_back(
434 std::move(std::make_shared<message_filters::Subscriber<InType0>>(
435 ros_node_, ros_topic_name_0)));
436 ros_msg_subs_.push_back(
437 std::move(std::make_shared<message_filters::Subscriber<InType1>>(
438 ros_node_, ros_topic_name_1)));
439 ros_msg_subs_.push_back(
440 std::move(std::make_shared<message_filters::Subscriber<InType2>>(
441 ros_node_, ros_topic_name_2)));
442 syncApproximate_ = std::make_shared<
443 message_filters::Synchronizer<approximate_sync_policy>>(
444 approximate_sync_policy(10),
445 *dynamic_cast<message_filters::Subscriber<InType0>*>(
446 ros_msg_subs_[0].get()),
447 *dynamic_cast<message_filters::Subscriber<InType1>*>(
448 ros_msg_subs_[1].get()),
449 *dynamic_cast<message_filters::Subscriber<InType2>*>(
450 ros_msg_subs_[2].get()));
451 syncApproximate_->registerCallback(
453 InputTypes<std::shared_ptr<InType0>, std::shared_ptr<InType1>,
454 std::shared_ptr<InType2>>,
455 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
456 std::shared_ptr<OutType2>,
457 std::shared_ptr<OutType3>>>::TopicCallback,
458 this);
459
460 ros_spin_thread_ =
461 std::make_shared<std::thread>(&MessageConverter::NodeSpin, this);
462#endif
463 return true;
464 }
std::atomic< bool > init_
std::unique_ptr< apollo::cyber::Node > cyber_node_
std::vector< std::shared_ptr< apollo::cyber::proto::RoleAttributes > > apollo_attrs_
ConverterConf converter_conf_
bool LoadConfig(ConverterConf *config)
optional string apollo_channel_name_2
optional string ros_topic_name_2
optional string apollo_channel_name_0
optional string apollo_channel_name_3
optional string apollo_channel_name_1
optional string ros_topic_name_0
optional string ros_topic_name_1