Installation of ROS Drivers for Intel RealSense Devices
Follow the installation steps provided below for getting the Intel® RealSenseTM ROS driver setup ready for the camera sensor setup. These steps help you to download and install all the dependent packages and ROS drivers for the Intel RealSense setup. These steps are captured from the IntelRealSense ROS page.
These steps assume that you have Installed ROS melodic on your machine.
First install the realsense2_camera ROS package and its dependents, including librealsense2 library and matching udev-rules. It can be installed by typing:
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
Create a catkin workspace for the source installation using the below commands.
It is recommended that you create a workspace with a new name if you already have a workspace with name catkin_ws.
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src
Clone the ROS packages from the IntelRealSense ROS GitHub page using the below command.
git clone https://github.com/IntelRealSense/realsense-ros.git cd realsense-ros/ git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1 cd ..
Install the dependent package ros-melodic-ddynamic-reconfigure using the below command.
sudo apt-get install ros-melodic-ddynamic-reconfigure
Build the workspace using the below command.
catkin_init_workspace cd .. catkin_make clean catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release catkin_make install echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc source devel/setup.bash
These installation steps are verified on the ROS melodic distribution only.
To verify the installation, start the camera node in ROS using below command.
roslaunch realsense2_camera demo_pointcloud.launch
This streams all camera sensors and publish on the appropriate ROS topics. Type
rostopic list in another terminal to see all the published ROS