ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.37k stars 1.4k forks source link

question about csv modification #406

Closed huanhexiao closed 2 years ago

huanhexiao commented 3 years ago

hi guys, i want to use my own imu0.csv to creat bag via "kalibr_bagcreater --folder ", it shows error:


importing libraries Traceback (most recent call last): File "/home/huanhexiao/WORK/Tools/OpenSource_Tools/Kalibr/devel/bin/kalibr_bagcreater", line 15, in exec(compile(fh.read(), python_script, 'exec'), context) File "/home/huanhexiao/WORK/Tools/OpenSource_Tools/Kalibr/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_bagcreater", line 124, in bag.close() File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 415, in close self._stop_writing() File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1264, in _stop_writing self.flush() File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 285, in flush self._stop_writing_chunk() File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1330, in _stop_writing_chunk self._write_connection_index_record(connection_id, entries) File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1403, in _write_connection_index_record buffer.write(_pack_time (entry.time)) File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1601, in _pack_time def _pack_time(v): return _pack_uint32(v.secs) + _pack_uint32(v.nsecs) File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1599, in _pack_uint32 def _pack_uint32(v): return struct.pack('<L', v) struct.error: 'L' format requires 0 <= number <= 4294967295


could anyone do me a favour?

goldbattle commented 2 years ago

Can you please provide the csv and data which has the above issues?

vswdigitall commented 2 years ago

I have same error. Have recorded 1407 png frames with 60 fps and mpu9250 gyro and accel data. Bag file created but with same error. After rosbag reindex data.bag i can see images in rviz. But imu data can't.

image1

image2

vswdigitall commented 2 years ago

Should be imu0 timestamps same as image file names and imu0.csv lines equal files number? Or ros will sync them in runtime?

vswdigitall commented 2 years ago

Fixed. It was bad image filename. image3 At the bottom, selected line.

Wanghy118 commented 2 years ago

hi, i met the same problem ,that "struct.error : integer out of range for L format code", could you help me ?

vswdigitall commented 2 years ago

First you can check all timestamps has same length. In imu.csv and png file names.