5p6 / ORBSLAM3_Dense

12 stars 1 forks source link

[xcb] Unknown sequence number while processing queue 已放弃 #1

Open StevenLiuMaster opened 1 month ago

StevenLiuMaster commented 1 month ago

作者你好,我不太明白数据集配置那一块儿的内容,root_dir是一个文本文件?还是一个可执行文件?再或者是一个文件夹?还是说他是一个路径?如何制作自己的数据集?我感觉运行不起来的主要原因应该是数据集的问题,希望你能抽时间解答一下谢谢

5p6 commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

5p6 commented 1 month ago

xcb报错一般是因为pcl的问题,你多运行几遍就行。

StevenLiuMaster commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

好的,感谢作者,受教了,希望项目能更加完善,加油!!!

StevenLiuMaster commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈: Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters

SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params :
meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

5p6 commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

StevenLiuMaster commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

作者牛逼!!!!!终于跑通了太感谢了呜呜呜

StevenLiuMaster commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

作者您好,抱歉又来打扰您了,我在用TUM制作数据集后运行,发现确实能跑,但是构建出来的稠密点云看起来非常奇怪,点十分稀疏,散的到处都是,从建好的pcb文件来看根本看不出这个图中到底包含什么。想问问您可以公布一个您自己采集制作的数据集吗?我怀疑是我自己做的那个TUM数据集没有对齐rgb图和深度图导致最后建出来的图很碎(终端里反馈的点数量只有几万,和您演示视频中的上百万差了好多)。我那个数据集运行的过程中就看到有一片点云突然就被“优化”掉了,不知道是不是数据集的问题

5p6 commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

作者您好,抱歉又来打扰您了,我在用TUM制作数据集后运行,发现确实能跑,但是构建出来的稠密点云看起来非常奇怪,点十分稀疏,散的到处都是,从建好的pcb文件来看根本看不出这个图中到底包含什么。想问问您可以公布一个您自己采集制作的数据集吗?我怀疑是我自己做的那个TUM数据集没有对齐rgb图和深度图导致最后建出来的图很碎(终端里反馈的点数量只有几万,和您演示视频中的上百万差了好多)。我那个数据集运行的过程中就看到有一片点云突然就被“优化”掉了,不知道是不是数据集的问题。

这个是因为配置文件yaml的问题,降采样点太少了,你把配置文件里面的PointCloudMapping.Resolution降低,点云数量就会变多,然后就是点云图里面有离群点去除算法,所以程序运行的时候可能有一块点云会被慢慢优化掉,你可以到PointCloudMapping.cc的Viewer函数里面,把统计滤波的代码注释掉然后再编译运行。

            // outiler filter
            sor.setInputCloud(globalMap);
            sor.filter(*globalMap);

把这几行注释掉就可以了。

StevenLiuMaster commented 1 month ago

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

root_dir是一个路径,比如说深度图像目录的路径是 /home/ros/depth ,彩色图像路径是 /home/ros/rgb,那么root_dir就是 /home/ros,最近准备完善一下。

作者你好,我刚刚又试着自己做了一个数据集,我在ORBSLAM3_Dense的文件夹下创立了一个/root_dir文件夹,下面有两个子文件夹,分别是/rgb和/depth,然后里面存放我从TUM数据集拷贝来的色彩图和深度图,从windows系统中批量重命名为(1).png,(2).png ...,然后我运行了./MyExample/rgbd_slam /root_dir,然后系统在弹出viewer等窗口的一瞬间闪退报错了,然后在终端获得反馈:

Input sensor was set to: RGB-D Loading settings from /home/liu/ORBSLAM3_Dense/MyExample/rgbdslam.yaml -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded RGB-D calibration -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters SLAM settings: -Camera 1 parameters (Pinhole): [ 520.909 521.007 325.141 249.702 ] -Camera 1 distortion parameters: [ 0.231222 -0.784899 -0.003257 -0.000105 0.917205 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 30 -RGB-D depth map factor: 5208 -Features per image: 1000 -ORB scale factor: 1.2 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7 Loading ORB Vocabulary. This could take a while... Vocabulary loaded! Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 initializa with disp images ! the resolution of Point cloud Voxel filter : 0.01 the Point cloud Outlier filter params : meank : 5 stdthresh :1 the Unit of Point cloud : 1 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Shutdown terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeASCII] Input point cloud has no data! 已放弃 (核心已转储) 能麻烦您抽时间再看一下我这个报错的原因是什么吗,非常感谢!

报错原因是因为图像格式的原因,读取深度图的时候和rgb图像不相关,导致slam定位失败,然后稠密建图模块就生成不了点云,所以就没有数据。 纠正方法:图像数据必须是1.png这种格式,不能有括号。

作者您好,抱歉又来打扰您了,我在用TUM制作数据集后运行,发现确实能跑,但是构建出来的稠密点云看起来非常奇怪,点十分稀疏,散的到处都是,从建好的pcb文件来看根本看不出这个图中到底包含什么。想问问您可以公布一个您自己采集制作的数据集吗?我怀疑是我自己做的那个TUM数据集没有对齐rgb图和深度图导致最后建出来的图很碎(终端里反馈的点数量只有几万,和您演示视频中的上百万差了好多)。我那个数据集运行的过程中就看到有一片点云突然就被“优化”掉了,不知道是不是数据集的问题。

这个是因为配置文件yaml的问题,降采样点太少了,你把配置文件里面的PointCloudMapping.Resolution降低,点云数量就会变多,然后就是点云图里面有离群点去除算法,所以程序运行的时候可能有一块点云会被慢慢优化掉,你可以到PointCloudMapping.cc的Viewer函数里面,把统计滤波的代码注释掉然后再编译运行。

            // outiler filter
            sor.setInputCloud(globalMap);
            sor.filter(*globalMap);

把这几行注释掉就可以了。

我的天啊,我都不知道该如何感谢您了,如果我们能多一些您这样专业、耐心的开源作者,我相信中国的开源社区环境会越来越好。非常感谢您的指导和讲解,通过您的讲解我受益匪浅。未来我会逐渐把这些代码看懂再去帮助别人,衷心谢谢您!!!