心累,发现不加ros的资料真的少。
现放几个ros的:
https://blog.csdn.net/iriving_shu/article/details/69372380
https://blog.csdn.net/xiaocainiaodeboke/article/details/79541512
官方安装说明:https://github.com/introlab/rtabmap/wiki/Installation#ubuntu
1. 预装库:
$ sudo apt-get update $ sudo apt-get install libsqlite3-dev libpcl-dev libopencv-dev git cmake libproj-dev libqt5svg5-dev
2.下载源码编译:
$ git clone https://github.com/introlab/rtabmap.git rtabmap $ cd rtabmap/build $ cmake .. $ make -j4 $ sudo make install
遇见问题:
1. 编译报错:../../../bin/librtabmap_core.so.0.11.12: undefined reference to `cs_pinv'
参考 https://github.com/introlab/rtabmap/issues/154
首先删除作者的缓存
$ cd rtabmap/build $ rm CMakeCache.txt $ cmake ..
删除usr/local/include下的EXTERNAL(需要权限)
1. 通过软件运行
- 使用修改过的associate.py处理得到rgb_sync depth_sync
- 创建 "rgbddatasets.yaml" 拷贝到"~/Documents/RTAB-Map/camera_info":
%YAML:1.0
camera_name: rgbddatasets
image_width: 0
image_height: 0
camera_matrix:
rows: 3
cols: 3
data: [ 525., 0., 3.1950000000000000e+02, 0., 525.,
2.3950000000000000e+02, 0., 0., 1. ]
distortion_coefficients:
rows: 1
cols: 5
data: [ 0., 0., 0., 0., 0. ]
rectification_matrix:
rows: 3
cols: 3
data: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
projection_matrix:
rows: 3
cols: 4
data: [ 525., 0., 3.1950000000000000e+02, 0., 0., 525.,
2.3950000000000000e+02, 0., 0., 0., 1., 0. ]
- 运行软件,打开 Preferences 点击"Reset all settings" 。点击Source, 选择RGB-D set input rate to 30 Hz or lower, set calibration name to "rgbddatasets" (should be the same name as the calibration file create before).
- Scroll down to select "Images" for the camera driver. Fill RGB and depth directories (with "rgb_sync" and "depth_sync" folders), set 5 for the depth scale, check "Use RGB file names as timestamps" and leave empty the "Optional timestamps file".
- To have more points to compare with the ground truth, you can check "Create intermediate nodes..." under Advanced RTAB-Map settings panel.
2. 运行./rtabmap-rgbd_dataset
./rtabmap-rgbd_dataset 目录
补充:关于标定文件
https://blog.csdn.net/qq_30667639/article/details/78330695
image_width、image_height代表图片的长宽
camera_name为摄像头名
camera_matrix规定了摄像头的内部参数矩阵
distortion_model指定了畸变模型
distortion_coefficients指定畸变模型的系数
rectification_matrix为矫正矩阵,一般为单位阵
projection_matrix为外部世界坐标到像平面的投影矩阵