0
$\begingroup$

Rosanswers logo

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


Originally posted by BeLioN on ROS Answers with karma: 126 on 2013-04-17

Post score: 0


Original comments

Comment by liyun on 2020-08-14:
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

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Miquel Massot with karma: 1471 on 2013-04-18

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Miguel Prada with karma: 1071 on 2013-04-17

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.