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

Unable to Configure and Run camera_ros After Reinstallation #67

Open
codermery opened this issue Nov 28, 2024 · 5 comments
Open

Unable to Configure and Run camera_ros After Reinstallation #67

codermery opened this issue Nov 28, 2024 · 5 comments

Comments

@codermery
Copy link

codermery commented Nov 28, 2024

Unable to Configure and Run camera_ros After System Reset

Description

I previously used the camera_ros package successfully on my Raspberry Pi 5 without any additional configuration. However, after resetting my computer, I’ve been unable to get it working despite following the same steps and reinstalling all required dependencies.

The node fails to configure the camera and consistently throws errors. I also noticed that both libcamera and camera_ros have been updated recently, and reverting to older versions did not solve the problem. Additionally, I can still capture images using QCam, so libcamera appears to be functioning correctly.


System Details

  • Hardware: Raspberry Pi 5 + IMX708 camera module (2 units)
  • Software:
    • OS: Ubuntu 24.04
    • ROS 2: Jazzy
    • Libraries: libcamera, v4l2, camera_ros

Current Issues and Errors

  1. v4l2_camera Error:
Failed stream start: Invalid argument (22)
  1. Camera_ros Error:
Can't configure camera with invalid configuration
terminate called after throwing an instance of 'std::runtime_error'
what():  failed to configure streams
Abort.

Current Issues and Errors

  • Error Summary: The camera_ros node fails to configure the camera streams due to invalid configuration and unsupported pixel formats.
  • Details:
    • The default pixel format (YUV420) is not supported by the camera.
    • The system attempts to auto-select a pixel format (R8) and resolution (640x480), but adjusts it to an unsupported configuration (1536x864-SBGGR16).
    • The stream configuration results in the error:
      Can't configure camera with invalid configuration
      failed to configure streams
      Removing camera while still in use
      
    • Additionally, the container throws the following exception:
      Component constructor threw an exception: failed to configure streams
      

ros2 launch camera_ros camera.launch.py Error

  • Error Summary: The camera_ros node fails to configure the camera due to invalid stream configuration and unsupported default pixel formats.
  • Details:
    • The default pixel format (YUV420) is not supported by the camera.
    • The system attempts to auto-select a pixel format (R8) and resolution (1920x1080), but adjusts it to an unsupported configuration (2304x1296-SBGGR16).
    • This leads to the following critical error:
      Can't configure camera with invalid configuration
      failed to configure streams
      
    • The process terminates with:
      terminate called after throwing an instance of 'std::runtime_error'
      what():  failed to configure streams
      

ros2 run camera_ros camera_node Errors

  • Error Summary: The camera_ros node fails to configure the camera due to invalid stream configuration and unsupported default pixel formats.
  • Details:
    • The default pixel format (YUV420) is not supported by the camera.
    • The system attempts to auto-select a pixel format (R8) and resolution (1920x1080), but adjusts it to an unsupported configuration (2304x1296-SBGGR16).
    • This leads to the following critical error:
      Can't configure camera with invalid configuration
      failed to configure streams
      
    • The process terminates with:
      terminate called after throwing an instance of 'std::runtime_error'
      what():  failed to configure streams
      

Steps to Reproduce

  1. Installed all dependencies for camera_ros and libcamera.
  2. Verified the camera works with QCam.
  3. Attempted to run camera_ros using the following commands:
ros2 run camera_ros camera_node --ros-args -p camera:=0 -p format:="YUYV" -p width:=1640 -p height:=1232 

or:

ros2 run camera_ros camera_node --ros-args -p camera:=0 
  1. Tried modifying the role parameter to raw and viewfinder, but the errors persisted.
  2. Reverted both libcamera and camera_ros to previous versions.

What I Tried

  • Verified that QCam can still capture images, confirming that libcamera works.
  • Used supported formats and resolutions (e.g., 1640x1232-YUYV).
  • Reinstalled all dependencies.
  • Tried previous versions of both libcamera and camera_ros.

Expected Behavior

The node should configure the camera successfully and stream images, as it did during the initial setup without any manual adjustments.

Questions

  1. Are there any known issues with the latest updates to libcamera or camera_ros?
  2. How can I prevent these configuration errors?
  3. Is there a recommended debugging or setup process to ensure compatibility between libcamera and camera_ros?

Additional Context

