TUM Dataset 数据集下载地址
关注公众号"小秋SLAM笔记"获取已经下载好的数据集
TUM1.yaml 是数据集 freiburg1 的相机参数
TUM2.yaml 是数据集 freiburg2 的相机参数
TUM3.yaml 是数据集 freiburg3 的相机参数
mono_tum 是单目的可执行程序
ORBvoc.txt 是回环检测要用到的词典
cd /ORB_SLAM2
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml /home/q/projects/ORB_SLAM2/TUM_Dataset/rgbd_dataset_freiburg1_xyz
EuRoC Dataset 数据集下载地址
关注公众号"小秋SLAM笔记"获取已经下载好的数据集
cd /ORB_SLAM2
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml /home/q/projects/ORB_SLAM2/EuRoC_Dataset/mav0/cam0/data Examples/Monocular/EuRoC_TimeStamps/MH01.txt
EuRoC Dataset 数据集下载地址
关注公众号"小秋SLAM笔记"获取已经下载好的数据集
./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml /home/q/projects/ORB_SLAM2/EuRoC_Dataset/mav0/cam0/data /home/q/projects/ORB_SLAM2/EuRoC_Dataset/mav0/cam1/data Examples/Stereo/EuRoC_TimeStamps/MH01.txt
TUM Dataset 数据集下载地址
关注公众号"小秋SLAM笔记"获取已经下载好的数据集
生成深度图和彩色图时间戳对其的文件
associate.py 下载地址
python associate.py /home/q/projects/ORB_SLAM2/TUM_Dataset/rgbd_dataset_freiburg1_xyz/rgb.txt /home/q/projects/ORB_SLAM2/TUM_Dataset/rgbd_dataset_freiburg1_xyz/depth.txt > associations.txt
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml /home/q/projects/ORB_SLAM2/TUM_Dataset/rgbd_dataset_freiburg1_xyz /home/q/projects/ORB_SLAM2/TUM_Dataset/rgbd_dataset_freiburg1_xyz/associations.txt
Intel RealSense SDK D435i 官方安装卸载教程
Intel RealSense ROS Wrapper D435i 官方安装卸载教程
安装 Realsense_ros
sudo apt-get install ros-kinetic-rgbd-launch
sudo apt-get install ros-kinetic-ddynamic-reconfigure
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git
catkin_init_workspace
gedit realsense-ros/realsense2_camera/src/base_realsense_node.cpp
将 _camera_info[stream_index].P.at(3) = 0;
改
if(stream_index.second == 2)
{
_camera_info[stream_index].P.at(3) = -0.05;
}
cd ..
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
source devel/setup.bash
roslaunch realsense2_camera rs_rgbd.launch
查看发布图像话题
rostopic list
/camera/color/image_raw
/camera/depth/image_rect_raw
gedit /Examples/ROS/ORB_SLAM2/src/ros_rgbd.cc
message_filters::Subscriber<sensor_msgs::Image> rgb_sub(nh, "/camera/rgb/image_raw", 1);
message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "camera/depth_registered/image_raw", 1);
cd /ORB_SLAM2
rosrun ORB_SLAM2 RGBD Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml /camera/rgb/image_raw:=/camera/color/image_raw camera/depth_registered/image_raw:=/camera/depth/image_rect_raw
新开终端输入
rviz
左上角 Displays 中 Fixed Frame 选项中,下拉菜单选择 camera_link,可以看到 Global Status 变成了绿色
然后 点击Add -> By display type -> PointCloud2 -> ok
然后 更改Topic 如图所示 就可以看到点云了
最后 点击Add -> By display type -> Image -> ok
然后更改话题 Image Topic
就可以看到实时采集到的图片了
roslaunch realsense2_camera rs_camera.launch
rostopic list
/camera/infra1/image_rect_raw
/camera/infra2/image_rect_raw
gedit /Examples/ROS/ORB_SLAM2/src/ros_stereo.cc
message_filters::Subscriber<sensor_msgs::Image> left_sub(nh, "/camera/left/image_raw", 1);
message_filters::Subscriber<sensor_msgs::Image> right_sub(nh, "camera/right/image_raw", 1);
cd /ORB_SLAM2
rosrun ORB_SLAM2 Stereo Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml true /camera/left/image_raw:=/camera/infra1/image_rect_raw camera/right/image_raw:=/camera/infra2/image_rect_raw
roslaunch realsense2_camera rs_camera.launch
rostopic list
/camera/color/image_raw
gedit /Examples/ROS/ORB_SLAM2/src/ros_mono.cc
ros::Subscriber sub = nodeHandler.subscribe("/camera/image_raw", 1, &ImageGrabber::GrabImage,&igb);
ros::Subscriber sub = nodeHandler.subscribe("/camera/image_raw", 1, &ImageGrabber::GrabImage,&igb);
cd /ORB_SLAM2
rosrun ORB_SLAM2 Mono Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml /camera/image_raw:=/camera/color/image_raw