[ros-users] Problems with viewing a USB camera feed in RVIZ

Bill Morris morris at ee.ccny.cuny.edu
Fri Jul 2 11:59:59 UTC 2010


On Fri, 2010-07-02 at 13:27 +0200, Benoit Larochelle wrote: 
> Hello,
>  
> I'm trying to set-up RVIZ so that I can view the feed from my USB
> camera. I am using the usb_cam package to produce the feed, but RVIZ
> seems to have a few problems reading it. I set-up the Fixed Frame
> to /head_camera, and Image Topic to /usb_cam/image_raw.
>  
> 1) I get a global warning: No tf data. Actual error: Fixed Frame
> [/head_camera does not exist]. I don't know exactly what transforms
> and frames are, I just want to see my camera image (in RVIZ).

A frame is a coordinate frame, in this case the local coordinate frame
of the camera and the world coordinate frame. tf is the transform that
allows points to be mapped from one to the other.

This should explain it.
http://www.ros.org/wiki/tf/Tutorials/Introduction%20to%20tf

A static transform needs to be published between the world coordinate
from and the camera frame.  You also need to set the frame in rviz to be
same as the one that was set in usb_cam.
In the launch file camera_frame_id defaults to /camera.
<param name="camera_frame_id" value="/camera"/>
Rviz defaults to /head_camera which is probably confusing things.

>  
> 2) In the Camera section, I get a Status Error, under CameraInfo:
> CameraInfo/P resulted in an invalid position calculation (nans or
> infs)

Rviz needs a calibration matrix to process the image so that other
sensor data can be displayed on top of the image. If you had a laser it
could be configured to be displayed over the image.

>  
> 3) After 15 minutes or so, RVIZ crashes with the error
> message: /opt/ros/boxturtle/ros/bin/rosrun: line 35: 304 Killed
> $exepath "$@" (before lunch, I started RVIZ and image_view and when I
> came back RVIZ had crashed and image_view was still going)

It's hard to say why it is crashing. Try a lower frame rate to see if it
is a buffer problem.

>  
> 4) The image is much darker than with the package image_view

This is due to the alpha setting so that you can see other sensor
information in the same window.






More information about the ros-users mailing list