1.CPU:i5-9400(ubuntu 18.04)
2.摄像头+imu模组:D435i
a.ros安装
b.ceres安装
a.下载源码
git clone https://github.com/IntelRealSense/librealsense.git
推荐下载2.19版本安装
b.依赖版本安装
sudo apt-get install libusb-1.0-0-dev libglfw3-dev libgtk-3-dev
libusb是一个USB设备访问接口库
gtk是一个图形工具包
glfw是一个OpenGL的应用框架
c.将英特尔服务器添加到存储库列表中
echo 'deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main' | sudo tee /etc/apt/sources.list.d/realsense-public.list
d.注册服务器的公钥
apt-key adv --keyserver keys.gnupg.net --recv-key 6F3EFCDE
e.刷新apt列表
sudo apt-get update
f.安装相关包
$ sudo apt-get install librealsense2-dkms
$ sudo apt-get install librealsense2-utils
dkms是内核驱动包,utils是工具包
g.检查安装
modinfo uvcvideo | grep "version:"
h.建立编译目录
cd librealsense
mkdir build
cd build
i.使用cmake进行编译
cmake ..
make -j8
sudo make install
j.检查安装
realsense-viewer
参考资料
a.建立workspace,已经有的可以跳过
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src/
catkin_init_workspace
cd ..
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
b.在catkin_ws/src/下载源程序
cd src
git clone https://github.com/intel-ros/realsense.git
git clone https://github.com/pal-robotics/ddynamic_reconfigure/tree/kinetic-devel
c.catkin_make
cd ..
catkin_make
d.如果没有错误说明,已经装好了,启动相机节点
roslaunch realsense2_camera rs_camera.launch
e.打开另外一个界面,看一下发布的topic
rostopic list
f.打开第三个界面,看一下某一个topic内容
rostopic echo /camera/color/camera_info
参考资料1
参考资料2
a.vins-mono下载
cd ~/catkin_ws/src
git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
cd ..
catkin_make
source ~/catkin_ws/devel/setup.bash
a.修改realsense包里的rs_camera.launch文件(把文件中的几处修改成下面)
<arg name= "enable_gyro" default= "true"/>
<arg name= "enable_accel" default= "true"/>
<arg name= "enable_sync" default= "true"/>
<arg name= "unite_imu_method" default= "linear_interpolation"/>
b.修改VINS-Mono包里的realsense_color_config.yaml文件
imu_topic: "/camera/imu"
image_topic: "/camera/color/image_raw"
#unsynchronization parameters
estimate_td: 0 # online estimate time offset between camera and imu
td: 0.000 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)
#rolling shutter parameters
rolling_shutter: 0 # 0: global shutter camera, 1: rolling shutter camera
rolling_shutter_tr: 0 # unit: s. rolling shutter read out time per frame (from data sheet).
c.打开摄像头,运行VINS-Mono
roslaunch realsense2_camera rs_camera.launch
roslaunch vins_estimator realsense_color.launch
roslaunch vins_estimator vins_rviz.launch
参考资料