Automatic installation of rosbridge_library
Hi,
I'm working on a ROS Package that includes various dependencies, including Python libraries like ws4py and bson, as well as the ROS Package rosbridge_library. I've managed to configure CMakeLists.txt and package.xml to install the Python dependencies no problem, but for the life of me I can't get catkin_make to install rosbridge_library.
If I manually install the dependency with
sudo apt-get install ros-indigo-rosbridge-server
then catkin_make, my code works fine. If not, I get:
CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "rosbridge_library"
with any of the following names:
rosbridge_libraryConfig.cmake
rosbridge_library-config.cmake
Add the installation prefix of "rosbridge_library" to CMAKE_PREFIX_PATH or
set "rosbridge_library_DIR" to a directory containing one of the above
files. If "rosbridge_library" provides a separate development package or
SDK, be sure it has been installed.
But I was under the impression that if I defined the dependency correctly then catkin_make should automatically download and install rosbridge_library without me having to do it manually. Now I'm starting to doubt it! Am I correct?
I'm using CircleCI to build on a new machine every time. Here is the exact sequence that I run:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
sudo apt-get update
sudo apt-get install ros-indigo-ros-base
sudo rosdep init
rosdep update
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src && catkin_init_workspace
mkdir -p ~/catkin_ws/src/luxagent && cp -r ~/luxagent/* ~/catkin_ws/src/luxagent
pip install 'gevent==1.0.2'
echo "export PYTHONPATH=/usr/lib/python2.7/dist-packages:${PYTHONPATH}" >> ~/.bashrc
cd ~/catkin_ws/ && catkin_make
If after, the first block of commands I run
sudo apt-get install ros-indigo-rosbridge-server
then it all works fine.
Here are the relevant lines in package.xml:
<build_depend>python-catkin-pkg</build_depend>
<build_depend>rosgraph</build_depend>
<build_depend>rospy</build_depend>
<build_depend>python-gevent</build_depend>
<build_depend>python-ws4py-pip</build_depend>
<build_depend>rosbridge_library</build_depend>
<run_depend>python-catkin-pkg</run_depend>
<run_depend>rosgraph</run_depend>
<run_depend>rospy</run_depend>
<run_depend>python-gevent</run_depend>
<run_depend>python-ws4py-pip</run_depend>
<run_depend>python-bson</run_depend>
<run_depend>rosbridge_library</run_depend>
Here are the relevant lines in CMakeLists.txt:
find_package(catkin REQUIRED COMPONENTS
rosbridge_library
rosgraph
raspy
)
and
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES luxagent
CATKIN_DEPENDS rosgraph rospy rosbridge_library
# DEPENDS system_lib
)
I've tried substituting rosbridge_suite for rosbridge_library but the effect is the same. I would love to make the installation of this library automatic for the end user.
Any suggestions appreciated!
Thanks
Simon