ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi there,

I have had a similar error some time back and I decided to google for the right solution before posting my own question. Fortunately, I got the answer straight and simple from the following link:

ROS Answers

However, to simply state the solution here all you have to do is to set the parameter pixel_format to 'yuyv' from its default value of 'mjpeg'

This could be done in the terminal by executing the following line before executing the 'rosrun' command:

rosparam set /usb_cam/pixel_format yuyv

and then,

rosrun usb_cam usb_cam_node

I have used this with several webcam and it worked fine in all of them. You may even make a launch file with this parameter set to 'yuyv' so that you need not repeat the command everytime you run usb_cam_node.

Am sure this will work.

Good luck with your task to achieve.

Regards,