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

sensor_msgs/Imu pre-transformed #82

Open
msmcconnell opened this issue Mar 6, 2020 · 2 comments
Open

sensor_msgs/Imu pre-transformed #82

msmcconnell opened this issue Mar 6, 2020 · 2 comments

Comments

@msmcconnell
Copy link

msmcconnell commented Mar 6, 2020

I have noticed that the orientation in the sensor_msgs/Imu output is being negated and the roll/pitch values are not being used to match the INSPVA log definition.

      imu->orientation = tf::createQuaternionMsgFromRollPitchYaw(inspva->roll * DEGREES_TO_RADIANS,
                                              -(inspva->pitch) * DEGREES_TO_RADIANS,
                                              -(inspva->azimuth) * DEGREES_TO_RADIANS);

In the above code snippet from novatel_gps.cpp you can see that the pitch and azimuth values are negated. Additionally, in the tf library roll corresponds to rotation around the x axis while pitch corresponds to rotation around the y axis. However in the INSPVA doc you can see that the roll is actually coming from the vehicle frame Y-axis and the pitch is coming from the vehicle frame X-axis.

It seems like this code might be trying to make the imu match the ROS convention of X being forward and Y being to the right, but I'm not sure how the -Z value is coming into play. Could someone elaborate on the motivation here?

@pjreed
Copy link
Contributor

pjreed commented Mar 6, 2020

I believe @JWhitleyWork originally wrote that code, so he might be able to elaborate on it.

@JWhitleyWork
Copy link
Contributor

Unfortunately, I did not write the code, I'm just a lowly maintainer. I'll look into this a bit further, though, and see if I can figure out what's going on.

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

No branches or pull requests

3 participants