I have try to calibrate imu and camera using the kaliber package.
The issue is the when we run got the error, but first we can try the the demo file given by the dynamic.bag file so its work fine.
I have used this command
" kalibr_calibrate_imu_camera --target april_6x6_1.yaml --cam camchain-Kalibr_data_2.yaml --imu imu_data_2.yaml --bag Kalibr_data_2.bag --bag-from-to 5 165 "
the the log is
importing libraries
Initializing IMUs:
Update rate: 100.0
Accelerometer:
Noise density: 0.01
Noise density (discrete): 0.1
Random walk: 0.0002
Gyroscope:
Noise density: 0.005
Noise density (discrete): 0.05
Random walk: 4e-06
Initializing imu rosbag dataset reader:
Dataset: Kalibr_data_2.bag
Topic: /android/imu
Traceback (most recent call last):
File "/home/vishal/Desktop/ros_wk/devel/bin/kalibr_calibrate_imu_camera", line 15, in <module>
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 236, in <module>
main()
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 151, in main
estimateTimedelay=parsed.estimate_imu_delay) )
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py", line 592, in __init__
parsed.bag_from_to, parsed.perform_synchronization)
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py", line 33, in initImuBagDataset
perform_synchronization=perform_synchronization)
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_common/ImuDatasetReader.py", line 44, in __init__
self.indices = self. sortByTime(self.indices)
File "/home/vishal/Desktop/ros_wk/src/kalibr-master/aslam_offline_calibration/kalibr/python/kalibr_common/ImuDatasetReader.py", line 55, in sortByTime
topic, data, stamp = self.bag._read_message(self.index[idx].position)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 989, in _read_message
return self._reader.seek_and_read_message_data_record(position, raw)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 2478, in seek_and_read_message_data_record
msg_type = _get_message_type(connection_info)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbag/bag.py", line 1574, in _get_message_type
message_type = genpy.dynamic.generate_dynamic(info.datatype, info.msg_def)[info.datatype]
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/dynamic.py", line 159, in generate_dynamic
for line in msg_generator(msg_context, spec, search_path):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/generator.py", line 807, in msg_generator
genmsg.msg_loader.load_depends(msg_context, spec, search_path)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/msg_loader.py", line 349, in load_depends
return load_msg_depends(msg_context, spec, msg_search_path)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/msg_loader.py", line 318, in load_msg_depends
depspec = load_msg_by_type(msg_context, resolved_type, search_path)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/msg_loader.py", line 125, in load_msg_by_type
file_path = get_msg_file(package_name, base_type, search_path)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genmsg/msg_loader.py", line 84, in get_msg_file
% (base_type, package, search_path), base_type, package, search_path)
genmsg.msg_loader.MsgNotFound: Cannot locate message [Header]: unknown package [std_msgs] on search path [{}]
the files are like
1 : april_6x6_1.yaml
#example for aprilgrid
target_type: 'aprilgrid' #gridtype
tagCols: 6 #number of apriltags
tagRows: 6 #number of apriltags
tagSize: 0.024 #size of apriltag, edge to edge [m]
tagSpacing: 0.3125 #ratio of space between tags to tagSize
I have try to calibrate imu and camera using the kaliber package. The issue is the when we run got the error, but first we can try the the demo file given by the dynamic.bag file so its work fine. I have used this command " kalibr_calibrate_imu_camera --target april_6x6_1.yaml --cam camchain-Kalibr_data_2.yaml --imu imu_data_2.yaml --bag Kalibr_data_2.bag --bag-from-to 5 165 "
the the log is
the files are like 1 : april_6x6_1.yaml
2 : camchain-Kalibr_data_2.yaml
3: imu_data_2.yaml
4: info Kalibr_data_2.bag
thanks in advance