You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Description
When attempting to run the usb_cam_node with a /dev/video device without the necessary permissions, the node fails and crashes. The problem lies in the error handling, as the exception is not adequately handled, resulting in a vague error message.
Current Behavior
The current log output when starting the node without proper permission is as follows:
❯ ros2 run usb_cam usb_cam_node_exe
[INFO] [1698243801.072328729] [usb_cam]: camera_name value: default_cam
[WARN] [1698243801.072534313] [usb_cam]: framerate: 30.000000
[INFO] [1698243801.073781020] [usb_cam]: using default calibration URL
[INFO] [1698243801.073798354] [usb_cam]: camera calibration URL: file:///home/vm/.ros/camera_info/default_cam.yaml
[ERROR] [1698243801.073881770] [camera_calibration_parsers]: Unable to open camera calibration file [/home/vm/.ros/camera_info/default_cam.yaml]
[WARN] [1698243801.073921020] [usb_cam]: Camera calibration file /home/vm/.ros/camera_info/default_cam.yaml not found
[INFO] [1698243801.073936645] [usb_cam]: Starting 'default_cam' (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS
terminate called after throwing an instance of 'char*'
[ros2run]: Aborted
Proposed Solution Notice: I am not a skilled c++ Developer, so I might be wrong
It appears that a potential solution could involve modifying the usb_cam_node.cpp file. Specifically, you might consider adding a try-catch block around the code segment between line 148 and 156. This try-catch block should provide a more informative error message for cases where proper permissions are lacking.
The text was updated successfully, but these errors were encountered:
Issue Description
When attempting to run the usb_cam_node with a /dev/video device without the necessary permissions, the node fails and crashes. The problem lies in the error handling, as the exception is not adequately handled, resulting in a vague error message.
Current Behavior
The current log output when starting the node without proper permission is as follows:
Proposed Solution
Notice: I am not a skilled c++ Developer, so I might be wrong
It appears that a potential solution could involve modifying the usb_cam_node.cpp file. Specifically, you might consider adding a try-catch block around the code segment between line 148 and 156. This try-catch block should provide a more informative error message for cases where proper permissions are lacking.
The text was updated successfully, but these errors were encountered: