Ask Your Question
1

wrong camera_info broadcasted with camera1394

asked 2011-05-20 00:14:35 -0500

raphael favier gravatar image

updated 2011-05-20 03:23:56 -0500

Hello,

I am trying to use the ~camera_info_url parameter of camera1394.

I created the following config file:

image_width: 1200
image_height: 1600
camera_name: 00b09d01009f01a2
distortion_model: plump_bob
binning_x: 0
binning_y: 0
camera_matrix:
  rows: 3
  cols: 3
  data: [390.0, 0.0, 616.0, 0.0, 390.0, 808.0, 0, 0, 1.0]
distortion_model: plumb_bob
distortion_coefficients:
  rows: 1
  cols: 5
  data: [0, 0, 0, 0, 0]
rectification_matrix:
  rows: 3
  cols: 3
  data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
  rows: 3
  cols: 4
  data: [390.0, 0.0, 616.0, 0.0 , 0.0, 390.0, 808.0, 0.0, 0, 0, 1.0, 0.0]

That I run using the following launch file:

<launch>
    <node pkg="camera1394" type="camera1394_node" name="ladybug" >
        <param name="guid" value="00b09d01009f01a2" />
        <param name="video_mode" value="1600x1200_mono8" />
        <param name="frame_id" value="ladybug0" />
        <param name="bayer_pattern" value="rggb" />
        <param name="auto_white_balance" value="2" />
        <param name="camera_info_url" value="package://mojo_camera/ladybug0_config.yaml" />
    </node>

    <node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" />

    <node pkg="image_view" type="image_view" name="image_view" >
        <remap from="image" to="camera/image_color" />
    </node>
</launch>

My problem is that when I try to print the camera_info messages sent by camera1394 I get the default null ones:

header: 
  seq: 80
  stamp: 
    secs: 1305893240
    nsecs: 937414885
  frame_id: /ladybug0
height: 1200
width: 1600
distortion_model: ''
D: []
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

I tried to inspire from the example of the tests folder of camera1394 and I can't seem to get my mistake. Would anyone know what I do wrong here?

Thanks in advance

Raph

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-05-20 00:21:39 -0500

Eric Perko gravatar image

Your camera info message needs to have the same resolution as your camera is set to. Your camera_info has a resolution of 1616x1232, but your camera is set to 1600x1200.

edit flag offensive delete link more

Comments

Hey Eric, I tried this one, but the message was still the same. :/
raphael favier gravatar imageraphael favier ( 2011-05-20 00:51:41 -0500 )edit
(I updated my question to show that)
raphael favier gravatar imageraphael favier ( 2011-05-20 03:24:19 -0500 )edit
Your camera_info file was set to 1232x1616, actually, and it's now 1200x1600, not 1600x1200. Or maybe they got switched when you were posting?
Ken gravatar imageKen ( 2011-05-20 03:31:30 -0500 )edit
mmmhhh indeed! My frame should be taller than wide, so I guess I need to set my resolution to 1200x1600. As you noticed, I mixed up between the config file and the launch file. I will change that an try when I'm backin the lab (+1 week). I hope it's that :) Thanks!
raphael favier gravatar imageraphael favier ( 2011-05-20 03:46:58 -0500 )edit

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: 2011-05-20 00:14:35 -0500

Seen: 327 times

Last updated: May 20 '11