-
Notifications
You must be signed in to change notification settings - Fork 44
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
Quaternion rotation in tf2_sensors_msgs.h #8
Comments
No, I borked it, my linear algebra is lacking. Needs to be fixed here, PRed up to tf2, and a separate node needs to exist specifically for doing the ned->enu conversion as (poorly) implemented here. @tonybaltovski FYI |
@paulbovbel Hello, I would like to use this package that seems useful to me, as I am just starting with Ros. I do not understand if there is actually a problem in the way you do the rotations with quaternion, as @kogut pointed out , and also in your pull request to tf2. Thank you in advance! |
@ClaudioCimarelli, to be perfectly honest, I remember nothing about how or why anymore. I haven't touched an IMU in about 3 years. PRs are most certainly welcome if you have the time. A gtest or two to validate the math would probably go a long way! |
Just lost a day on this one! I'll consider sending a PR with the fix and tests if there's chance it'll be merged in a reasonable time frame. |
Done: #15 . |
Fixed by #15. (after almost 7 years :-D ) |
Is the rotation on line 112 of tf2_sensor_msgs.h correct?
The form of that rotation is the one commonly used to rotate a point in 3D space, where x, y, z are a point in space and w=0.
I get expected results from my sensor URDF if a pure quaternion multiplication is applied here instead.
My test case is with input IMU RPY of 0,0,0 in the sensor frame, and a sensor->vehicle URDF that applies RPY of PI,0,0 , I expect output IMU data of PI,0,0 in the vehicle frame. (with the sign of pitch/yaw reversed for non-zero values).
Am I correct, or am I mis-interpreting the intent of this rotation?
The text was updated successfully, but these errors were encountered: