目录
(1)安装测试librealsense SDK 2.0
1.
2.
3.
以上不行的话,参考:
5.
(2)安装测试realsense
错误1:
解决:
(3)安装测试VINS-Mono
(4)在D435i上运行VINS-Mono
1.修改路径
2.
3.设置好realsense 的输出尺寸
4.一定要设置好两套的尺寸
5.运行vins mono in D435i
(1)安装测试librealsense SDK 2.0
参考:librealsense/distribution_linux.md at master · IntelRealSense/librealsense · GitHub
参考:从零开始使用Realsense D435i运行VINS-Mono_Jichao_Peng的博客-CSDN博客
1.
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF6E65AC044F831AC80A06380C8B3A55A6F3EFCDE' | sudo apt-key add -
转换mat包失败 还是使用unite的数据吧
Z.官方的包
2.
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
3.
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
以上不行的话,参考:
sudo apt-get install git cmake3
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install libssl-dev
sudo apt-get install libusb-1.0-0-dev pkg-config libgtk-3-dev
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true..
make -j2 #(or -j4 if you have a quad core)
sudo make install
5.
realsense-viewer
把三个部分的都打开 111
(2)安装测试realsense
cd ~/catkin_ws/src
git clone https://github.com/intel-ros/realsense.git
cd ..
catkin_make
rospack profile
source devel/setup.sh
错误1:
Could not find the required component ‘ddynamic_reconfigure‘.问题解决
解决:
sudo apt-get install ros-kinetic-ddynamic-reconfigure
rviz显示点云
roslaunch realsense2_camera rs_camera.launch filters:=pointcloud
rosrun rviz rviz
(3)安装测试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
roslaunch vins_estimator euroc.launch
roslaunch vins_estimator vins_rviz.launch
rosbag play /home/k/dataset/euroc/MH_01_easy.bag
rosbag play /home/k/sdb2_data/dataset/euroc/MH_01_easy.bag
出现问题:参考:Issue with catkin_make · Issue #4 · ydsf16/dre_slam · GitHub
安装ceres1.14.0 解决!!!!
错误:
参考:Build error ‘integer_sequence’ is not a member of ‘std’ · Issue #372 · HKUST-Aerial-Robotics/VINS-Mono · GitHub
(4)在D435i上运行VINS-Mono
参考:从零开始使用Realsense D435i运行VINS-Mono_Jichao_Peng的博客-CSDN博客
1.修改路径
/home/k/catkin_ws/src/realsense/realsense2_camera/launch/rs_camera.launch
2.
/home/k/catkin_ws/src/VINS-Mono/config/realsense/realsense_color_config.yaml
相机P矩阵:相机几何学——相机投影矩阵( Camera Projection Matrix)_小小顺利的博客-CSDN博客_相机投影矩阵
3.设置好realsense 的输出尺寸
<arg name="color_width" default="848"/>
<arg name="color_height" default="480"/>
<arg name="enable_color" default="true"/>
color_fps 30
4.一定要设置好两套的尺寸
否则会出现以下的问题:
no previous pose graph
OpenCV Error: Assertion failed (_mask.empty() || (_mask.type() == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3)) && _mask.sameSize(_image))) in goodFeaturesToTrack, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgproc/src/featureselect.cpp, line 366
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgproc/src/featureselect.cpp:366: error: (-215) _mask.empty() || (_mask.type() == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3)) && _mask.sameSize(_image)) in function goodFeaturesToTrack
[feature_tracker-1] process has died [pid 28321, exit code -6, cmd /home/k/catkin_ws/devel/lib/feature_tracker/feature_tracker __name:=feature_tracker __log:=/home/k/.ros/log/6cc297dc-da08-11eb-9403-244bfeccb575/feature_tracker-1.log].
log file: /home/k/.ros/log/6cc297dc-da08-11eb-9403-244bfeccb575/feature_tracker-1*.log
^C[pose_graph-3] killing on exit
[vins_estimator-2] killing on exit
terminate called without an active exception
terminate called without an active exception
shutting down processing monitor...
... shutting down processing monitor complete
具体原因是masksize和picsize尺寸不一:
if (mask.size() != forw_img.size()){
cout << "wrong size111 " << endl;
cout<<"mask.size()"<<mask.size()<<endl;
cout<<"forw_img.size()"<<forw_img.size()<<endl;
}
查看log文件
cat XXX.log
5.运行vins mono in D435i
roslaunch realsense2_camera rs_camera.launch
roslaunch vins_estimator realsense_color.launch
roslaunch vins_estimator vins_rviz.launch
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)