IMU融合

ROS中IMU消息的定义:

sensor_msgs/Imu.msg

# This is a message to hold data from an IMU (Inertial Measurement Unit)
#
# Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec
#
# If the covariance of the measurement is known, it should be filled in (if all you know is the 
# variance of each measurement, e.g. from the datasheet, just put those along the diagonal)
# A covariance matrix of all zeros will be interpreted as "covariance unknown", and to use the
# data a covariance will have to be assumed or gotten from some other source
#
# If you have no estimate for one of the data elements (e.g. your IMU doesn't produce an orientation 
# estimate), please set element 0 of the associated covariance matrix to -1
# If you are interpreting this message, please check for a value of -1 in the first element of each 
# covariance matrix, and disregard the associated estimate.

Header header

geometry_msgs/Quaternion orientation
float64[9] orientation_covariance # Row major about x, y, z axes

geometry_msgs/Vector3 angular_velocity
float64[9] angular_velocity_covariance # Row major about x, y, z axes

geometry_msgs/Vector3 linear_acceleration
float64[9] linear_acceleration_covariance # Row major x, y z

有点不明白的是这里明明写着Quaternion,但是有人却直接给orientation赋值欧拉角,找了一些资料,发现好像都可以,也就是说ROS内部会自行转换。

我们是在2D进行导航,那么:quaternion中(x,y,z,w),x,y可以直接赋0,z和w赋相应的值。

2

获取到imu数据之后,发布Imu消息
robot_pose_ekf接收imu消息和odometry消息,进行融合后发布

你可能感兴趣的:(IMU融合)