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

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, andhttp://www.ros.org/wiki/navigation/Tutorials/SendingSimpleGoals 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/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`

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)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# 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)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#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

Comments

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
0

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_add_boost_directories()
rosbuild_link_boost(${PROJECT_NAME} thread)
edit flag offensive delete link more

Comments

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
0

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

prince gravatar image

According to http://ros.org/reps/rep-0003.html#fuerte-turtle-mar-2012, Boost 1.40 is targetted released to be used. According to http://www.boost.org/doc/libs/1_46_0/doc/html/thread/changes.html 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

Comments

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

Stats

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

Seen: 1,177 times

Last updated: Jul 25 '12