How do you configure uvc_camera?
I'm trying to get my camera_node working, and it doesn't seem to be taking the parameters given into account at all.
My launch file (excerpt):
<group ns="lifecam"> <node name="lifecam" pkg="uvc_camera" type="camera_node" output="screen"> </node> </group>
Output from rostopic echo /lifecam/camera_info
header: seq: 463 stamp: secs: 1303400952 nsecs: 715715842 frame_id: camera height: 480 width: 640 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 ---
Clearly the calibration data is not being read (thus a bunch of zeros in the camera_info message), and the width/height parameters are the defaults, not the values I set them to.
I'm not sure what I'm doing wrong here: I can view the image stream in rviz, but rviz will complain about NaNs and infs in the calibration data (since it's not being read). Help would be greatly appreciated.
lifecam.yaml
$ cat rover/lifecam.yaml --- image_width: 640 image_height: 480 camera_name: camera camera_matrix: rows: 3 cols: 3 data: [661.285, 0, 391.756, 0, 650.523, 205.652, 0, 0, 1] distortion_model: plumb_bob distortion_coefficients: rows: 1 cols: 5 data: [0.125743, 0.237875, -0.0083126, 0.0506531, 0] rectification_matrix: rows: 3 cols: 3 data: [1, 0, 0, 0, 1, 0, 0, 0, 1] projection_matrix: rows: 3 cols: 4 data: [661.285, 0, 391.756, 0, 0, 650.523, 205.652, 0, 0, 0, 1, 0]
I just updated the above data as per Markus Bader's recommendations - doesn't seem to have worked. The camera was recalibrated, and it appears that it is certainly not reading the params set: when set_camera_info is called, it saves the data into /tmp/calibration.yaml, not the file set in the launchfile. Thanks for all the help!
-- EDIT -- This seems to be some sort of a weird rosparam problem - I just tried to set the parameters by editing the defaults in /opt/ros/diamondback/stacks/camera_umd/uvc_camera/src/camera.cpp, and calibration data and everything work from there.