tier4 / AutowareArchitectureProposal.proj

This is the source code of the feasibility study for Autoware architecture proposal.
Apache License 2.0
656 stars 238 forks source link

[ROS2] topic_tools Building Error #210

Closed mfapakhan closed 2 years ago

mfapakhan commented 3 years ago

Hi everyone;

I cloned ROS2 branch of this repo. And, I have started to build this repo with colcon. While building the topic_tools package, I got some errors.

Errors and the reasons of these errors are:

Error 1: fatal error: rclcpp/generic_subscription.hpp: No such file or directory Reason 1: The guide for installing ros2 branch of this repo says that the PC have Foxy distro for ROS2. And at this distro, the RCLCPP packages does not have generic_subscription.hpp. I have viewed the repo for foxy branch via https://github.com/ros2/rclcpp/tree/foxy and saw that this repo does not include the generic_subscription.hpp. Solution 1: I changed the code line from rclcpp/generic_subscription.hpp to rclcpp_generic/generic_subscription.hpp. It solves the error.

Error 2: fatal error: rclcpp/generic_publisher.hpp: No such file or directory Reason 2: The guide for installing ros2 branch of this repo says that the PC must have Foxy distro for ROS2. And at this distro, the RCLCPP packages does not have generic_subscription.hpp. I have viewed the repo for foxy branch via https://github.com/ros2/rclcpp/tree/foxy and saw that this repo does not include the generic_publisher.hpp. Solution 2: I changed the code line from rclcpp/generic_publisher.hpp to rclcpp_generic/generic_publisher.hpp. It solves the error.

I solved this errors. But, I cannot solve the Error 3.

Error 3: error: no matching function for call to ‘topic_tools::RelayNode::declare_parameter<std::string>(const char [5])’ Reason 3: The declare_parameter is declared in rclcpp package and according to the its declaration, it expects 4 arguments. But, it gets 1 arguments in the usage at RelayNode.cpp: auto output_topic = declare_parameter<std::string>("output_topic");

I cannot solve this error. How do I change this code?

kenji-miyake commented 2 years ago

Thank you for your contributions/questions. I'll close this according to our contribution guidelines.

Now we only support ROS2 Galactic, please use it. Please check out the latest code in main branch.