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

publishing calibration data with bag file

asked 2013-04-17 22:20:33 -0600

BeLioN gravatar image

Hi,

I recorded a bag file with a video sequence. The corresponding bag file does only contain the image_raw topic, as by the time I recorded the sequence I had not calibrated the camera yet.

Now I have calibrated the camera, and I would like to play the bag file and simultaneously publish the camera_info data so that, for example, I can undistort the images from the bag file using image_proc.

How can I start a publisher that only publishes the camera_info ? Or could I add this camera_info in some way to the pre-existing bag file ?

Thanks

edit retag flag offensive close merge delete

Comments

Hello! Have you complemented this function? I'm also meeting this problem. If you have solved this, may I please get your some reference? Thank you

liyun gravatar image liyun  ( 2020-08-14 03:44:18 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-04-18 22:36:46 -0600

Miquel Massot gravatar image

Hi BeLioN,

please take a look at our image_sequence_publisher where we publish images as a ros topic, while we read a yaml file and publish it as calibration for a "fake" camera.

You could take part of our code to make a node that publishes your calibration info in the correct topic.

edit flag offensive delete link more
2

answered 2013-04-17 22:33:20 -0600

Miguel Prada gravatar image

There's always the option of manually running a publisher using the rostopic command line tool while replaying the bag file, but I think this will probably turn out to be too cumbersome.

Adding the CameraInfo messages to the bag file is probably a more convenient solution. You can add them to the existing bag quite easily by using the rosbag API. The examples in the rosbag Cookbook will probably help you find out how.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-17 22:20:33 -0600

Seen: 2,304 times

Last updated: Apr 18 '13