Robotics StackExchange | Archived questions

Error calling ros::ServiceClient on move_base global planner

I am trying to edit the default global planner of movebase to call a service inside the makePlan function every time it wants to get a new path but when I try to run catkinmake 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/1dbxhiYQ-ClI4Z3xmmbcClocT8g453T_b/view?usp=sharing

This is the error that I get:

In file included from /opt/ros/noetic/include/ros/serviceclient.h:33, from /opt/ros/noetic/include/ros/nodehandle.h:35, from /opt/ros/noetic/include/ros/ros.h:45, from /home/jtavares/catkinws/src/globalplanner/include/globalplanner/plannercore.h:41, from /home/jtavares/catkinws/src/globalplanner/src/plannercore.cpp:38: /opt/ros/noetic/include/ros/servicetraits.h: In instantiation of ‘static const char* ros::servicetraits::MD5Sum::value() [with M = navmsgs::Pathstd::allocator<void >]’: /opt/ros/noetic/include/ros/servicetraits.h:79:102: required from ‘const char* ros::servicetraits::md5sum() [with M = navmsgs::Pathstd::allocator<void >]’ /opt/ros/noetic/include/ros/serviceclientoptions.h:95:33: required from ‘void ros::ServiceClientOptions::init(const string&, bool, const Mstring&) [with Service = navmsgs::Pathstd::allocator<void >; std::string = std::cxx11::basicstring; ros::Mstring = std::map<std::cxx11::basicstring, std::cxx11::basicstring >]’ /opt/ros/noetic/include/ros/nodehandle.h:1264:5: required from ‘ros::ServiceClient ros::NodeHandle::serviceClient(const string&, bool, const Mstring&) [with Service = navmsgs::Pathstd::allocator<void >; std::string = std::cxx11::basicstring; ros::Mstring = std::map<std::cxx11::basicstring, std::cxx11::basicstring >]’ /home/jtavares/catkinws/src/globalplanner/src/plannercore.cpp:364:91: required from here /opt/ros/noetic/include/ros/servicetraits.h:47:34: error: ‘sgetServerMD5Sum’ is not a member of ‘navmsgs::Path_std::allocator<void >’ 47 | return M::sgetServerMD5Sum().cstr(); | ~~~~~~~~~~~~~~~~~~~~~~^~ make[2]: *** [globalplanner/CMakeFiles/globalplanner.dir/build.make:141: globalplanner/CMakeFiles/globalplanner.dir/src/plannercore.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:4516: globalplanner/CMakeFiles/global_planner.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j4 -l4" failed

Asked by jncat on 2022-06-29 16:31:55 UTC

Comments

Answers