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

yuyv2rgb is unsupported/ segmentation fault after humble recent (?) upgrade for rpicamera #341

Open
lmendyk opened this issue Aug 14, 2024 · 2 comments

Comments

@lmendyk
Copy link

lmendyk commented Aug 14, 2024

It worked some time ago for humble release ( #299 )
After recent upgrade of pages I get:

This device supports the following formats:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Specified format `**yuyv2rgb**` is unsupported by the selected device `/dev/video0`
[ros2run]: Aborted

But when for testing I specify for “test” I get:

This driver supports the following formats:
        rgb8
        yuyv
        **yuyv2rgb**
        uyvy
        uyvy2rgb
        mono8
        mono16
        y102mono8
        raw_mjpeg
        mjpeg2rgb
        m4202rgb
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Specified format `test` is unsupported by this ROS driver

After experimenting and adding av_device_format:="YVYU" it gets even worse:

[INFO] [1723628892.506987172] [usb_cam]: Starting 'default_cam' (/dev/video0) at 640x480 via mmap (yuyv2rgb) at 30 FPS
[ros2run]: Segmentation fault

The camera supports:

v4l2-ctl --list-formats-ext -d /dev/video0
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'YU12' (Planar YUV 4:2:0)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [1]: 'YUYV' (YUYV 4:2:2)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [2]: 'RGB3' (24-bit RGB 8-8-8)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [3]: 'JPEG' (JFIF JPEG, compressed)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [4]: 'H264' (H.264, compressed)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [5]: 'MJPG' (Motion-JPEG, compressed)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [6]: 'YVYU' (YVYU 4:2:2)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [7]: 'VYUY' (VYUY 4:2:2)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [8]: 'UYVY' (UYVY 4:2:2)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [9]: 'NV12' (Y/CbCr 4:2:0)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [10]: 'BGR3' (24-bit BGR 8-8-8)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [11]: 'YV12' (Planar YVU 4:2:0)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [12]: 'NV21' (Y/CrCb 4:2:0)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2
        [13]: 'RX24' (32-bit XBGR 8-8-8-8)
                Size: Stepwise 32x32 - 3280x2464 with step 2/2

I don't know what to do to make the camera work again.

@flynneva
Copy link
Collaborator

@lmendyk what image format are you trying to use? What image format do you want this driver to publish with?

@lmendyk
Copy link
Author

lmendyk commented Aug 19, 2024

YUYV to RGB with compression - that is what I have been using so far and now it hast stop working.

The situation that system first reports " Specified format yuyv2rgb is unsupported" but when testing it prints: This driver supports the following formats: ...yuyv2rgb, does not help me to understand what is going on.

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