Ask Your Question
3

actionlib tutorial errors

asked 2012-06-13 09:33:20 -0500

updated 2012-06-17 04:48:30 -0500

jbohren gravatar image

Hi! I'm new to ROS and I've been having some trouble getting started with the actionlib tutorial under Fuerte and Xubuntu 12.04.

I'm following the steps to create a Simple Action Server. In step 1.1, I used the following command to define the Fibonacci action, and then used the following command to generate the message files:

$ rosrun actionlib_msgs genaction.py . Fibonacci.action

This didn't work at first, and I needed to follow the guidance in another ROS answers topic to continue. The code that worked was as follows:

$ rosrun actionlib_msgs genaction.py -o msg/ action/Fibonacci.action

I followed the steps to edit CMakeLists.txt, created fibonacci_server.cpp, and copied the code given by the tutorial. If I make the project (with rosmake), though, the build fails with the follow error.

  Scanning dependencies of target fibonacci_server
  make[3]: Leaving directory `/home/will/ros_workspace/tutorials/learning_actionlib/build'
  make[3]: Entering directory `/home/will/ros_workspace/tutorials/learning_actionlib/build'
  [100%] Building CXX object CMakeFiles/fibonacci_server.dir/src/fibonacci_server.o
  Linking CXX executable ../bin/fibonacci_server
  /usr/bin/ld: CMakeFiles/fibonacci_server.dir/src/fibonacci_server.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/lib64/libboost_thread.so.1.46.1 so try adding it to the linker command line
  /usr/lib64/libboost_thread.so.1.46.1: could not read symbols: Invalid operation
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/fibonacci_server] Error 1
  make[3]: Leaving directory `/home/will/ros_workspace/tutorials/learning_actionlib/build'
  make[2]: *** [CMakeFiles/fibonacci_server.dir/all] Error 2
  make[2]: Leaving directory `/home/will/ros_workspace/tutorials/learning_actionlib/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/will/ros_workspace/tutorials/learning_actionlib/build'

Any assistance would be greatly appreciated. Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2012-06-16 13:07:57 -0500

joq gravatar image

updated 2012-06-20 03:52:00 -0500

You need this in your CMakeLists.txt:

rosbuild_add_boost_directories()
rosbuild_add_executable(fibonacci_server src/fibonacci_server.cpp)
rosbuild_link_boost(fibonacci_server thread)

This changed in Fuerte. The tutorial explains it correctly, but you need to click on the fuerte button at the top of the page to see the new CMakeLists.txt update.

edit flag offensive delete link more

Comments

If this answer is correct, please mark it so we know to update that Tutorial.

joq gravatar image joq  ( 2012-06-17 05:04:09 -0500 )edit

Works like a charm; thank you very much!

willshepherdson gravatar image willshepherdson  ( 2012-06-18 04:39:09 -0500 )edit

That Tutorial is already correct if you select Fuerte up at the top of the page. Unfortunately, the default version is Electric.

joq gravatar image joq  ( 2012-06-18 15:30:47 -0500 )edit
2

Jack, I actually added the distro switch and the doc update after you answered the question. (:

jbohren gravatar image jbohren  ( 2012-06-20 04:22:44 -0500 )edit
1

Ah, good job. Thanks! There is an open defect ticket to change the Version() default to Fuerte.

joq gravatar image joq  ( 2012-06-20 04:26:40 -0500 )edit

Where is that ticket? (Never mind, found it: https://code.ros.org/trac/ros/ticket/3967 )

jbohren gravatar image jbohren  ( 2012-06-20 05:18:35 -0500 )edit
0

answered 2012-08-27 11:09:02 -0500

jy gravatar image

This page (http://www.ros.org/wiki/pr2_controllers/Tutorials/Moving%20the%20Head) also needs to be updated then to reflect the fuerte changes.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-13 09:33:20 -0500

Seen: 1,231 times

Last updated: Aug 27 '12