Compiling ROS development files from source
I followed the source-based install documentation for ROS Hydro to compile ros_comm
. It seems as if the the .rosinstall
file lists stable released versions of packages from https://github.com/ros-gbp/ros_comm-release.git . However the development files for ros_comm
is being hosted here: https://github.com/ros/ros_comm .
My ultimate goal is to compile roscpp
from source in a catkin workspace so every package in that workspace is built against the local [and patched] version of roscpp
. I also want to be able to merge upstream changes when there is an update available. I tried to clone ros_comm
from github (the development repo) and make it, but it failed because of unmet dependencies (check the update below).
My questions is: What is the workflow to compile (and install) ROS core components in general (or roscpp
in specific) from development repositories.
UPDATE 1
As @dirk mentioned, the current hydro-devel
branch for ros_comm
is unstable. That was the reason that building sources from github did not work. This is what I've done to overlay the latest stable version of roscpp
in a catkin workspace based on @dirk and @demmeln answers.
mkdir roscppsrc_ws && cd roscppsrc_ws
roslocate info roscpp > roscpp-stable.rosinstall
# As the `hydro-devel` branch is unstable edit the `roscpp-stable.rosinstall` file
# and change version from `hydro-devel` to latest stable (e.g `1.9.50`)
wstool init src roscpp-stable.rosinstall
rosdep install --from-paths src --rosdistro hydro
# Above did nothing on my computer with `ros-hydro-desktop` installed
source /opt/ros/hydro/setup.bash # Not an isolated build
catkin_make
To test the overlay I copied the talker.cpp
and listener.cpp
from roscpp_tutorials
in a new package in src/sample
of the same workspace. After a catkin_make
I can confirm than the executables are linked against the local versions of roscpp
:
ldd ./devel/lib/sample/talker | grep roscpp
libroscpp.so => /home/mani/roscppsrc_ws/devel/lib/libroscpp.so (0x00007fc47ab80000)
Just ot mention this in case you get strange behaviour/segfaults: In your described setup you might run intro trouble when the package you build ontop of your modified roscpp is linking also against a library from the Debian packages, which itself is linked against the Debian version of roscpp.