Rosanswers logo

Hello, I am new to ROS. I have been trying to do usb camera integration into a robotics project at our university's lab. I will write the steps i did and the errors that i got.

  1. I went into my ~/catkin_ws/src folder and i ran

    git clone https://github.com/bosch-ros-pkg/usb_cam

  2. Then I went into my ~/catkin_ws folder and ran

    source /devel/setup.bash

  3. Then I ran


  4. Then I ran

    roslaunch usb_cam usb_cam-test.launch

  5. This was the output ... logging to /home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/roslaunch-submetu-9724.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://submetu:40095/



  • /image_view/autosize: True
  • /rosdistro: kinetic
  • /rosversion: 1.12.2
  • /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)


core service [/rosout] found process[usb_cam-1]: started with pid [9742] ERROR: cannot launch node of type [image_view/image_view]: can't locate node [image_view] in package [image_view] [ INFO] [1469813059.142822397]: using default calibration URL [ INFO] [1469813059.142904972]: camera calibration URL: file:///home/submetu/.ros/camera_info/head_camera.yaml [ INFO] [1469813059.142970068]: Unable to open camera calibration file [/home/submetu/.ros/camera_info/head_camera.yaml] [ WARN] [1469813059.142995991]: Camera calibration file /home/submetu/.ros/camera_info/head_camera.yaml not found. [ INFO] [1469813059.143027047]: Starting 'head_camera' (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS [ERROR] [1469813064.141746901]: VIDIOC_S_FMT error 5, Input/output error terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::lock_error >' what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument [usb_cam-1] process has died [pid 9742, exit code -6, cmd /home/submetu/catkin_ws/devel/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/usb_cam-1.log]. log file: /home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/usb_cam-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done

I tried the tutorial of http://wiki.ros.org/camera_calibration , but I am not getting any camera output because the above error comes everytime. So I cant calibrate i.e. i cant get the head_camera.yaml file. I looked at many tutorials but I could not find anything helpful to me.

Please help :(

Thank you in advance (im using a lenovo thinkpad e440 with ubuntu. My camera is a logitech camera(it is connected as cheese is giving video output))

Originally posted by submetu on ROS Answers with karma: 46 on 2016-07-29

Post score: 0


1 Answer 1


Rosanswers logo

I solved this problem by installing Ubuntu 12.04 and ROS indigo. Apparently usb_cam package is not working on ROS kinetic. Also ROS indigo doesn't work on Ubuntu 16.04 so I had to downgrade to 12.04 for that.

I'm still getting calibration errors but there are online tutorials to calibrate it. I'm getting video output now on Rviz so i can calibrate it.

Originally posted by submetu with karma: 46 on 2016-07-31

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Horse-man on 2016-08-01:
Hi! no need for downgrading, usb_cam hadn't been added to ROS Kinetic repositories yet, but you can install it from source by following the step-by-step commands as described here.

Comment by submetu on 2016-08-02:
Hi, the installation was not a problem. It installed just fine. I was receiving errors when i ran rosrun usb_cam usb_cam_node or the roslaunch usb_cam usb_cam-test.launch commands. The system would quit after giving a bunch of errors. I listed the errors above in my question.

Comment by Horse-man on 2016-08-02:
I see. I submitted an issue in their repository once asking them to fix the compatibility with Kinetic, but they didn't fix anything.

Comment by submetu on 2016-08-02:
fingers crossed :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.