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

problem installing sbpl from source in ROS Indigo

asked 2015-09-08 09:41:07 -0500

Naman gravatar image

updated 2015-09-08 14:24:00 -0500

Hi all,

I am trying to install sbpl from source because I have to make some changes to the CMakeLists.txt file so that it works on my ARM Processor Single board computer (see this). While installing sbpl from source, I ran following commands (from catkin_ws/src/) :

git clone https://github.com/sbpl/sbpl.git   
cd sbpl   
mkdir build   
cd build   
cmake ..   
make   
sudo make install

All the commands ran successfully but when I do roscd sbpl after it, the output is : roscd: No such package/stack 'sbpl'.

Update:
Also, I tried installing and using SBPL as a ROS package but that does not seem to be working:

git clone https://github.com/sbpl/sbpl.git  
rosmake sbpl # sbpl is in my ROS_PACKAGE_PATH

but I get the following output:

[ rosmake ] rosmake starting...                                                 
[ rosmake ] Packages requested are: ['sbpl']                                    
[ rosmake ] Logging to directory /home/naman/.ros/rosmake/rosmake_output-20150908-105307
[ rosmake ] Expanded args ['sbpl'] to:
[]                                       
[ rosmake ] WARNING: The following args could not be parsed as stacks or packages: ['sbpl']
[ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.

Does anyone have any idea why is it still not able to find sbpl and what am I doing wrong?

Update 2:
So, I tried installing sbpl as a CMake Package (as mentioned above) and tried using it as a system dependency as suggested in the answer. When I do catkin_make in catkin_ws/ to build the sbpl_lattice_planner, I get the following error:

[ 97%] make[2]: *** No rule to make target `/opt/ros/indigo/lib/libsbpl.so', needed by `/home/naman/catkin_ws/devel/lib/libsbpl_lattice_planner.so'.  Stop.
make[1]: *** [dr_sbpl_planner/sbpl_lattice_planner/CMakeFiles/sbpl_lattice_planner.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

It looks like sbpl_lattice_planner is not able to find the necessary sbpl library and is throwing an error and hence its not able to run.

Update 3:
@gvdhoorn: I am using the fork you mentioned. My PKG_CONFIG_PATH is:

/home/naman/catkin_ws/devel/lib/pkgconfig:/home/naman/catkin_ws/devel/lib/x86_64-linux gnu/pkgconfig:/opt/ros/indigo/lib/x86_64-linux-gnu/pkgconfig:/opt/ros/indigo/lib/pkgconfig

Therefore, sbpl_lattice_planner looks for libsbpl.so in /opt/ros/indigo/lib and is not able to find it. Once, I build sbpl as mentioned above, it installs libsbpl.so in /usr/local/lib and sbpl.pc in /usr/local/lib/pkgconfig but its not in the PKG_CONFIG_PATH and therefore its not able to find the required files BUT even if I add /usr/local/lib/pkgconfig to PKG_CONFIG_PATH, it still looks for the file in /opt/ros/indigo/lib and hence gives the same error as mentioned above which is really confusing for me.

Just to check, I also tried copying libsbpl.so and sbpl.pc to /home/naman/catkin_ws/devel/lib/ and /home/naman/catkin_ws/devel/lib/pkgconfig respectively but again it always looks at /opt/ros/indigo/lib and throws an error.

And yeah, If I copy files to /opt/ros/indigo/lib and /opt/ros/indigo/lib/pkgconfig, it works without any error!

Update ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-09-08 09:47:24 -0500

gvdhoorn gravatar image

updated 2015-09-08 15:44:18 -0500

All the commands ran successfully but when I do roscd sbpl after it, the output is : roscd: No such package/stack 'sbpl' . Does anyone have any idea why is it still not able to find sbpl and what am I doing wrong?

Judging by the contents of the repository you linked, I'd say SBPL is not a catkin/rosbuild package, but a regular CMake package. The way you built and installed it also seems to point in that direction.

As such, you cannot roscd to it, as that only works with ROS packages.


Edit:

Also, I tried installing and using SBPL as a ROS package but that does not seem to be working

[..]

Does anyone have any idea why is it still not able to find sbpl and what am I doing wrong?

Yes: SBPL is still not a ROS package. You adding it to your ROS_PACKAGE_PATH and trying to build it using rosmake does not change that.

Afaict, SBPL is not meant to be a ROS package. It's used as a system dependency (see CMakeLists.txt - lines 13 to 15 of sbpl_lattice_planner).


Edit 2:

It looks like sbpl_lattice_planner is not able to find the necessary sbpl library and is throwing an error and hence its not able to run.

I'm pretty certain it should've worked after you sudo make installed your version of SBPL and then tried to build sbpl_lattice_planner from source (PkgConfig should've picked up your customised version, if you got the PKG_CONFIG_PATH setup correctly).

But looking at one of the forks (the tu-darmstadt-ros-pkg one) recommended to you in your other question about sbpl_lattice_planner, it could also be that CMake needs a little help determining the correct path to libsbpl.so (from here):

[..]
find_library(SBPL_LIBRARY NAMES sbpl PATHS ${SBPL_LIBRARY_DIRS} NO_DEFAULT_PATH)
set(SBPL_LIBRARIES ${SBPL_LIBRARY})
[..]

This snippet adds the full path to libsbpl.so, which then gets linked later on. Any reason you are not using this fork?

Btw: the error is not 'thrown' by sbpl_lattice_planner, but is reported by make. It just can't resolve the dependency on libsbpl.so needed for the sbpl_lattice_planner target.


Edit 3:

@gvdhoorn: I am using the fork you mentioned.

That would've nice to know before we started all this. Why did you link to the original sbpl repository then in your question?

My PKG_CONFIG_PATH is:

/home/naman/catkin_ws/devel/lib/pkgconfig:/home/naman/catkin_ws/devel/lib/x86_64-linux gnu/pkgconfig:/opt/ros/indigo/lib/x86_64-linux-gnu/pkgconfig:/opt/ros/indigo/lib/pkgconfig

Therefore, sbpl_lattice_planner looks for libsbpl.so in /opt/ros/indigo/lib and is not able to find it.

No. make can't find the library, sbpl_lattice_planner has not even been built yet. It is not involved here at all.

Please add the output of pkg-config --libs --cflags sbpl and PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH pkg-config --libs --cflags sbpl to your question. Both times after you've sourced your workspace.

Once, I build sbpl as mentioned above, it installs libsbpl.so in /usr/local/lib and ...

(more)
edit flag offensive delete link more

Comments

Thanks for the answer @gvdhoorn! I have updated my original question where I tried installing SBPL as a ROS Package.

Naman gravatar image Naman  ( 2015-09-08 09:57:08 -0500 )edit

@gvdhoorn! Yeah.. When I removed the build and the devel folder from my workspace and built all the packages including sbpl again, everything seems to be working. Thanks a lot! :)

Naman gravatar image Naman  ( 2015-09-23 07:50:48 -0500 )edit

Hello Sir, Installed sbpl at /usr/local I did the following : export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

I get the following error on $roslaunch sbpl_lattice_planner move_base_sbpl_fake_localization_2.5cm.launch ResourceNotFound : sbpl

non-conventional_stuff gravatar image non-conventional_stuff  ( 2016-09-02 09:00:01 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-09-08 09:41:07 -0500

Seen: 767 times

Last updated: Sep 08 '15