The current situation has become very frustrating, as the same hardware and software setup worked flawlessly during my initial installation. Any help or guidance would be greatly appreciated.

@christianrauch
Copy link
Owner

  1. v4l2_camera Error:
Failed stream start: Invalid argument (22)

Are you referring to https://gitlab.com/boldhearts/ros2_v4l2_camera.git? This is not using libcamera. Are you trying to use the Raspberry Pi camera with V4L2 instead of libcamera?

  1. Camera_ros Error:
Can't configure camera with invalid configuration
terminate called after throwing an instance of 'std::runtime_error'
what():  failed to configure streams
Abort.

Where is this message coming from? The node does not show an error "Can't configure camera with invalid configuration".

The failed to configure streams exception looks like a duplicate of #64. Did you try any of the workarounds there?

Did you have a look at the "Trouble Shooting" section? Especially enabling debug information for libcamera and the ROS node should provide more useful information. Can you also list explicitly which commands you run? It's not yet clear to me which commands cause which error.

Since you also list "2 units", do you have 2 cameras connected to the board? Does this work with a single camera only or with a different camera connected to the board?

@codermery
Copy link
Author

Current Issues and Observations

1. V4L2 and Libcamera Usage

I am using the following resources:

I understand that V4L2 does not utilize Libcamera, but the issue persists even when I use Libcamera exclusively.

2. Error: Can't configure camera with invalid configuration

  • The error occurs as follows:
    [0:10:09.009613503] [3434] ERROR Camera camera.cpp:1171 Can't configure camera with invalid configuration
    terminate called after throwing an instance of 'std::runtime_error'
      what():  failed to configure streams
    
  • I referred to Issue Can't configure camera with invalid configuration #64 and tried the suggested workarounds, but the issue persists.

3. Pixel Format Errors in Debug Logs

  • Default pixel format YUV420 is not supported:
[WARN] [camera]: default pixel format (YUV420) not supported
  • Adjustments auto-select to "1920x1080-R8", but still fail:
[WARN] [camera]: stream configuration adjusted from "1920x1080-R8" to "2304x1296-SBGGR16"

4. QSocketNotifier Error

-This occurs intermittently:

QObject::connect: Cannot queue arguments of type 'QSocketNotifier*'

5. Compilation Errors (Libcamera)

  • When compiling with Libcamera, switch errors are encountered:
/home/pixbot/ros2_ws/src/camera_ros/src/clamp.cpp: In function ‘libcamera::ControlValue clamp(const libcamera::ControlValue&, const libcamera::ControlValue&, const libcamera::ControlValue&)’:
error: enumeration value ‘ControlTypePoint’ not handled in switch [-Werror=switch]

-Similar issues occur in cv_to_pv.cpp and other files.

Observations

  • Cameras are detected correctly in debug logs:
>> cameras:
   0: imx708 (/base/axi/pcie@120000/rp1/i2c@88000/imx708@1a)
   1: imx708 (/base/axi/pcie@120000/rp1/i2c@80000/imx708@1a)

  • Qcam is able to provide an image feed, so the hardware seems functional.

  • These issues began after re-installing the environment on a reset system.

Steps Tried

-Referred to Trouble Shooting.
-Enabled detailed debugging using LIBCAMERA_LOG_LEVELS=*:DEBUG.
-Verified hardware by testing with Qcam.

@christianrauch
Copy link
Owner

1. V4L2 and Libcamera Usage

I am using the following resources:

The libcamera repo at https://github.com/raspberrypi/libcamera is a fork of the upstream repo that is not supported. Use the official upstream repo or the binary packages from the ROS repo.

2. Error: Can't configure camera with invalid configuration

  • The error occurs as follows:
    [0:10:09.009613503] [3434] ERROR Camera camera.cpp:1171 Can't configure camera with invalid configuration
    terminate called after throwing an instance of 'std::runtime_error'
      what():  failed to configure streams
    

You still have to provide the commands that you run and the debug information.

3. Pixel Format Errors in Debug Logs

  • Default pixel format YUV420 is not supported:
[WARN] [camera]: default pixel format (YUV420) not supported
  • Adjustments auto-select to "1920x1080-R8", but still fail:
[WARN] [camera]: stream configuration adjusted from "1920x1080-R8" to "2304x1296-SBGGR16"

Did you try to enable debug information?

4. QSocketNotifier Error

-This occurs intermittently:

