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?
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 viahttps://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 fromrclcpp/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 viahttps://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 fromrclcpp/generic_publisher.hpp
torclcpp_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?