jianhengLiu / LDSO-ROS

GNU General Public License v3.0
1 stars 0 forks source link

关于运行指令的问题 #3

Open Richardcvpr opened 1 year ago

Richardcvpr commented 1 year ago

非常感谢您的工作。关于您给出的运行指令我有一些疑问。

在数据集TUM-Mono上运行LDSO给出的指令为 rosrun ldso_ros run_dso_tum_mono \ preset=0 \ files=/home/chrisliu/Dataset/TUM-Mono/sequence_10/images.zip \ vignette=/home/chrisliu/Dataset/TUM-Mono/sequence_10/vignette.png \ calib=/home/chrisliu/Dataset/TUM-Mono/sequence_10/camera.txt \ gamma=/home/chrisliu/Dataset/TUM-Mono/sequence_10/pcalib.txt \ vocab=src/ldso_ros/vocab/orbvoc.dbow3

但是在cmakeList.txt中,生成run_dso_tum_mono 这个可执行文件的代码为/run_dso_tum_mono.cc

add_executable(run_dso_tum_mono examples/run_dso_tum_mono.cc examples/DatasetReader.h ${SOURCE_FILES} ${HEADER_FILES} ) target_link_libraries(run_dso_tum_mono ${THIRD_PARTY_LIBS})

但是同样在cmakeList.txt中,生成了另外一个可执行文件run_ldso_node,它是通过run_ldso_node.cpp生成的 add_executable(run_ldso_node ROS/run_ldso_node.cpp examples/DatasetReader.h ${SOURCE_FILES} ${HEADER_FILES} ) target_link_libraries(run_ldso_node ${THIRD_PARTY_LIBS})

按照我粗浅的理解,如果想要尝试运行LDSO应该是需要运行run_ldso_node这个可执行文件的对吗?

jianhengLiu commented 1 year ago

可以参考readme,run_dso_tum_mono输入的是数据集,run_ldso_node输入得是实时相机流

Richardcvpr commented 1 year ago

然后我将您给出的指令修改为如下指令:(就是将run_dso_tum_mono换为run_ldso_node) rosrun ldso_ros run_ldso_node preset=0 files=/home/chrisliu/Dataset/TUM-Mono/sequence_10/images.zip vignette=/home/chrisliu/Dataset/TUM-Mono/sequence_10/vignette.png calib=/home/chrisliu/Dataset/TUM-Mono/sequence_10/camera.txt gamma=/home/chrisliu/Dataset/TUM-Mono/sequence_10/pcalib.txt vocab=src/ldso_ros/vocab/orbvoc.dbow3

但是运行代码的时候却开始报错了:

[rospack] Error: package '/home/chrisliu//project/LDSO_vslam/LDSO-ROS-master/build/devel/lib/ldso_ros' not found PHOTOMETRIC MODE WITHOUT CALIBRATION!

=============== PRESET Settings: =============== FAST settings:

Found fx=0.953033, fy=1.269989, cx=0.508241, cy=0.499793. I'm assuming this is the "relative" calibration file format,and will rescale this by image width / height to fx=609.940918, fy=609.594543, cx=324.774323, cy=239.400421.

Out: 0.953033 1.269989 0.508241 0.499793 0.000000 Output resolution: 424 320

Rectified Kamera Matrix: 404.086 0 214.994 0 406.396 159.434 0 0 1

NO PHOTOMETRIC Calibration! Reading Photometric Calibration from file PhotometricUndistorter: Could not open file! using pyramid levels 0 to 3. coarsest resolution: 53 x 40! WARNING: Logging before InitGoogleLogging() is written to STDERR I0911 14:55:02.792850 119378 FullSystem.cc:34] This is Direct Sparse Odometry, a fully direct VO proposed by TUM vision group.For more information about dso, see Direct Sparse Odometry, J. Engel, V. Koltun, D. Cremers, In arXiv:1607.02565, 2016. For loop closing part, see LDSO: Direct Sparse Odometry with Loop Closure, X. Gao, R. Wang, N. Demmel, D. Cremers, In International Conference on Intelligent Robots and Systems (IROS), 2018 I0911 14:55:02.870532 119378 FullSystem.cc:51] Use fast loop closing [ERROR] [1694415302.871478463]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying...

jianhengLiu commented 1 year ago

请仔细阅读一下输出信息哈,Reading Calibration from file /home/chrisliu//project/LDSO_vslam/LDSO-ROS-master/config/camera.txt ... found! 这个项目年代久远也比较粗糙,也没有维护,可能有些hardcode在里面需要自行修改

Richardcvpr commented 1 year ago

请仔细阅读一下输出信息哈,Reading Calibration from file /home/chrisliu//project/LDSO_vslam/LDSO-ROS-master/config/camera.txt ... found! 这个项目年代久远也比较粗糙,也没有维护,可能有些hardcode在里面需要自行修改

好的,感谢您的回复,非常抱歉,我没有仔细阅读报错信息。 现在我在尝试使用您给出的代码调用实时相机,但是rs_camera.launch这个可执行文件我没有找到,realsense2_camera项目也没有找到,请问这部分的文件应该在哪里生成呢?