Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于MVS_ROS包的报错 #132

Open
pcl5 opened this issue Sep 27, 2024 · 6 comments
Open

关于MVS_ROS包的报错 #132

pcl5 opened this issue Sep 27, 2024 · 6 comments

Comments

@pcl5
Copy link

pcl5 commented Sep 27, 2024

作者您好!我在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
Copy link
Member

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

@pcl5
Copy link
Author

pcl5 commented Oct 8, 2024

您好,我已经更新了相机驱动,更新日志在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
Copy link
Member

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

@xuankuzcr
Copy link
Member

xuankuzcr commented Oct 11, 2024

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

@pcl5
Copy link
Author

pcl5 commented Oct 12, 2024

已修复,现在把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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants