Note: This tutorial assumes that you have completed the previous tutorials: Building and using catkin packages in a workspace.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Building both librealsense and RealSense Camera from Sources

Description: Instructions for building both librealsense AND realsense_camera package from source files in the same workspace.

Keywords: realsense, librealsense, build, source, sources

Tutorial Level: ADVANCED

Cloning sources into catkin Workspace

# Create the catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src

# Download the source files
git clone https://github.com/intel-ros/realsense.git
git clone https://github.com/IntelRealSense/librealsense.git

# Checkout the latest stable code
cd ~/catkin_ws/src/realsense
git checkout -b stable-branch stable

cd ~/catkin_ws/src/librealsense
git checkout -b stable-branch stable

Install Dependencies

# Update the dependencies database
rosdep update

# Attempt to install dependencies
# Requires that your login has sudo privileges to instal as root using apt-get
cd ~/catkin_ws
rosdep -y install --from-paths src --ignore-src

Build the Packages

Build librealsense FIRST

cd ~/catkin_ws
catkin_make --pkg librealsense

Build realsense_camera second

cd ~/catkin_ws

# Remove any existing realsense_camera binaries
catkin_make clean --pkg realsense_camera

# Build the package
catkin_make --pkg realsense_camera

Use the Package

source ~/catkin_ws/devel/setup.bash
roslaunch realsense_camera r200_nodelet_default.launch

Wiki: realsense_camera/Tutorials/Building_librealsense_from_Sources (last edited 2016-11-17 02:35:00 by mdhorn)