Ask Your Question
2

usb_cam: [ERROR]Webcam: expected picture but didn't get it...

asked 2014-02-19 22:12:52 -0600

I'm trying to use rosrun usb_cam usb_cam_node to read my web camera, but it keeps returning error:

[ERROR] [1392890872.217213339]: Webcam: expected picture but didn't get it...

[ERROR] [1392890872.252854641]: Webcam: expected picture but didn't get it...

[ERROR] [1392890872.285282152]: Webcam: expected picture but didn't get it...

[ERROR] [1392890872.317282039]: Webcam: expected picture but didn't get it...

...

The camera works well when using guvcview

edit retag flag offensive close merge delete

Comments

I have the same errors. I guess it depends on pixel_format because if I do "rosparam set usb_cam/pixel_format yuyv" and then "rosrun usb_cam usb_cam_node" I get a constant amount of frames/sec with no errors but after that I can´t see the image well: Maybe a codification problem.

4LV4R0 gravatar image4LV4R0 ( 2014-02-19 22:39:22 -0600 )edit

@4LV4R0 yes. thanks for your advice, it is a format problem. Not quite sure about the frame rate problem, my image_view node works well on Ubuntu

lanyusea gravatar imagelanyusea ( 2014-02-19 22:58:47 -0600 )edit

2 Answers

Sort by » oldest newest most voted
9

answered 2014-02-19 22:54:59 -0600

Solved that problem.

I need to use rosparam set usb_cam/pixel_format yuyv before rosrun usb_cam usb_cam_node

The problem should be the color format.

Before:

[ INFO] [1392893303.485168904]: usb_cam pixel_format set to [mjpeg]

After:

[ INFO] [1392893336.088686109]: usb_cam pixel_format set to [yuyv]

Then I can see the video stream using rosrun image_view image_view image:=/usb_cam/image_raw

edit flag offensive delete link more

Comments

2

Or rosrun usb_cam usb_cam_node pixel_format:=yuyv

lucasw gravatar imagelucasw ( 2015-11-30 12:51:21 -0600 )edit
1

answered 2015-11-27 11:32:52 -0600

fatima gravatar image

hi i had a problem like this when i want to use roslaunch usb_cam-test.launch , so i did these : 1.rosdep update 2.sudo apt-get install ros-indigo-image-pipeline 3.rosdep install camera_calibration so after that exchange mjpeg with yuyv in launch file and then run : roslaunch usb_cam-test.launch now you should see your image goodluck

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: 2014-02-19 22:12:52 -0600

Seen: 4,495 times

Last updated: Nov 27 '15