ROS driver for RealSense depth camera
This code is based on ROS usb_cam node, which code was adapted to communicte with Intel RealSense RGB-D camera. This code was tested on
- ROS Hydro, Ubuntu 12.04
- ROS Jade, Ubuntu 15.04 but might work with other configurations s well. The node realsense_cam_node provides you with following
- Topics:
- ~/image_raw - published depth image in 16UC1 format, millimetres (unsigned int)
- ~/camera_info - CameraInfo topic
- Parameters:
- video_device - the device the camera is on: (e.g. "/dev/video0")
- camera_name - the name of the camera (e.g. "my_realsense_camera") must be the same as specified in camera calibration config (if used, see launch file).
- camera_frame_id - you must specify coordinate frame for ROS to know how to interpret point coordinates
- camera_info_url - An url to the camera calibration file that will be read by the CameraInfoManager class
- This manual assumes you have successfully installed ROS Hydro on Ubuntu (the code was tested on Ubuntu 12.04)
- Useful ROS HOWTO's:
- It might be necessary to install some additional libraries to successfully compile the code. I'll maybe write about this one day, but at the moment you have to look at the compiler errors and set everything up yourself, sorry ;) No further libraries were required on Ubuntu 15.04 with sudo apt-get install ros-jade-desktop-full
- After you have created catkin workspace simply copy downloaded (or directly checkout from the repo) realsense_cam package in your src folder and catkin_make it:
cd ~/catkin_ws/src
git clone https://github.com/nucobot/RealSense
cd ../
catkin_make
- realsense_cam package has a launch file. You can examine it and use as a template for your own one, or use as it is.
- DO NOT forget to configure rgb_devive and depth_device tags at the top of the launch file (it should be something
like
/dev/video<n>
, where n is some number. Runls /dev | grep video
to see all video devices.
roscd realsense_cam
gedit ./launch/realsense_cam.launch
- Run the launch file:
roslaunch realsense_cam realsense_cam.launch
- If the camera crashes after a few seconds, ensure that the USB port supplies enough current.