ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
2

usb_cam Error Camera not showing (Process has died)

asked 2020-08-02 16:27:48 -0600

LeandroPonce gravatar image

Hi, im trying to run the usb_cam package on Melodic 1.14.6 on Ubuntu16.04.04. When trying to run roslaunch usb_cam usb_cam-test.launch

I get an error:

leandro@ubuntu:~/catkin_ws$ roslaunch usb_cam usb_cam-test.launch ... logging to /home/leandro/.ros/log/0afd93ce-d4fc-11ea-88bd-000c29972dcb/roslaunch-ubuntu-14071.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:42245/

SUMMARY

PARAMETERS

  • /image_view/autosize: True
  • /rosdistro: melodic
  • /rosversion: 1.14.6
  • /usb_cam/camera_frame_id: usb_cam
  • /usb_cam/image_height: 480
  • /usb_cam/image_width: 640
  • /usb_cam/io_method: mmap
  • /usb_cam/pixel_format: yuyv
  • /usb_cam/video_device: /dev/video0

NODES / image_view (image_view/image_view) usb_cam (usb_cam/usb_cam_node)

ROS_MASTER_URI=http://localhost:11311

process[usb_cam-1]: started with pid [14086]

process[image_view-2]: started with pid [14087]

[usb_cam-1] process has died [pid 14086, exit code 1, cmd /home/leandro/catkin_ws/devel/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/leandro/.ros/log/0afd93ce-d4fc-11ea-88bd-000c29972dcb/usb_cam-1.log]. log file: /home/leandro/.ros/log/0afd93ce-d4fc-11ea-88bd-000c29972dcb/usb_cam-1*.log

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-07-11 12:24:23 -0600

Vimanyu Veer gravatar image

I got the same error whilst using a VMware Machine with Ubunutu 18.04 Guest and ROS Melodic, along with a Lenovo FHD Webcam.

I resolved the issue by setting USB Compatibilty to USB 3.1 in VM Settings/USB Preferences.

Hope this helps someone.

edit flag offensive delete link more
0

answered 2022-06-20 03:00:49 -0600

MRWRWK gravatar image

updated 2022-06-20 03:03:30 -0600

In case anyone else is looking for the answer for a similar problem. usb_cam is great when it works but is terrible for debugging. In essence you need to debug the camera using system tools (lsusb to see if the camera is attached, dmesg | grep -i USB to see if there are any USB errors). Then see if any other program is able to use the camera (and not blocking it) and try to verify config parameters.

In my case the error was -11 and there were no log files! The reason was that device ID had changed. While previously the camera was /device/video0 then somehow it had become /device/video2. You can check the ID using v4l2-ctl --list-devices. Changing the video_device parameter to a new value in a launch file did the trick.

Also, I was using Ubuntu 20.04 and Noetic but the issue probably is not version dependent.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-08-02 16:27:48 -0600

Seen: 917 times

Last updated: Jun 20