-
Notifications
You must be signed in to change notification settings - Fork 0
Replace quaternion to twist with new algorithm #14
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
base: main
Are you sure you want to change the base?
Conversation
|
I stepped through the logic. Its hard for me to think about to be honest but I think i understand what this is doing. Here is my commented code
In the end, though @cjsha's testing, we have confirmed this works very well for when the headstage rogations are about the tether axis. We need to confirm it deals well with the orthoganal and flipped case. |
jonnew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reviews are in the comments and are really just about understanding the algorithm. @cjsha needs to finish his testing with the headstage at 90 deg. and upside down before we fully merge.
|
Your comments are on point. I would just add in I will add these comments to the PR |
|
@jonnew @cjsha I have updated the algorithm to account for the cases where the headstage is not completely upright. In theory, it should now follow the headstage in most cases, included when it's tilted 90 degrees but going around the commutator axis. To do this, it now calculates two rotations: The second rotation is added weighted to the relationship between the tether vector in global coordinates and the commutator vector. For example, when the headstage is completely upright, these two vectors are the same, so the second rotation is ignored. When they are 90º they are independent and fully summed. Anything in between gets weighted. Please use this algorithm for further testing. |
The new algorithm is intended to work better on any orientation.
With this change, the
RotationAxisproperty properly defines which axis on the IMU, from its physical representation, is to be used for turning computations.