tomasvr / turtlebot3_drlnav

A ROS2-based framework for TurtleBot3 DRL autonomous navigation
128 stars 18 forks source link

fake node is not debuged with colcon build #7

Open oscar2396 opened 9 months ago

oscar2396 commented 9 months ago

hello nice job i am trying to run your project but i am using ROS2 Humble i set up all parameters but when i am trying to debug with colcon build i have this error:

turtlebot3_fake_node
/home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp: In member function ‘void Turtlebot3Fake::init_parameters()’: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:75:26: error: no matching function for call to ‘Turtlebot3Fake::declare_parameter(const char [19])’ 75 | this->declare_parameter("joint_states_frame"); | ~~~~~^~~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’ 421 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:75:26: note: candidate expects 4 arguments, 1 provided 75 | this->declare_parameter("joint_states_frame"); | ~~~~~^~~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’ 434 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:75:26: note: couldn’t deduce template parameter ‘ParameterT’ 75 | this->declare_parameter("joint_states_frame"); | ~~~~~^~~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’ 366 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’ 391 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:76:26: error: no matching function for call to ‘Turtlebot3Fake::declare_parameter(const char [11])’ 76 | this->declare_parameter("odom_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’ 421 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:76:26: note: candidate expects 4 arguments, 1 provided 76 | this->declare_parameter("odom_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’ 434 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:76:26: note: couldn’t deduce template parameter ‘ParameterT’ 76 | this->declare_parameter("odom_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’ 366 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’ 391 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:77:26: error: no matching function for call to ‘Turtlebot3Fake::declare_parameter(const char [11])’ 77 | this->declare_parameter("base_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’ 421 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:77:26: note: candidate expects 4 arguments, 1 provided 77 | this->declare_parameter("base_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’ 434 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:77:26: note: couldn’t deduce template parameter ‘ParameterT’ 77 | this->declare_parameter("base_frame"); | ~~~~~^~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’ 366 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’ 391 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:78:26: error: no matching function for call to ‘Turtlebot3Fake::declare_parameter(const char [18])’ 78 | this->declare_parameter("wheels.separation"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’ 421 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:78:26: note: candidate expects 4 arguments, 1 provided 78 | this->declare_parameter("wheels.separation"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’ 434 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:78:26: note: couldn’t deduce template parameter ‘ParameterT’ 78 | this->declare_parameter("wheels.separation"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’ 366 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’ 391 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:79:26: error: no matching function for call to ‘Turtlebot3Fake::declare_parameter(const char [14])’ 79 | this->declare_parameter("wheels.radius"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’ 421 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:79:26: note: candidate expects 4 arguments, 1 provided 79 | this->declare_parameter("wheels.radius"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’ 434 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed: /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:79:26: note: couldn’t deduce template parameter ‘ParameterT’ 79 | this->declare_parameter("wheels.radius"); | ~~~~~^~~~~~~ In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28, from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22, from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/include/turtlebot3_fake_node/turtlebot3_fake_node.hpp:21, from /home/humble/turtlebot3_drlnav/src/turtlebot3_simulations/turtlebot3_fake_node/src/turtlebot3_fake_node.cpp:17: /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’ 366 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’ 391 | declare_parameter( | ^~~~~ /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided gmake[2]: [CMakeFiles/turtlebot3_fake_node.dir/build.make:76: CMakeFiles/turtlebot3_fake_node.dir/src/turtlebot3_fake_node.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:137: CMakeFiles/turtlebot3_fake_node.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2

Could you help me to solve...

Persius48 commented 9 months ago

Hey, I am also facing the same problem, did you find any solution?

Persius48 commented 9 months ago

Hey, I found the solution. Just delete the turtlebot3_fake package from this repository and install it with sudo apt-get ros-<distribution>-turtlebot3-fake-node and then perform the colcon build.