simple navigation goals fails compile, boost link error
Using Ubuntu 12.04, Fuerte, I am following the tutorial to develop simple goals: SendingSimpleGoals
However, the code from the page fails to link, with this message:
Linking CXX executable ../bin/simple_navigation_goals /usr/bin/ld: CMakeFiles/simple_navigation_goals.dir/src/simple_navigation_goals.o: undefined reference to symbol 'vtable for boost::detail::thread_data_base' /usr/bin/ld: note: 'vtable for boost::detail::thread_data_base' is defined in DSO /usr/lib/libboost_thread.so.1.46.1 so try adding it to the linker command line /usr/lib/libboost_thread.so.1.46.1: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[3]: * [../bin/simple_navigation_goals] Error 1
I assume I need to list that libboost thread for linking with CMakelists.txt. The file /usr/lib/libboost_thread.so.1.46.1 does exist in the file system.
So, in CMakelists.txt, I uncommented: rosbuild_add_boost_directories()
and uncommented the rosbuild_link_boost line, as follows:
rosbuild_link_boost(simple_navigation_goals /usr/lib/libboost_thread.so.1.46.1)
but that just generates an error that the library /usr/lib/libboost_thread.so.1.46.1 is not found:
rosboost_cfg.rosboost_cfg.BoostError: "Could not locate library [/usr/lib/libboost_thread.so.1.46.1], version (1, 46, 1, '/usr', '/usr/include', True, True) in lib directory [/usr/lib]"
Help would be very much appreciated-- thanks.
@dan did you manage to make the tutorial work? ive having trouble cancelling a goal any idea hos to accomplish this? thanks
Yes, I did get the tutorial to work with jbarry's answer. There is cancel_goal() in move_base action client For example: self.move_base.cancel_goal()
@dan thanks i made it work, i have one more question is there a simple way to know where the robot it located in a certain time? right now i need the robot to get to (x,y) but at a certain time i need to make the robot stop wait and then send him towards the goal again, but as the robot moved the new goal i have to send depends on how far he moved before stoping, how can i acomplish this?