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

Does ROS include the boost libraries?

asked 2013-09-18 11:51:39 -0500

WG- gravatar image

I want to use the boost uBLAS library which contains functions for matrices. Now my question is does ROS include the boost libraries?

If yes why do I get the error displayed below? I checked out http://wiki.ros.org/rosbuild/CMakeLists/Examples#Using_Boost and believe I do everything correct. I am only including the header files at the moment.

If no where do I have to extract the boost package (the .tar file) which one can download from the boost website, http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html? When I look to the last line of the error I see that I should have unpacked them in either /usr /usr/include/ or /usr/lib?

Error

CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:892 (message): [rosboost-cfg --libs uBLAS] failed with error: Traceback (most recent call last):

  File "/opt/ros/fuerte/bin/rosboost-cfg",

line 35, in <module> rosboost_cfg.main() File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 359, in main output = lflags(ver, options.lflags.split(',')) File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 278, in lflags s += lib_flags(ver, lib) + " " File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 268, in lib_flags lib = find_lib(ver, name) File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 249, in find_lib raise BoostError('Could not locate library [%s], version %s in lib directory [%s]'%(name, ver, dir))

rosboost_cfg.rosboost_cfg.BoostError:

"Could not locate library [uBLAS], version (1, 46, 1, '/usr', '/usr/include', True, True) in lib directory [/usr/lib]" Call Stack (most recent call first): CMakeLists.txt:26 (rosbuild_link_boost)

Source

// Include boost libs                                                           
#include <boost/numeric/ublas/matrix.hpp>                                       
#include <boost/numeric/ublas/io.hpp>

CMakelist.txt

rosbuild_add_boost_directories()                                                
rosbuild_link_boost(wallDetector uBLAS)                                         
rosbuild_add_executable(wallDetector src/wallDetector.cpp)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-09-20 02:29:50 -0500

WG- gravatar image

updated 2013-09-20 03:22:42 -0500

Okay most I found out that most linux systems include several pre-built boost libraries. I also found out that most of the boost libraries actually don't have to be built separately since they only exists out of header files. So what I did was just Downloaded the boost libraries from the website. Extracted the folder /usr/local. Then I just ran bootstrap.sh and I could include the header files in my own C++ files and compile.

For more info: http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-18 11:51:39 -0500

Seen: 3,253 times

Last updated: Sep 20 '13