QObject::connect: Cannot queue arguments of type 'QSocketNotifier*'

This repo is not using Qt. So this error cannot come from the ROS node.

5. Compilation Errors (Libcamera)

  • When compiling with Libcamera, switch errors are encountered:
/home/pixbot/ros2_ws/src/camera_ros/src/clamp.cpp: In function ‘libcamera::ControlValue clamp(const libcamera::ControlValue&, const libcamera::ControlValue&, const libcamera::ControlValue&)’:
error: enumeration value ‘ControlTypePoint’ not handled in switch [-Werror=switch]

-Similar issues occur in cv_to_pv.cpp and other files.

Use the newest released version from the upstream repo or the binary package from the ROS repo.

Observations

  • Cameras are detected correctly in debug logs:
>> cameras:
   0: imx708 (/base/axi/pcie@120000/rp1/i2c@88000/imx708@1a)
   1: imx708 (/base/axi/pcie@120000/rp1/i2c@80000/imx708@1a)

Did you try with a single camera as suggested?

  • Qcam is able to provide an image feed, so the hardware seems functional.
  • These issues began after re-installing the environment on a reset system.

What could I conclude from this? I don't know what change and could have caused an issue.

Steps Tried

-Referred to Trouble Shooting.

This links to the non-existing website https://github.com/raspberrypi/libcamera/wiki/Troubleshooting. What should I find there?

-Enabled detailed debugging using LIBCAMERA_LOG_LEVELS=*:DEBUG.

Where is this debug log?

-Verified hardware by testing with Qcam.

If you want help, you have to try the suggestions and provide the information that is asked for. Since I do not have the hardware to test and reproduce this myself, I rely on the information from those that have the hardware. But if you cannot provide information to better understand the issue and see if it is different from the other failed to configure streams issue, I have to close those since this just consumes time without any progress.

@codermery
Copy link
Author

Hardware and Software Used

Device: Raspberry Pi 5
Camera: Raspberry Pi Camera Module 3
Operating Systems: Ubuntu 24.04 (64-bit) arm
Libcamera Version: v0.3.0
ROS 2 Version: Jazzy

Findings

Camera Not Detected on Ubuntu:
The "Available cameras" section is empty.
The error "Unable to acquire a Unicam instance" was encountered.
Camera Works Seamlessly on Raspbian:
The camera is detected, and image capture is successful.
The ROS 2 node runs without issues.

Driver Compatibility:
It was observed that camera drivers (especially Unicam) are not functioning correctly on Ubuntu.

The Raspberry Pi Camera Module 3 is not properly detected on Ubuntu, whereas it works seamlessly on Raspbian. This indicates a potential incompatibility with camera drivers or the libcamera configuration on Ubuntu.

LIBCANERA_LOG_LEVELS=*:DEBUG cam -l

[1:11:25.540318062] [5901] DEBUG IPAModule ipa_module.cpp:334 ipa_rpi_vc4.so: IPA module /usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so is signed
[1:11:25.540429339] [5901] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so'
[1:11:25.540470987] [5901]  INFO Camera camera_manager.cpp:313 libcamera v0.3.0
[1:11:25.540642060] [5904] DEBUG Camera camera_manager.cpp:69 Starting camera manager
[1:11:25.568831078] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media0
[1:11:25.570020219] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 10 missing dependencies
[1:11:25.573099571] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
[1:11:25.573152033] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rp1-cfe
[1:11:25.573346588] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media1
[1:11:25.573655327] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media1 due to 10 missing dependencies
[1:11:25.575633537] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found
[1:11:25.575648370] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media1: rp1-cfe
[1:11:25.575769092] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rpivid" created from /dev/media3
[1:11:25.575779444] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media3 due to 1 missing dependencies
[1:11:25.576069646] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media3 found
[1:11:25.576092034] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media3: rpivid
[1:11:25.576450699] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media2
[1:11:25.576489069] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media2 due to 9 missing dependencies
[1:11:25.576858363] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media4
[1:11:25.576922789] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media4 due to 9 missing dependencies
[1:11:25.579778716] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media2 found
[1:11:25.579868216] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media2: pispbe
[1:11:25.583751767] [5904] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media4 found
[1:11:25.583789174] [5904] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media4: pispbe
[1:11:25.584485355] [5904] DEBUG Camera camera_manager.cpp:134 Found registered pipeline handler 'rpi/vc4'
[1:11:25.584546762] [5904] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
[1:11:25.584554836] [5904] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
Available cameras:

