独立 IMU 模块资料与测试 - HIT-K1928-LAB/HIT-K1928-wiki GitHub Wiki
WHEELTEC 超核惯导HI13R4产品资料
链接: https://pan.baidu.com/s/1ZlSfee8s-A6sy1107eEDYA
该 IMU 的频率测试
| 期望频率 | 实际频率 |
|---|---|
| 100 Hz | |
| 200 Hz | |
| 500 Hz | |
| 1000Hz |
可以看到,当期望频率在 100 Hz 和 200 Hz 时,IMU 的输出间隔十分均匀,但当期望频率为 500 Hz 和 1000 Hz 时,实际输出频率存在波动。
与飞控板上的 IMU 对比,该 IMU 的频率更稳定。
可视化脚本:
#!/usr/bin/env python
import rosbag
import matplotlib.pyplot as plt
from collections import defaultdict
from std_msgs.msg import Header
def visualize_rosbag_timestamps(bag_file):
"""
Visualize timestamps of all topics in a ROS bag file using msg.header.stamp.
"""
# Dictionary to store timestamps for each topic
topic_timestamps = defaultdict(list)
# Read the bag file
with rosbag.Bag(bag_file, 'r') as bag:
for topic, msg, t in bag.read_messages():
# Check if the message has a header with stamp field
if hasattr(msg, 'header') and hasattr(msg.header, 'stamp'):
# Convert the header.stamp (ros::Time) to seconds
timestamp = msg.header.stamp.to_sec()
# Store the timestamp for the topic
topic_timestamps[topic].append(timestamp)
else:
# If no header.stamp, use the default timestamp (from rosbag)
topic_timestamps[topic].append(t.to_sec())
# Plot timestamps for each topic
plt.figure(figsize=(10, 6))
for topic, timestamps in topic_timestamps.items():
plt.plot(timestamps, [topic] * len(timestamps), 'o', label=topic)
# Configure the plot
plt.title("Timestamps of Messages in ROS Bag (Using header.stamp)")
plt.xlabel("Time (seconds)")
plt.ylabel("Topics")
plt.yticks(range(len(topic_timestamps)), topic_timestamps.keys())
plt.legend(loc='upper right', fontsize='small')
plt.grid(True)
plt.tight_layout()
# Show the plot
plt.show()
if __name__ == '__main__':
# Specify the ROS bag file to analyze
bag_file = '../rosbags/MH_05_difficult_offset3ms.bag' # Replace with your ROS bag file path
# Visualize timestamps
visualize_rosbag_timestamps(bag_file)
该 IMU 在 VIO 上的效果测试
该测试数据集录制于 3 号无人机(orin03)
2026-01-13
-
orin03 测试 hipnuc-imu 读取
-
录制数据集
- 标定数据集:外参标定报错,参考 Optimization failed in kalibr_calibration_imu_camera, D435i运行VINS-mono以及Kalib标定,解决办法是调大 timeOffsetPadding 0.01 -> 0.1
- 测试数据集
-
white noise 与 random walk 单位确认
- hipnuc-IMU 的数据手册里,零偏稳定性单位是离散域,而随机游走单位是在连续域
- kalibr 里需要填写连续域的值,参考 Kalibr IMU Noise Model units problem?
2026-01-19 2026-01-27 2026-02-02
- 测试
- 原 imu (long_ext_cali_offline_and_online), 有 zupt 0.6m, 无 zupt 0.8m
- 原 imu (continue_ext_cali_offline), 有 zupt 0.59m, 无 zupt 0.58m
- 原 imu (continue_ext_cali_offline_and_online), 有 zupt 0.51m, 无 zupt 0.55m
- 新 imu (long_ext_cali_offline),无 zupt 0.67m
- 新 imu (long_ext_cali_offline_and_online),有 zupt 0.34m,无 zupt 0.35m
- 新 imu (short_ext_cali_offline),无 zupt 1.2m
- 新 imu (short_ext_cali_offline_and_online),有 zupt 0.34m,无 zupt 0.35m
- 新 imu (online_iter),有 zupt 0.36 m,无 zupt 0.31m
- 且外参迭代值(主要看 tbc)接近于 long_ext_cali_offline 的结果
- 多次在线迭代并不会让漂移一直变小,观察 tbc 发现多次迭代后偏离了真实值,需要加额外约束(如双目对齐约束)
- 新 imu (continue_ext_cali_offline-2026-01-27),有 zupt 0.26m,无 zupt 0.38m
- 新 imu (continue_ext_cali_offline_and_online),有 zupt 0.21m,无 zupt 0.23m
其中,long_ext_cali_offline 和 short_ext_cali_offline 都是使用图像降频的数据集,区别是录制时长的长短; 而 continue_ext_cali 所使用的标定数据集在录制时,是参考 kalibr 官方视频教程的连续运动,不降频; online 则表示开启外参在线估计。
结论:
- 新 imu 下的 vins 估计的零偏都小于 0.05 m/s^2,变化不大,应该算正确的
- 200 Hz IMU 的定位效果比 242 Hz IMU 的定位效果好