262 {
265 return false;
266 }
268 return false;
269 }
270
273
278
279#ifdef RCLCPP__RCLCPP_HPP_
280 auto ros_publisher_0 =
281 ros_node_->create_publisher<OutType0>(ros_topic_name_0, 10);
282 auto ros_publisher_1 =
283 ros_node_->create_publisher<OutType1>(ros_topic_name_1, 10);
284 auto ros_publisher_2 =
285 ros_node_->create_publisher<OutType2>(ros_topic_name_2, 10);
286 auto ros_publisher_3 =
287 ros_node_->create_publisher<OutType2>(ros_topic_name_3, 10);
288 ros_publishers_.push_back(std::move(ros_publisher_0));
289 ros_publishers_.push_back(std::move(ros_publisher_1));
290 ros_publishers_.push_back(std::move(ros_publisher_2));
291 ros_publishers_.push_back(std::move(ros_publisher_3));
292 auto func = [
this, ros_publisher_0, ros_publisher_1, ros_publisher_2,
293 ros_publisher_3](const std::shared_ptr<InType0> in) {
294#else
295 auto func = [
this](
const std::shared_ptr<InType0> in) {
296#endif
297 auto out_0 = std::make_shared<OutType0>();
298 auto out_1 = std::make_shared<OutType1>();
299 auto out_2 = std::make_shared<OutType2>();
300 auto out_3 = std::make_shared<OutType3>();
301 auto in_container =
302 InputTypes<std::shared_ptr<InType0>>{std::make_tuple(in)};
303 auto out_container =
304 OutputTypes<std::shared_ptr<OutType0>, std::shared_ptr<OutType1>,
305 std::shared_ptr<OutType2>, std::shared_ptr<OutType3>>{
306 std::make_tuple(out_0, out_1, out_2, out_3)};
307 this->
ConvertMsg(in_container, out_container);
308#ifdef RCLCPP__RCLCPP_HPP_
309 ros_publisher_0->publish(*out_0);
310 ros_publisher_1->publish(*out_1);
311 ros_publisher_2->publish(*out_2);
312 ros_publisher_3->publish(*out_2);
313#endif
314 };
315 auto apollo_reader_0 =
316 cyber_node_->template CreateReader<InType0>(reader_cfg_0, func);
318
319 return true;
320}
std::atomic< bool > init_
std::unique_ptr< apollo::cyber::Node > cyber_node_
std::vector< std::shared_ptr< apollo::cyber::ReaderBase > > apollo_readers_
ConverterConf converter_conf_
bool LoadConfig(ConverterConf *config)
optional string ros_topic_name_3
optional string ros_topic_name_2
optional string apollo_channel_name_0
optional string ros_topic_name_0
optional string ros_topic_name_1