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

feature request: yaw_degrees for imu quaternion #238

Closed
Timple opened this issue Dec 23, 2019 · 8 comments
Closed

feature request: yaw_degrees for imu quaternion #238

Timple opened this issue Dec 23, 2019 · 8 comments
Assignees

Comments

@Timple
Copy link
Contributor

Timple commented Dec 23, 2019

Or maybe just any quaternion you encounter?

The yaw_degrees feature is very convenient for the odometry so thanks for that already! :)

Or maybe even also 'roll_degrees' and 'pitch_degrees' as they might be insightful for an imu

@Timple
Copy link
Contributor Author

Timple commented Jan 21, 2020

Figured out how to do it 'manually' using the quaternionToYaw function and this tutorial:
https://vimeo.com/355538901

Feature request remains though

@facontidavide
Copy link
Owner

I need you to be a little more precise...

Based on the current architecture, I can "magically" create RPY data only from a specific ROS message type. In your case is

       sensor_msgs/Imu

right?

@Timple
Copy link
Contributor Author

Timple commented Jan 22, 2020

Our current usecase is sensor_msgs/Imu, so having a yaw_degrees there as you already do for odometry would be great.


But the more awesome and complete implementation would be to 'detect' the Quaternion msg even if it resides as part of another message (Imu/Odometry/etc).
That way all messages containing a quaternion can be displayed as follows:

.../orientation/x
.../orientation/y
.../orientation/z
.../orientation/w
.../orientation/roll
.../orientation/pitch
.../orientation/yaw

Where the latter three would be added for convenience since (most?) humans tend to think in euler angles rather than quaternions

Or perhaps:

.../orientation/roll_deg
.../orientation/pitch_deg
.../orientation/yaw_deg

@facontidavide
Copy link
Owner

i know this is what you were going to propose... :)

It is a PITA, but doable

@Timple
Copy link
Contributor Author

Timple commented Jan 27, 2020

If it was very easy I've would have send a PR instead of a feature request :)

Well if message types cannot be distilled, it might be pragmatically done by checking the fields.
If (and only if) an x,y,z,w field is present, lets add roll, pitch and yaw.

@facontidavide
Copy link
Owner

yes, it can be done introspecting this fields of the message... the parsing library is called ros_type_introspection for a reason :)

I just have no bandwidth for the time being to do this, I am horribly busy.

@facontidavide
Copy link
Owner

Done.

@Timple
Copy link
Contributor Author

Timple commented Feb 18, 2020

Works for imu message, thanks! 👯‍♂️

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

2 participants