rs4se stands for RealSense for State Estimation. The goal is to wrap around
librealsense2
and provide developers with usable visual, inertial and depth
data for SLAM.
Important: At the moment this codebase has only been tested with the Intel RealSense D435i
In particular this driver makes the following assertions:
- All camera frames (IR and RGB) timestamps are captured at mid-exposure.
- Depth is aligned to RGB camera.
- Accelerometer measurements are lerped against the gyroscope
measurements to provide "synchronized"
sensor_msgs::Imu
messages. e.g. If gyroscope is 400Hz and the accelerometer is 250Hz, the accelerometer will be lerped against the gyroscope to provide synchronized 400Hz measurements.
Go to your catkin workspace and clone this repo:
cd <your catkin workspace>
git clone git@github.com:chutsu/rs4se.git
cd rs4se
Install librealsense2. Additionally, make sure you patch your OS kernel following the prerequisit instructions detailed here. There are two make targets to do this for you:
make deps
make patch_kernel
IMPORTANT NOTE: For correct mid-exposure timestamping to work you must
patch the kernel or this driver will fail to obtain the
RS2_FRAME_METADATA_SENSOR_TIMESTAMP
meta data from the sensor.
Then build rs4se
with the following commands:
catkin build
source <PATH TO YOUR CATKIN WS>/devel/setup.bash
roslaunch rs4se intel_d435i.launch
The above launch file will launch the intel_d435i
ros node and publish the
following topics:
/rs/rgb0/image # RGB camera frames
/rs/ir0/image # Infrared camera (left) frames
/rs/ir1/image # Infrared camera (right) frames
/rs/depth0/image # Depth image (if enabled) aligned to /rs/rgb0/image
/rs/imu0/data # "Synchronized" accel and gyro data via lerp
/rs/accel0/data # Accelerometer measurements
/rs/gyro0/data # Gyroscope measurements
UVC header is not available
terminate called after throwing an instance of 'rs2::invalid_value_error'
what(): UVC header is not available
Solution: here
Copyright (c) <2017> . All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Chris Choi.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.