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

Problem with Logitech C270 webcam and Usb_cam

asked 2018-04-11 10:54:34 -0500

Malatesta gravatar image

Hi everyone, I'm new in ROS and I'm triying to use "usb_cam" for recieve images from a Logitech C270 webcam, but I have a problem with the visualizer "image_view".

I can connect with the webcam using "rosrun usb_cam usb_cam_node" but when I want to see the visualizer using "rosrun image_view image_view image:=/usb_cam/image_raw", I only see a green image from the webcam. Also, I tried to visualizing the webcam images with rqt_image_view and I can see the same.

With others programs or apps in Ubuntu the image webcam it's succesfully, but in ROS I can't use the webcam without see a green image.

I've read in this forum and I've tried a lot of options for resolve my problem and I couldn't do it. For this motive, I write this post and I wonder... What's my problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-11 19:06:16 -0500

lucasw gravatar image

The default parameters for usb_cam are unlikely to work, you'll need to discover them and then have a rosrun like:

rosrun usb_cam usb_cam_node _image_width:=1280 _image_height:=720 _framerate:=15 _video_device:=/dev/video0 _pixel_format:=mjpeg

You can use guvcview to determine working resolutions and formats, or a command line like

v4l2-ctl --device=0 --list-formats-ext

I've written this up here (and a lot of other related ros webcam tips):

edit flag offensive delete link more


Hi Lucasw, thanks for your response. I'm going to try this and find the parameters of my webcam to repeat the whole process.

Malatesta gravatar image Malatesta  ( 2018-04-13 02:45:36 -0500 )edit

Hi Malatesta, did you solve the problem? tell me please becouse I'll buy this camera and use it with ros.

nana gravatar image nana  ( 2018-09-08 02:42:56 -0500 )edit

I couldn't solve the problem and I used another camera, but it's possible my camera didn't work correctly. You can try it with your new logitech.

Malatesta gravatar image Malatesta  ( 2018-09-19 13:18:51 -0500 )edit

Question Tools

1 follower


Asked: 2018-04-11 10:54:34 -0500

Seen: 1,762 times

Last updated: Apr 11 '18