CCNYRoboticsLab / imu_tools

ROS tools for IMU devices
Other
936 stars 434 forks source link

filtered Yaw value drifts when use_mag=true #10

Closed mickeyxu closed 11 years ago

mickeyxu commented 11 years ago

Hi,

I've started using the Xsens MTi-10 IMU for our project. I first use the ros driver (https://github.com/ethz-asl/ethzasl_xsens_driver) for the imu to get imu/data_raw and imu/mag published, so that your imu_tools can work.

But when I enabled the use_mag option, the output YAW value (I used tf to convert your quaternion to RPY) drifts a lot when I move the IMU device along a straight line, while the ROLL and PITCH values are quite stable. Also, is the yaw a value relative to the earth north?

Is this an issue that cannot be avoided if the IMU is used indoors? 'cuz the magnetic measurements are affected indoors?

Of course, if I don't use the mag, the large drift problem of yaw is no longer there. But a slow accumulated drift is still there. (around 2 deg/min or so).

Please correct me if I'm using any parts in a wrong way...

idryanov commented 11 years ago

Hello Mike,

I think you are using the IMU correctly . In my experience, using magnetic readings indoors almost always to a bad performance, like the one you are noticing. In my building, for example, all the door frames are metal, and they are strongly magnetized. Also all the electrical wiring and lab equipment machines produce strong electromagnetic currents.

In theory, you might be able to get better performance if you pre-filter the magnetic reading, and only use it to correct when it's orientation and magnitude look "reasonable". Even then, I'm not sure whether the quality would be worth the effort.

On Sat, May 18, 2013 at 6:03 AM, Mike notifications@github.com wrote:

Hi,

I've started using the Xsens MTi-10 IMU for our project. I first use the ros driver (https://github.com/ethz-asl/ethzasl_xsens_driver) for the imu to get imu/data_raw and imu/mag published, so that your imu_tools can work.

But when I enabled the use_mag option, the output YAW value (I used tf to convert your quaternion to RPY) drifts a lot when I move the IMU device along a straight line, while the ROLL and PITCH values are quite stable. Also, is the yaw a value relative to the earth north?

Is this an issue that cannot be avoided if the IMU is used indoors? 'cuz the magnetic measurements are affected indoors?

Of course, if I don't use the mag, the large drift problem of yaw is no longer there. But a slow accumulated drift is still there. (around 2 deg/min or so).

Please correct me if I'm using any parts in a wrong way...

— Reply to this email directly or view it on GitHubhttps://github.com/ccny-ros-pkg/imu_tools/issues/10 .

Ivan Dryanovski The Graduate Center, City University of New York (CUNY) CCNY Robotics Lab http://robotics.ccny.cuny.edu/People/Dryanovski

mickeyxu commented 11 years ago

Thanks Ivan! So, just to wrap up, would you suggest using the filter without fusing the magnetic readings, if placed indoors? In this case, what would you do to the accumulated drift in YAW? I just want to gather some further ideas, since a drift of 2deg/min seems too large for the usage in my project...

idryanov commented 11 years ago

Yes, I would suggest using it without the magnetic readings.

Drift is a problem with many sensors - IMU, wheel odometers, etc. The common way to correct that is to use a sensor which can observer the environment to correct the drift - for example, a camera or a laser. Algorithms like that fall in the SLAM category (if you don't have a prior map) or Localization (if you have a map available)

On Sun, May 19, 2013 at 10:40 AM, Mike notifications@github.com wrote:

Thanks Ivan! So, just to wrap up, would you suggest using the filter without fusing the magnetic readings, if placed indoors? In this case, what would you do to the accumulated drift in YAW? I just want to gather some further ideas, since a drift of 2deg/min seems too large for the usage in my project...

— Reply to this email directly or view it on GitHubhttps://github.com/ccny-ros-pkg/imu_tools/issues/10#issuecomment-18118641 .

Ivan Dryanovski The Graduate Center, City University of New York (CUNY) CCNY Robotics Lab http://robotics.ccny.cuny.edu/People/Dryanovski

mickeyxu commented 11 years ago

Thanks again!