ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

navigation_stack send goal

asked 2012-07-23 23:17:54 -0500

pkohout gravatar image

updated 2012-07-24 23:17:56 -0500

hi, i try to move my robot in gazebo via the navigation stack. but i have no idea how to send goals to him, and does not work, there comes just a compiler error

`/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/ so try adding it to the linker command line
  /usr/lib/ could not read symbols: Invalid operation
  collect2: ld returned 1 exit status`

are there some other easy examples or have you one ? it can also be in python.Or you can help me solve the compiler error (:

    cmake_minimum_required(VERSION 2.4.6)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)


#set the default path for built executables to the "bin" directory
#set the default path for built libraries to the "lib" directory

#uncomment if you have defined messages
#uncomment if you have defined services

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
rosbuild_add_executable(simple_navigation_goals src/simple_navigation_goals.cpp)
edit retag flag offensive close merge delete


Check your boost version to be sure that you have thread_data_base included.

Erwan R. gravatar image Erwan R.  ( 2012-07-24 00:26:19 -0500 )edit

i have boost 1.46.1 and i have libboos-thread1.46.1 in /var/lib/dpkg/info.... where shuld be the thread_data_base ?

pkohout gravatar image pkohout  ( 2012-07-24 01:48:57 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-07-25 00:43:25 -0500

Lorenz gravatar image

The error message you get says that you should try adding boost to your linker command. Try that. Just uncomment the two boost related lines in your CMakeLists.txt, i.e. add the following:

rosbuild_link_boost(${PROJECT_NAME} thread)
edit flag offensive delete link more


the old error is gone but i get another, it is: Cannot specify link libraries for target "simple_navigation_goals" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:28 (rosbuild_link_boost) -- Configuring incomplete, errors occurred! any ideas ?

pkohout gravatar image pkohout  ( 2012-07-25 01:29:59 -0500 )edit

@coon you should ask this as a separate question.

tfoote gravatar image tfoote  ( 2012-08-08 16:13:33 -0500 )edit

@coon you need to put the line rosbuild_link_boost(${PROJECT_NAME} thread) under the line rosbuild_add_executable()

yangyangcv gravatar image yangyangcv  ( 2012-10-08 14:00:08 -0500 )edit

answered 2012-07-24 00:27:57 -0500

prince gravatar image

According to, Boost 1.40 is targetted released to be used. According to there are some changes in thread library. I believe you are using much newer version of Boost i.e. 1.46 which is causing the linker error problem. Is it possible to safe downgrade to Boost version 1.40?

edit flag offensive delete link more


That's not true. On Oneiric, ROS uses boost 1.46, on Precise even 1.48 I think. Explicitly downgrading to 1.40 in Ubuntu is probably either impossible or breaks the whole system.

Lorenz gravatar image Lorenz  ( 2012-07-24 01:20:56 -0500 )edit

yes it true... i have boost 1.46 and use ubuntu 11.10 oneiric, was my fault that i havent written it above. and yes if i wanna remove boost 1.46 many (nearly) all ros parts need to be removed becouse they need boost :/

pkohout gravatar image pkohout  ( 2012-07-24 01:37:29 -0500 )edit

ROS uses boost 1.46.1 on Oneiric. Without that, you won't be able to install or use the ROS binary packages.

joq gravatar image joq  ( 2012-07-24 03:36:26 -0500 )edit

Right. Sorry. Typo :)

Lorenz gravatar image Lorenz  ( 2012-07-24 03:42:57 -0500 )edit

so should i update boost or reinstall it ??

pkohout gravatar image pkohout  ( 2012-07-24 03:48:00 -0500 )edit

I was not aware of this. Thanks for the info and I appologize to coon for bringing in confusion.

prince gravatar image prince  ( 2012-07-24 18:00:38 -0500 )edit

@coon: no, you should not update boost. I guess the problem lies somewhere else. Maybe a conflict between 32 and 64 bit. How does your CMakeLists.txt look like? Maybe a missing boost flag?

Lorenz gravatar image Lorenz  ( 2012-07-24 22:43:55 -0500 )edit

ok, i use Ubunut 11.10 32bit, my CMakeList.txt:

pkohout gravatar image pkohout  ( 2012-07-24 23:10:04 -0500 )edit

Question Tools


Asked: 2012-07-23 23:17:54 -0500

Seen: 1,171 times

Last updated: Jul 25 '12