ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Message for publishing roll, pitch, yaw without converting to quaternion

asked 2018-10-31 05:08:57 -0500

JSandu gravatar image

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.

edit retag flag offensive close merge delete

Comments

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?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 05:14:12 -0500 )edit

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.

JSandu gravatar image JSandu  ( 2018-10-31 05:46:18 -0500 )edit

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?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 05:50:43 -0500 )edit

What sort of robot are you using? A mobile platform?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 05:51:13 -0500 )edit

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.

JSandu gravatar image JSandu  ( 2018-10-31 05:58:46 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2018-10-31 06:05:28 -0500

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 06:07:16 -0500 )edit
1

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).

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 06:08:00 -0500 )edit

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!

JSandu gravatar image JSandu  ( 2018-10-31 06:13:55 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 07:55:33 -0500 )edit

Ok, should I change this question?

JSandu gravatar image JSandu  ( 2018-10-31 08:16:44 -0500 )edit

No :)

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

It happens quite often.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-31 08:19:10 -0500 )edit

Alright ! Thanks for your help

JSandu gravatar image JSandu  ( 2018-10-31 08:31:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-31 05:08:57 -0500

Seen: 3,248 times

Last updated: Oct 31 '18