-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix natnet2ivy rotation order #3231
Conversation
What about
In my opinion the message going to the drone should always be in 1 orientation such that this can be added to the messages.xml file.
Maybe we should add some description of the conversions also in the modules. |
Thanks! Why is this different from paparazzi/sw/airborne/modules/ins/ins_ekf2.cpp Lines 711 to 714 in fe35af7
The way I see it, |
Ah, I didnt see the theta=-theta line a few lines down: paparazzi/sw/airborne/modules/ins/ins_ext_pose.c Lines 181 to 187 in fe35af7
Then it all makes sense, I think and is the same |
Thanks for pointing this rotation error. After a recent update of Natnet, we have also a new version of NatNetClient.py, so we need to merge them correctly to check if this is still working for us. I'll let you know. |
Hey Gautier! Perfect, I'm available for testing new stuff as well. On a related note, we have been developing a C++ Natnet client with to goal of keeping the CLI as similar as possible between different target robot/drone operating systems in operation at TU Delft. It's also not completely finished, and I'm not quite sure if it's possible/desirable to include it with paparazzi as well, but I'd like to hear your thoughts. |
@tmldeponti recently found that the pitch and roll components of the
natnet2ivy.py
are sometimes wrong. Further investigation showed that this happens due to a wrong rotation order that shows up when not using options--x_side right
and--ac_nose far
, and when the craft is yawed away from pointing to the "north". Also, the yaw angle component seemed unaffected, which is why this bug hasn't shown up before (optitrack pitch/roll components are not typically used by estimators AFAIK?).The diff looks huge, but actually the only functional change is post-multiplying
q_nose_correction
instead of pre-multiplying here:paparazzi/sw/ground_segment/python/natnet3.x/natnet2ivy.py
Lines 310 to 312 in 41998a1
To really make sure this time that it works for all options, I generated test cases, and encapsulated some more script code in functions so they can be tested if
--test
is given as argument (in which case all other arguments are ignored and only the tests are performed)Todo: