hku-mars / FAST-LIVO

A Fast and Tightly-coupled Sparse-Direct LiDAR-Inertial-Visual Odometry (LIVO).
GNU General Public License v2.0
1.26k stars 202 forks source link

关于MVS_ROS包的报错 #132

Open pcl5 opened 1 month ago

pcl5 commented 1 month ago

作者您好!我在noetic docker镜像里尝试运行mvs_ros_pkg时,发现打不开相机并有如下循环报错: [mvs_camera_trigger-2] restarting process process[mvs_camera_trigger-2]: started with pid [1373] terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid [mvs_camera_trigger-2] process has died [pid 1373, exit code -6, cmd /data/mvs/devel/lib/mvs_ros_pkg/grabImgWithTrigger /data/mvs/src/mvs_ros_pkg/config/left_camera_trigger.yaml name:=mvs_camera_trigger log:=/root/.ros/log/7e825ec6-7cb7-11ef-a211-0242ac110002/mvs_camera_trigger-2.log]. log file: /root/.ros/log/7e825ec6-7cb7-11ef-a211-0242ac110002/mvs_camera_trigger-2*.log [mvs_camera_trigger-2] restarting process process[mvs_camera_trigger-2]: started with pid [1379] ^Cterminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 我已经修改了正确的相机序号,并在其他的MVS_ros_pkg上打开了相机验证相机是好的,请问您知道这报错可能是什么原因导致的吗? 希望能得到回复,再次感谢!!!

xuankuzcr commented 1 month ago

您好,我已经更新了相机驱动,更新日志在News里的10月3号这条,您可以重新再pull一下试试。

pcl5 commented 1 month ago

您好,我已经更新了相机驱动,更新日志在News里的10月3号这条,您可以重新再pull一下试试。

您好,我尝试了您新修改的ros包,依然有这样的报错:

[mvs_camera_trigger-2] process has died [pid 1615, exit code -6, cmd /data/mvs/devel/lib/mvs_ros_pkg/grabImgWithTrigger /data/mvs/src/mvs_ros_pkg/config/left_camera_trigger.yaml __name:=mvs_camera_trigger __log:=/root/.ros/log/8ae2a4f6-8521-11ef-834e-0242ac110002/mvs_camera_trigger-2.log].
log file: /root/.ros/log/8ae2a4f6-8521-11ef-834e-0242ac110002/mvs_camera_trigger-2*.log
[mvs_camera_trigger-2] restarting process
process[mvs_camera_trigger-2]: started with pid [1621]
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

我的相机型号是MV-CU120-10UC,目前尝试了其他的包能正常打开摄像头。您知道这报错可能是什么原因导致的吗? 感谢您的回复!

xuankuzcr commented 1 month ago

你的相机只支持Bayer格式的pixel format,目前我写的那个驱动只支持RGB8,我可以更新一版适合你这款相机的driver。

xuankuzcr commented 1 month ago

已修复,现在把pixel format设置成BayerRG8就可以用你这个型号了 (即把参数文件中PixelFormat设置为1)

pcl5 commented 1 month ago

已修复,现在把pixel format设置成BayerRG8就可以用你这个型号了 (即把参数文件中PixelFormat设置为1)

太感谢了!昨天在您告诉我可能是pixel format的问题后,我对代码做了相应修改,发现仍然无法读取到画面。后来发现是因为在docker里运行导致的权限问题,已经能通过RGB8格式读取到画面了。再次感谢作者的支持! 另外,在我的测试下,BayerRG8格式可能会有Gamma设置上的报错以及出现画面撕裂的问题,按照RGB8格式效果最好。 再次感谢作者!以及在此po上其他格式的编码供需要的人参考:

        // 0x01100003:Mono10
        // 0x010C0004:Mono10Packed
        // 0x01100005:Mono12
        // 0x010C0006:Mono12Packed
        // 0x01100007:Mono16
        // 0x02180014:RGB8Packed
        // 0x02100032:YUV422_8
        // 0x0210001F:YUV422_8_UYVY
        // 0x01080008:BayerGR8
        // 0x01080009:BayerRG8
        // 0x0108000A:BayerGB8
        // 0x0108000B:BayerBG8
        // 0x0110000e:BayerGB10
        // 0x01100012:BayerGB12
        // 0x010C002C:BayerGB12Packed
xuankuzcr commented 1 month ago

Bayer格式就不支持相机板载的ISP处理了,例如Gamma。问题解决就好,非常感谢您的分享和支持!