Ask Your Question
1

No JPEG data found in image

asked 2016-03-19 17:01:58 -0500

dmc.2 gravatar image

I am currently running ROS on VirtualBox.

After running

$roslaunch usb_cam usb_cam.launch

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://dd-VirtualBox:46806/

SUMMARY

PARAMETERS
 * /image_view/autosize: True
 * /rosdistro: jade
 * /rosversion: 1.11.16
 * /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: mjpeg
 * /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

core service [/rosout] found
process[usb_cam-1]: started with pid [12458]
process[image_view-2]: started with pid [12459]
[ INFO] [1458424521.435064169]: Using transport "raw"
[ INFO] [1458424522.048799115]: using default calibration URL
[ INFO] [1458424522.048959018]: camera calibration URL: file:///home/dd/.ros/camera_info/head_camera.yaml
[ INFO] [1458424522.049046985]: Unable to open camera calibration file         [/home/dd/.ros/camera_info/head_camera.yaml]
[ WARN] [1458424522.049151010]: Camera calibration file /home/dd/.ros/camera_info/head_camera.yaml not     found.
[ INFO] [1458424522.049205844]: Starting 'head_camera' (/dev/video0) at 640x480 via mmap (mjpeg) at 30 FPS
[mjpeg @ 0xeecda0] No JPEG data found in image
[ERROR] [1458424524.182962976]: Error while decoding frame.
[mjpeg @ 0xeecda0] No JPEG data found in image
[ERROR] [1458424525.317354585]: Error while decoding frame.
[mjpeg @ 0xeecda0] No JPEG data found in image
[ERROR] [1458424525.449446779]: Error while decoding frame.
[mjpeg @ 0xeecda0] No JPEG data found in image
[ERROR] [1458424525.986624168]: Error while decoding frame.
[mjpeg @ 0xeecda0] No JPEG data found in image
[ERROR] [1458424526.986550516]: Error while decoding frame.
^C[image_view-2] killing on exit
[usb_cam-1] killing on exit
[mjpeg @ 0xeecda0] No JPEG data found in image
shutting down processing monitor...
... shutting down processing monitor complete
done

The webcam lights up but it seems no image is found. I have followed the instructions here http://askubuntu.com/questions/4875/u... and using lsusb shows the camera.

Am I missing a driver?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2017-04-27 20:03:18 -0500

burtbick gravatar image

I had the same error with Indigo and the usb_cam driver when using an inexpensive Chinese webcam. The webcam worked fine with other applications, but not with the launch file from ROS by example volume 1 for the Vision examples. What I found in my case was that the pixel_format had to change from mjpeg in the original launch file to yuyv.

After I made that change the webcam is working fine.

Note that I had MSoft LifeCam 3000 that I was also testing with and that camera worked OK with the pixel_format set to mjpeg.

Hope this helps someone in the future.

edit flag offensive delete link more

Comments

Worked for me. Thanks!

arminf82 gravatar imagearminf82 ( 2019-09-24 20:48:19 -0500 )edit
0

answered 2016-09-14 09:22:25 -0500

toddwf gravatar image

I'm having this same issue.

BUT I have proof that the camera works in the VM. When I fire up the Ubuntu supplied "Cheese Webcam Booth" -- a default app, the camera is immediately found and loaded and I can see video. The webcam light is on.

When I fire up roslaunch usb_cam usb_cam-test.launch, I get a blank window / canvas with this output including one error:

roslaunch usb_cam usb_cam-test.launch ... logging to /home/viki/.ros/log/aef5a52e-7a84-11e6-b5cb-080027f2ec76/roslaunch-c3po-5015.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://0.0.0.0:57553/

SUMMARY

PARAMETERS * /image_view/autosize: True * /rosdistro: indigo * /rosversion: 1.11.16 * /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://0.0.0.0:11311

core service [/rosout] found ERROR: cannot launch node of type [usb_cam/usb_cam_node]: can't locate node [usb_cam_node] in package [usb_cam] process[image_view-2]: started with pid [5033] Any ideas?

edit flag offensive delete link more

Comments

oops... forgot to issue "catkin_make" after cloning usb_cam package. That fixed it.

toddwf gravatar imagetoddwf ( 2016-09-14 09:34:30 -0500 )edit
0

answered 2016-06-16 16:56:25 -0500

ff gravatar image

i have the same problem, but I am not running on a VM. I am using ROS Kinetic. Did you find a solution ?

edit flag offensive delete link more

Comments

1

After running it on a linux machine, I ended up not getting this error. I believe I was getting the error b/c the VM wasn't connecting to the camera correctly.

dmc.2 gravatar imagedmc.2 ( 2016-06-16 17:23:41 -0500 )edit

I seem to have a similar issue. ROS kinetic on ubuntu 16.04 VM the camera may connect under mjpeg settings, but image_viewer shows delayed images with incomplete image. In contrast, 16.04 + kinetic on a dedicated boot works no problem. I would dual boot my second computer to confirm this.

evzdfx gravatar imageevzdfx ( 2017-05-08 17:38:29 -0500 )edit
0

answered 2018-01-11 20:30:02 -0500

Dragon Qu gravatar image

updated 2018-01-11 21:19:21 -0500

jayess gravatar image

reset parameter video_device , try between'/dev/video1 /dev/video0 , there should be one works for you.

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

Stats

Asked: 2016-03-19 17:01:58 -0500

Seen: 4,216 times

Last updated: Jan 11 '18