Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnetometer initial values aren't normalized? #66

Open
danielschonfeld opened this issue Dec 27, 2016 · 5 comments
Open

Magnetometer initial values aren't normalized? #66

danielschonfeld opened this issue Dec 27, 2016 · 5 comments

Comments

@danielschonfeld
Copy link

Admittedly i'm a newbie that's trying to wrap my head around this paper, but I think that there were two assumptions made about using the magnetometer data in the initial quaternion correction.

  1. The magnetometer vector was normalized (page 7, 2nd paragraph)
  2. transposition of q0 and q3 depending on lx >= or < 0 (page 11, eq 35)

I couldn't find neither of those applied in:

https://github.com/ccny-ros-pkg/imu_tools/blob/kinetic/imu_complementary_filter/src/complementary_filter.cpp#L349

What am I getting wrong or is this a bug?

@robertogl
Copy link
Collaborator

robertogl commented Dec 28, 2016 via email

@danielschonfeld
Copy link
Author

@robertogl thanks for taking the time to explain however i'm still a bit confused, mind you i am a total newbie to math so please bare with me:

Let's start from the bottom...

  1. Probably you got confused by the "getMeasurement" ... but note that is not a delta quaternion used for correction, but an initial quaternion only used for initialization of our orientation... <-- exactly because of that I don't understand why in getMeasurement only the acc formulation is based on the hemisphere and not the magnetometer data as well as indicated in the paper. The paper makes the distinction of generating the initial orientation of yaw (z-axis) quaternion data differently based on what lx is.

  2. This is where my math skills show themselves to be none existent, so I apologize for how stupid this may sound - but why does it not matter in when you calculate q^mag whether or not the vector is normalized and why does it change the result in the case of q^acc if it isn't. Mind you i'm only referring to the initial orientation phase, not the delta calculations later.

@robertogl
Copy link
Collaborator

robertogl commented Dec 30, 2016 via email

@danielschonfeld
Copy link
Author

danielschonfeld commented Dec 30, 2016

@robertogl i think it makes sense yes. do u want me to keep the issue open for (1) or are you gonna close it?

also thank you very much for taking the time to explain!

@robertogl
Copy link
Collaborator

robertogl commented Dec 30, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants