Image topics for bagcreater and bagextractor utilities

361 views
Skip to first unread message

nicolas...@gmail.com

unread,
Oct 28, 2015, 1:28:07 PM10/28/15
to kalibr-users
Hello,

I am trying to use the bagcreater utility to generate the .bag file to calibrate a camera and IMU rig.

I set up my data directory as explained on this page (https://github.com/ethz-asl/kalibr/wiki/bag-format) and read this thread (https://groups.google.com/forum/#!topic/kalibr-users/dRoLkps0jWw) to get the timestamps right. Now the bagcreater seems to run correctly, although I find it surprising that it completes in only a few seconds and that the generated bag file is only a few megabytes (is it not supposed to contain all the images, i.e. about 500MB of data?).

However, when I try to extract camera and imu data from the bag file using bagextractor, I get the following exception:

Original exception was:
Traceback (most recent call last):
File "/var/kalibr-build/devel/bin/kalibr_bagextractor", line 5, in <module>
exec(fh.read())
File "<string>", line 46, in <module>
File "/var/kalibr-build/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_common/ImageDatasetReader.py", line 42, in __init__
raise RuntimeError("Could not find topic {0} in {1}.".format(imagetopic, self.bagfile))
RuntimeError: Could not find topic /cam0/image_raw in ~/Téléchargements/kalibr_calib_sequences/calib_imu2cam_5/imu2cam_5.bag.

If I try to extract only the IMU topic, I successfully get the IMU data back, but the image topic cannot be found. Of course, I get the same exception if I directly try to calibrate the camera/imu pose.

It feels like the bagcreator utility somehow fails to load the images and only includes the IMU data in the bag file. Any idea what could be wrong ?

In case it can be useful, I am using 1600x1200 grayscale images stored as PNG files.

mkling...@bostondynamics.com

unread,
Jan 26, 2017, 2:09:19 PM1/26/17
to kalibr-users
I have the same issue. Anybody have any ideas?

nicolas...@gmail.com

unread,
Jan 26, 2017, 3:23:43 PM1/26/17
to kalibr-users
I remember in the end I managed to get the toolbox working by using it on Ubuntu (I was originally trying to use it on Windows), and by fixing a few problems with the Python script. Sorry I cannot be more accurate, it was a long time ago ...

mkling...@bostondynamics.com

unread,
Jan 26, 2017, 4:13:28 PM1/26/17
to kalibr-users
For anyone who is interested, the problem is the way that the script parses the path to the folder. I had to add "/." to the end of my dataset path for it to properly parse the path.

b6091...@gmail.com

unread,
Oct 4, 2018, 5:59:21 AM10/4/18
to kalibr-users
I have the same problem.
Can anyone give me some suggestions?
Reply all
Reply to author
Forward
0 new messages