Error calling ros::ServiceClient on move_base global planner

asked 2022-06-29 16:31:55 -0500

jncat gravatar image

I am trying to edit the default global planner of move_base to call a service inside the makePlan function every time it wants to get a new path but when I try to run catkin_make I get an error. Can anyone help me?

I´m using ros noetic.

Here is the code. The function that I am editing starts in line 242.

https://drive.google.com/file/d/1dbxh...

This is the error that I get:

In file included from /opt/ros/noetic/include/ros/service_client.h:33, from /opt/ros/noetic/include/ros/node_handle.h:35, from /opt/ros/noetic/include/ros/ros.h:45, from /home/jtavares/catkin_ws/src/global_planner/include/global_planner/planner_core.h:41, from /home/jtavares/catkin_ws/src/global_planner/src/planner_core.cpp:38: /opt/ros/noetic/include/ros/service_traits.h: In instantiation of ‘static const char* ros::service_traits::MD5Sum<m>::value() [with M = nav_msgs::Path_<std::allocator<void> >]’: /opt/ros/noetic/include/ros/service_traits.h:79:102: required from ‘const char* ros::service_traits::md5sum() [with M = nav_msgs::Path_<std::allocator<void> >]’ /opt/ros/noetic/include/ros/service_client_options.h:95:33: required from ‘void ros::ServiceClientOptions::init(const string&, bool, const M_string&) [with Service = nav_msgs::Path_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; ros::M_string = std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >]’ /opt/ros/noetic/include/ros/node_handle.h:1264:5: required from ‘ros::ServiceClient ros::NodeHandle::serviceClient(const string&, bool, const M_string&) [with Service = nav_msgs::Path_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; ros::M_string = std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >]’ /home/jtavares/catkin_ws/src/global_planner/src/planner_core.cpp:364:91: required from here /opt/ros/noetic/include/ros/service_traits.h:47:34: error: ‘__s_getServerMD5Sum’ is not a member of ‘nav_msgs::Path_<std::allocator<void> >’ 47 | return M::__s_getServerMD5Sum().c_str(); | ~~~~~~~~~~~~~~~~~~~~~~^~ make[2]: * [global_planner/CMakeFiles/global_planner.dir/build.make:141: global_planner/CMakeFiles/global_planner.dir/src/planner_core.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:4516: global_planner/CMakeFiles/global_planner.dir/all] Error 2 make: ** [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed

edit retag flag offensive close merge delete