CCNYRoboticsLab / imu_tools

ROS tools for IMU devices
Other
913 stars 428 forks source link

question: in imu_complementary_filter module, IMU's orientation has some ambiguous. #63

Closed asimay closed 7 years ago

asimay commented 8 years ago

Hi, dear, I'm using imu_complementary_filtermodule, and combined with robot_localizationpackage. but find something strange of imu orientation output of imu_complementary_filtermodule.

I have an NED global frame imu, and I transform the body-NED data (gyro and accelmeter) to body-ENU, and feed the results into imu_filter module. but the data is not correct after drawing in excel.

my drawing is here: here,

I drive car from north -> west->south->east. the global data and orientation is right, but local odometry orientation data which integrated directly from imu_filter package is not correct, it seems like NWU frame. I wonder to know what is output of imu_complementary_filterorientation data's global frame based on? NWU frame? or do I need to do the frame transform from NWU to ENU? because robot_localizationpackage only accept ENU frame data of imu. Thank you!

asimay commented 8 years ago

or input data is body-ENU W.R.T NED frame, what is the output data frame ? body-ENU W.R.T NWU?

I see in package imu_filter_madgwick ....~world_frame (string, default: "nwu" "ned" "enu") how about the imu_complementary_filter package?

asimay commented 8 years ago

the algorithm in package will only output body-ENU W.R.T NWU data? no matter how i feed body-ENU W.R.T ENU data into package?

mintar commented 8 years ago

The imu_complementary_filter node indeed publishes NWU output. We have recently added the option of publishing ENU (or NED) output to imu_filter_madgwick (in #60), so I would propose that you use imu_filter_madgwick instead of imu_complementary_filter and set the world_frame param to 'enu'.

I have done a new release, but it hasn't arrived in the apt repository yet, so you need to build imu_filter_madgwick from source.

asimay commented 8 years ago

hi, @mintar , thank you very much! sorry for spamming info. and I want to know, if use imu_filter_madgwick, before hitting imu_filter_madgwick, i just only need to transform from body-NED W.R.T NED ->body-ENU WRT NED is ok? or just feed the NED data into it is ok?

asimay commented 8 years ago

and if i directly feed body-ENU WRT ENU data into imu_complementary_filter, could it output correct data which I want? I'm still puzzled... what is the input data frame requirement of imu_complementary_filter ? output format as you said can set world_frameto "enu". thank you!

mintar commented 8 years ago

I don't understand what you mean by body-NED W.R.T NED and so on. Both filters in this repo (imu_filter_madgwick and imu_complementary_filter) read gyro, accelerometer and magnetometer readings and output an orientation. As such, there is no "NED" or "ENU" in the input data, only in the output data.

I think you should do this:

mintar commented 7 years ago

Closing this issue due to inactivity. Feel free to respond if necessary.