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 4:
Why did you link to the original sbpl repository then in your question?
That was my mistake, sorry about that! I am using tu-darmstadt-ros-pkg fork.
The output of pkg-config --libs --cflags sbpl
:
-I/usr/local/include -L/usr/local/lib -lsbpl
and the output of PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH pkg-config --libs --cflags sbpl
:
-I/usr/local/include -L/usr/local/lib -lsbpl
And this is with the tu-darmstadt-ros-pkg fork?
Yes.. this is with the tu-darmstadt-ros-pkg
fork!
Can you make sure those two lines (with find_library(..)) are present in the CMakeLists.txt of your sbpl_lattice_planner?
and yes, CMakeLists.txt
of sbpl_lattice_planner
has following lines:
find_library(SBPL_LIBRARY NAMES sbpl PATHS ${SBPL_LIBRARY_DIRS} NO_DEFAULT_PATH)
set(SBPL_LIBRARIES ${SBPL_LIBRARY})
and the output after adding message("SBPL_LIBRARIES: ${SBPL_LIBRARIES}")
is:
SBPL_LIBRARIES: /opt/ros/indigo/lib/libsbpl.so
Any help will be appreciated.
Thanks in advance.
Naman Kumar
Originally posted by Naman on ROS Answers with karma: 1464 on 2015-09-08
Post score: 3