Skip to content

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

@lmendyk

Description

@lmendyk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions