[ros-users] ar_pose basic questions

Bill Morris morris at ee.ccny.cuny.edu
Wed Dec 22 08:40:48 UTC 2010


On Tue, 2010-12-21 at 23:46 -0800, Prasad Dixit wrote: 
> Hello Bill,
> 
> I have two cameras, laptop default and uvc: webcam Logitech pro 9000 (Auto
> focus is off)
> I enabled uvc and calibrated camera using 8x6 --square 0.108 mm chessboard.
> It automatically sets the resolution 1600 X 1200 pxl. I did not find a way
> to change it. 
> 
> In  usb_cam_nose.cpp It is mentioned as, 
>    node_.param("image_width", image_width_, 640);
>     node_.param("image_height", image_height_, 480);

Try something like this

<launch>
  <node name="camera" pkg="usb_cam" type="usb_cam_node" respawn="false"
output="
screen">
    <param name="video_device" value="/dev/video0"/>
    <param name="io_method" value="mmap"/>
    <param name="image_width" value="640"/>
    <param name="image_height" value="480"/>
    <param name="pixel_format" value="yuyv"/>
  </node>
</launch>

as the launch file to start usb_cam.

> 
> then it asked for the file with the autogenerated name as
> v046Dp0990d0008dcEFdsc02dp01ic0Eisc01ip00_01604D55_640x480.yaml

It checks to see if that file exists, if it doesn't it's fine just run
camera calibration and when you write the configuration it will store it
to that file name.

> I created the same name file with below calib parameters:
> 
> image_width: 1600
> image_height: 1200
> camera_name: camera
> camera_matrix:
>   rows: 3
>   cols: 3
>   data: [1386.75, 0, 851.704, 0, 1386.18, 572.83, 0, 0, 1]
> distortion_coefficients:
>   rows: 1
>   cols: 5
>   data: [0.072094, -0.133644, -0.001888, 0.006912, 0]
> rectification_matrix:
>   rows: 3
>   cols: 3
>   data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
> projection_matrix:
>   rows: 3
>   cols: 4
>   data: [1386.75, 0, 851.704, 0, 0, 1386.18, 572.83, 0, 0, 0, 1, 0]
> 
> It works well with image_proc or simple image show. but, /camera topic is
> published and not display anything in rviz even after camera_info is being
> generated which i checked using rostopic echo.
> 
> No CameraInfo received on [/usb_cam/camera_info].  Topic may not exist.
> > Image: No image received.
> > Transform [Sender=/usb_cam] = For frame [camera]: Frame [camera] does not
> > exist 

Whats the output of 'rostopic list'?

> 
> I tried to change the parameter of usb_cam_node.cpp from 640 X 480 to 1600 X
> 1200 and created new file named
> v046Dp0990d0008dcEFdsc02dp01ic0Eisc01ip00_01604D55_1600x1200.yaml with the
> same above parameters.
> 
> When i run ar_pose with below launch file, i get same output in rviz as
> above along with error messages from one of the codes:
> "outbuf size mismatch.  pic_size: %d bufsize: %d\n",pic_size
> 
> Am i going wrong somewhere?
> Is this a right approach to configure ar_pose and usb_cam?

You could try uvc_cam, ar_pose should work with any image source that
has calibration information. 
> 
> Thanks,
> - Prasad
> 


-Bill




More information about the ros-users mailing list