ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

camera _pose_ calibration issue - tf missing from MY camera driver?

asked 2013-03-04 16:01:37 -0500

mblanton gravatar image

updated 2013-03-05 05:29:24 -0500

PLEASE SKIP TO THE UPDATE AT THE END OF THIS QUESTION

I would like to post an image of my problem, but my karma is not above 20 :( So here goes...

***Background info and details (hopefully detailed enough)***

ROS Electric, Ubuntu 11.04

I am attempting to run the camera_pose_calibration on two cameras:

camera1 is a Kinect (using /camera/rgb namespace); camera2 is a flir thermal camera (note: the drive is custom for this camera) that is 336x256 pixels (image has been thresholded so appears binary - only 0's and 255's). The images generated by the flir driver are initially compressed png's, but I republish them in my launch file with the following line so they can be used by image_proc:

node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/flir_camera/image_enhanced raw out:=/flir_camera/image_raw"

The flir camera topic (image_rect) is generated from the command line with image_proc:
$ ROS_NAMESPACE=flir_camera rosrun image_proc image_proc

The camera topics, /camera_info and /image_rect, for both the Kinect and the flir have the correct data being published, and seem to be publishing at acceptable rates:


Kinect publishing rates:

$ rostopic hz /camera/rgb/features

subscribed to [/camera/rgb/features]

average rate: 15.018 min: 0.039s max: 0.115s std dev: 0.01742s window: 14

average rate: 14.942 min: 0.037s max: 0.115s std dev: 0.01621s window: 29

average rate: 15.005 min: 0.036s max: 0.115s std dev: 0.01560s window: 44

$ rostopic hz /camera/rgb/image_rect

subscribed to [/camera/rgb/image_rect]

average rate: 30.097 min: 0.030s max: 0.038s std dev: 0.00193s window: 29

average rate: 30.040 min: 0.025s max: 0.039s std dev: 0.00239s window: 59

average rate: 30.027 min: 0.025s max: 0.039s std dev: 0.00239s window: 89

$ rostopic hz /camera/rgb/camera_info

subscribed to [/camera/rgb/camera_info]

average rate: 30.082 min: 0.029s max: 0.039s std dev: 0.00210s window: 30

average rate: 30.036 min: 0.029s max: 0.039s std dev: 0.00200s window: 60

average rate: 30.021 min: 0.029s max: 0.039s std dev: 0.00198s window: 90


Flir camera publishing rates:

$ rostopic hz /flir_camera/features

subscribed to [/flir_camera/features]

average rate: 17.292 min: 0.049s max: 0.069s std dev: 0.00800s window: 16

average rate: 16.457 min: 0.043s max: 0.085s std dev: 0.01044s window: 32

average rate: 16.381 min: 0.043s max: 0.085s std dev: 0.01033s window: 48

average rate: 16.312 min: 0.043s max: 0.085s std dev: 0.01034s window: 53

$ rostopic hz /flir_camera/image_rect

subscribed to [/flir_camera/image_rect]

average rate: 46.717 min: 0.013s max: 0.051s std dev: 0.00737s window: 47

average rate: 48.287 min: 0.013s max: 0.051s std dev: 0.00680s window: 96

average rate: 48.920 min: 0.013s max: 0.051s std dev: 0.00671s window: 147

$ rostopic hz /fliramera/camera_info

subscribed ...

(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-03-05 05:30:42 -0500

mblanton gravatar image

updated 2013-03-05 05:39:22 -0500

The primary issue was a missing time stamp from the header of the flir_camera image (it was always 0). Once that was set correctly, and synced with the camera_info message, then the camera_pose_calibration had no problems.

edit flag offensive delete link more
1

answered 2013-03-05 02:03:12 -0500

Claudio gravatar image

updated 2013-03-05 02:06:16 -0500

node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 camera_link flir_camera_frame 100"

I think this should read something like this

node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="x y z r p y world flir_camera_frame 10"

What you need (apparently) is the transform from the world to the camera frame that depicts the camera position and orientation.

Most probably it will not be the same as the kinect (they are not coaxial, are they?) so you'll need a specific publisher just like above.

In this and future cases, when you think you have a tf problem, run the following command

$ rosrun tf view_frames ; evince frames.pdf

this will listen to all the published transforms for 5 seconds, and produce a pdf with all the links depicted graphically.

On a side note: I noticed that in my case sometimes it takes a number of executions before all the transformations are piked up correctly. Meaning that after just one run it may appear you have unconnected links, while in reality the tfs are there.

Anyway what you should have is a tree: one origin (the world) and everything else connected to it.

Also to check tfs in realtime you can run

$ rosrun tf tf_monitor
edit flag offensive delete link more

Comments

Thank you for the reply, I will update the tf static publisher to correctly reflect the position of the camera. I was able to get the camera_pose_calibration to process the flir_camera image. It was an issue with the time stamps.

mblanton gravatar image mblanton  ( 2013-03-05 05:25:16 -0500 )edit

Question Tools

Stats

Asked: 2013-03-04 16:01:37 -0500

Seen: 315 times

Last updated: Mar 05 '13