~/ros2_ws$ ros2 run camera_ros camera_node

[1:07:20.248118571] [5694] DEBUG IPAModule ipa_module.cpp:334 ipa_rpi_vc4.so: IPA module /usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so is signed
[1:07:20.248228923] [5694] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so'
[1:07:20.279787433] [5694]  INFO Camera camera_manager.cpp:313 libcamera v0.3.0
[1:07:20.280057192] [5709] DEBUG Camera camera_manager.cpp:69 Starting camera manager
[1:07:20.306533728] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media0
[1:07:20.306835877] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 10 missing dependencies
[1:07:20.308694918] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
[1:07:20.308708622] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rp1-cfe
[1:07:20.308849844] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media1
[1:07:20.309106900] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media1 due to 10 missing dependencies
[1:07:20.310955589] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found
[1:07:20.310965126] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media1: rp1-cfe
[1:07:20.311068849] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rpivid" created from /dev/media3
[1:07:20.311078034] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media3 due to 1 missing dependencies
[1:07:20.311264034] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media3 found
[1:07:20.311272164] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media3: rpivid
[1:07:20.311386016] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media2
[1:07:20.311395905] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media2 due to 9 missing dependencies
[1:07:20.311512165] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media4
[1:07:20.311525128] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media4 due to 9 missing dependencies
[1:07:20.313136353] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media2 found
[1:07:20.313146279] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media2: pispbe
[1:07:20.314749134] [5709] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media4 found
[1:07:20.314760634] [5709] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media4: pispbe
[1:07:20.315274969] [5709] DEBUG Camera camera_manager.cpp:134 Found registered pipeline handler 'rpi/vc4'
[1:07:20.315333432] [5709] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
[1:07:20.315341821] [5709] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
terminate called after throwing an instance of 'std::runtime_error'
  what():  no cameras available
[ros2run]: Aborted

~/ros2_ws$ ros2 launch camera_ros camera.launch.py

