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

Camera from RPI has a driver issue in Ubuntu Mate 22.04 which prevents proper loading #198

Closed
agalbachicar opened this issue Dec 28, 2023 · 5 comments · Fixed by #231
Closed
Labels
bug Something isn't working

Comments

@agalbachicar
Copy link
Member

Environment

  • OS Version: RPI 4, Ubuntu Mate 22.04.3, humble
  • Source or binary build: source build, 2e552b5

Description

  • Expected behavior: after running the installation guide in the RPI, and launching the base launchfile the camera would be up and working.
  • Actual behavior: it does not work, fails with:
[v4l2_camera node-3] [ERROR] [1703759493.768683193] [v4l2_camera]: Failed stream start: Invalid argument (22)

Steps to reproduce

  1. Run the installation instructions in https://github.com/Ekumen-OS/andino/blob/humble/andino_hardware/README.md
  2. Go to https://github.com/Ekumen-OS/andino/blob/humble/README.md#rocket-usage and try:
ros2 launch andino_bringup andino_robot.launch.py

The launch execution would fail with that error listed above.

Notes

I checked and it seems this is a known error:

It seems there is a workaround with raspian distros, however I did not find the /boot/firmware/config.txt or any similar file under the /boot directory nor that configuration in any other file (camera_auto_detect).

Hardware

  • Rasberry PI camera module 2
  • Raspberry PI 4 B 8GB
@flsmr
Copy link

flsmr commented May 19, 2024

For me, the following fix got my raspi cam v2 work again (Ubuntu Mate 22.04 on Raspberry Pi 4B):
change/add the following lines within /boot/firmware/config.txt:

# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
start_x=1
gpu_mem=128
# camera_auto_detect=1

@francocipollone
Copy link
Collaborator

For me, the following fix got my raspi cam v2 work again (Ubuntu Mate 22.04 on Raspberry Pi 4B): change/add the following lines within /boot/firmware/config.txt:

# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
start_x=1
gpu_mem=128
# camera_auto_detect=1

Thanks for sharing the fix @flsmr

@JesusSilvaUtrera
Copy link
Contributor

For me, the following fix got my raspi cam v2 work again (Ubuntu Mate 22.04 on Raspberry Pi 4B): change/add the following lines within /boot/firmware/config.txt:

# Autoload overlays for any recognized cameras or displays that are attached
# to the CSI/DSI ports. Please note this is for libcamera support, *not* for
# the legacy camera stack
start_x=1
gpu_mem=128
# camera_auto_detect=1

Exactly, I have tried my raspi cam v2 today and this was the solution to make it work, apart from enabling it in the raspberry configuration:

sudo raspi-config

Go to Interface Options, select camera and enable it. Then you just need to reboot and the camera should be working fine.

@francocipollone
Copy link
Collaborator

We should update this fix to the instructions in case others face this very same issue.

@JesusSilvaUtrera
Copy link
Contributor

We should update this fix to the instructions in case others face this very same issue.

I'm on it, it will be included in the #231 PR

@francocipollone francocipollone linked a pull request Jun 9, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🆕 Backlog to ✅ Done in Andino Roadmap Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants