ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

robot_localization: how to deal with imu data

asked 2019-06-19 03:00:47 -0500

huchaohong gravatar image

Recently, i am reading robot_localization and want to understand how it works. Previously, i have read and understood code and logics in robot_pose_ekf package.

I am confused about how imu data is processed in robot_localization. It seems to me that if config of differential was set to false, then imu can't work in robot_localization. The orientation of imu in 'world' fixed frame is transformed to orientation of base_link in 'world' fixed frame and set as measurement and send to ekf or ukf. But how can this data in world frame be fused with other data in other frame(such as 'odom' frame) ?

Hope i was wrong in understanding robot_localization and someone can fix me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-03 05:01:07 -0500

Tom Moore gravatar image

Part of the problem is that IMU data lacks separate frame_id fields for orientation, angular velocity, and linear acceleration, so we have to make some assumptions.

Let's say your IMU's frame_id was set to the same value as your EKF base_link_frame. In that event, the filter would assume that all orientations are being reported in the EKF's world_frame parameter value, e.g., odom or map. If your IMU is rotated w.r.t. the base_link frame and the data is given in a frame like imu_link, then the filter will rotate the orientation data according to that base_link->imu_link transform, and then fuse it.

If you always want the orientation data to start at 0, turn on the _relative parameter for your IMU.

edit flag offensive delete link more

Comments

Could I continue this thread? I understand that the orientation of an IMU is assumed to be reported in the world_frame, however what about the angular velocity of the IMU? Usually the angular velocity is reported with regard to its own frame or the base_link. However, I can see the transfer functions in the ekf.cpp assume the fixed world_frame for angular velocities. Does this mean the angular velocity should be per-processed into world_frame by a rotation using its current orientation?

Update:I read in https://github.com/cra-ros-pkg/robot_... that the angular velocity and acceleration are assumed in the IMU frame, then do you think this will conflict with the transfer functions that involves the angular velocity? Thanks!

Final update: I have re-calculated and found everything correct (!!), after a friend reminded me that the Euler angle sequence is first psi along z, then theta along y, then phi along ...(more)

manmachine_x gravatar image manmachine_x  ( 2021-08-11 09:07:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-06-19 03:00:47 -0500

Seen: 365 times

Last updated: Jul 03 '19