[INFO] [launch]: All log files can be found below /home/pixbot/.ros/log/2024-11-30-10-40-33-695463-pixbot-desktop-5740
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container-1]: process started with pid [5758]
[component_container-1] [INFO] [1732952434.412683348] [camera_container]: Load Library: /home/pixbot/ros2_ws/install/camera_ros/lib/libcamera_component.so
[component_container-1] [INFO] [1732952434.526415786] [camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<camera::CameraNode>
[component_container-1] [INFO] [1732952434.526530490] [camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<camera::CameraNode>
[component_container-1] [1:07:52.938455688] [5758] DEBUG IPAModule ipa_module.cpp:334 ipa_rpi_vc4.so: IPA module /usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so is signed
[component_container-1] [1:07:52.938656466] [5758] DEBUG IPAManager ipa_manager.cpp:245 Loaded IPA module '/usr/local/lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so'
[component_container-1] [1:07:52.957544709] [5758]  INFO Camera camera_manager.cpp:313 libcamera v0.3.0
[component_container-1] [1:07:52.957843154] [5774] DEBUG Camera camera_manager.cpp:69 Starting camera manager
[component_container-1] [1:07:52.982661686] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media0
[component_container-1] [1:07:52.984111875] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media0 due to 10 missing dependencies
[component_container-1] [1:07:52.986655380] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found
[component_container-1] [1:07:52.986707713] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media0: rp1-cfe
[component_container-1] [1:07:52.986954899] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rp1-cfe" created from /dev/media1
[component_container-1] [1:07:52.987611456] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media1 due to 10 missing dependencies
[component_container-1] [1:07:52.990527925] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found
[component_container-1] [1:07:52.990592999] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media1: rp1-cfe
[component_container-1] [1:07:52.990921518] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "rpivid" created from /dev/media3
[component_container-1] [1:07:52.990964148] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media3 due to 1 missing dependencies
[component_container-1] [1:07:52.991720261] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media3 found
[component_container-1] [1:07:52.991784298] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media3: rpivid
[component_container-1] [1:07:52.992453633] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media2
[component_container-1] [1:07:52.992522373] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media2 due to 9 missing dependencies
[component_container-1] [1:07:52.993176282] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:230 New media device "pispbe" created from /dev/media4
[component_container-1] [1:07:52.993277245] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:96 Defer media device /dev/media4 due to 9 missing dependencies
[component_container-1] [1:07:52.997043531] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media2 found
[component_container-1] [1:07:52.997086938] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media2: pispbe
[component_container-1] [1:07:52.998927109] [5774] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media4 found
[component_container-1] [1:07:52.998950257] [5774] DEBUG DeviceEnumerator device_enumerator.cpp:258 Added device /dev/media4: pispbe
[component_container-1] [1:07:52.999594962] [5774] DEBUG Camera camera_manager.cpp:134 Found registered pipeline handler 'rpi/vc4'
[component_container-1] [1:07:52.999684203] [5774] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
[component_container-1] [1:07:52.999691110] [5774] DEBUG RPI vc4.cpp:178 Unable to acquire a Unicam instance
[component_container-1] [ERROR] [1732952434.625048527] [camera_container]: Component constructor threw an exception: no cameras available
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node '' of type 'camera::CameraNode' in container '/camera_container': Component constructor threw an exception: no cameras available
[component_container-1] [INFO] [1732952434.632353912] [camera_container]: Load Library: /opt/ros/jazzy/lib/libimage_view_nodes.so
[component_container-1] [INFO] [1732952434.745858572] [camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<image_view::DisparityViewNode>
[component_container-1] [INFO] [1732952434.745932924] [camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<image_view::ExtractImagesNode>
[component_container-1] [INFO] [1732952434.745946517] [camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<image_view::ImageSaverNode>
[component_container-1] [INFO] [1732952434.745959906] [camera_container]: Found class: rclcpp_components::NodeFactoryTemplate<image_view::ImageViewNode>
[component_container-1] [INFO] [1732952434.745972350] [camera_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<image_view::ImageViewNode>
[component_container-1] [INFO] [1732952434.765416372] [image_view_node]: Using transport "raw"
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/image_view_node' in container '/camera_container'
[component_container-1] QSocketNotifier: Can only be used with threads started with QThread

ls /dev/video*

/dev/video0   /dev/video14  /dev/video22  /dev/video28  /dev/video33  /dev/video5
/dev/video1   /dev/video15  /dev/video23  /dev/video29  /dev/video34  /dev/video6
/dev/video10  /dev/video19  /dev/video24  /dev/video3   /dev/video35  /dev/video7
/dev/video11  /dev/video2   /dev/video25  /dev/video30  /dev/video36  /dev/video8
/dev/video12  /dev/video20  /dev/video26  /dev/video31  /dev/video37  /dev/video9
/dev/video13  /dev/video21  /dev/video27  /dev/video32  /dev/video4

v4l2-ctl --list-devices

pispbe (platform:1000880000.pisp_be):
    /dev/video20
    /dev/video21
    /dev/video22
    /dev/video23
    /dev/video24
    /dev/video25
    /dev/video26
    /dev/video27
    /dev/video28
    /dev/video29
    /dev/video30
    /dev/video31
    /dev/video32
    /dev/video33
    /dev/video34
    /dev/video35
    /dev/video36
    /dev/video37
    /dev/media2
    /dev/media4
rp1-cfe (platform:1f00110000.csi):
    /dev/video8
    /dev/video9
    /dev/video10
    /dev/video11
    /dev/video12
    /dev/video13
    /dev/video14
    /dev/video15
    /dev/media0
rp1-cfe (platform:1f00128000.csi):
    /dev/video0
    /dev/video1
    /dev/video2
    /dev/video3
    /dev/video4
    /dev/video5
    /dev/video6
    /dev/video7
    /dev/media1
rpivid (platform:rpivid):
    /dev/video19
    /dev/media3

@christianrauch
Copy link
Owner

Your issue report is inconsistent.

Previously, you reported that the cameras were detected and only failed during the configuration viafailed to configure streams. Now you report that cameras are not detected no cameras available. You also report that the libcamera example cam does not detect the cameras. I don't see how the ROS node can help you with that. If the cameras are not detected because of configuration issues etc., then the ROS node cannot use them.

Please consider the Raspberry Pi documentation on how to set up the cameras.

Also, if ros2 run camera_ros camera_node already fails to detect cameras, why would the launch file ros2 launch camera_ros camera.launch.py help?

Please go back to the original issue of the configuration failure (failed to configure streams) and provide the debug information that was asked for.

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