0
$\begingroup$

Rosanswers logo

Hi there,

I have been looking for a way to publish roll, pitch, yaw angles without change them to quaternions but I didn't find that kind of message after googling for a while. I know I can write my own types of messages but I don't want to reinvent the wheel if is the case.

So, does anyone know a standar message with pose and orientation being the angles in rpy form?

Regards, Juan Sandubete López.


Originally posted by JSandu on ROS Answers with karma: 20 on 2018-10-31

Post score: 0


Original comments

Comment by gvdhoorn on 2018-10-31:
There is none in the standard msg set, exactly because RPY (and Euler angles in general) has quite a few disadvantages which quaternions avoid.

You may not be looking for a discussion about the relative merits of quaternions, but can you perhaps tell us why you want to use RPY?

Comment by JSandu on 2018-10-31:
Thanks you for fast answering @gvdhoorn

I am trying it for better visualizing the angles with rqt_bag because It is not easy to guess what is happening to the robot (with the playing rosbag) only seeing its quaternion values. With rpy it is easier.

Comment by gvdhoorn on 2018-10-31:
I wouldn't have an answer to that: raw quaternion values are indeed not very "nice" to look at. But that is what visualisation tools are for. Changing your msgs for that seems like the wrong thing to do.

Would creating a small rqt plugin that plots the state of your robot be an option?

Comment by gvdhoorn on 2018-10-31:
What sort of robot are you using? A mobile platform?

Comment by JSandu on 2018-10-31:
To create a rqt plugin could be an option, but I don't really need it that much. Maybe I can spend some time learning how to create rqt plugins when I will be less busy.

It is an UAV, a quadcopter with usual X configuration.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

One alternative I can think of is to use topic_tools/transform to write a very simple quaternion to rpy converter (one dimension at a time) that publishes to 3 topics (one for R, P and Y) and then use the gauges plugin to visualise that.

Sort of a poormans GCS.


Originally posted by gvdhoorn with karma: 86574 on 2018-10-31

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-10-31:
Just noticed that the wiki/topic_tools/transform page even has an example for exactly this (ie: quaternion to euler). But that doesn't work directly with rqt_bag of course.

Comment by gvdhoorn on 2018-10-31:
Final comment: this seems like an xy-problem really btw (the real question seems to be: "how to plot/visualise pose of my quadcopter instead of looking at raw quaternion values", but your post is about msgs for rpy values).

Comment by JSandu on 2018-10-31:
That seems to be enough for what I need (at least for now). And yep, I noticed the example, it fit like a glove

And no problem with the xy relation with yaw, I resolve the transformations before publishing anything. Thanks you @gvdhoorn!

Comment by gvdhoorn on 2018-10-31:
The xy-problem is not a mathematical problem. It is a term used to describe a situation in which a user asks for the wrong thing: instead of asking for a solution for X, they ask how to implement Y, which they themselves already decided is the solution to X. They should ask about X.

Comment by JSandu on 2018-10-31:
Ok, should I change this question?

Comment by gvdhoorn on 2018-10-31:
No :)

I just wanted to make you aware of it, so you avoid doing it in the future.

It happens quite often.

Comment by JSandu on 2018-10-31:
Alright ! Thanks for your help

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.