Ask Your Question
0

Stage: Orientation of the robot.

asked May 02 '11

Suraj Swami gravatar image Suraj Swami
9 1 6

updated May 02 '11

Hi,

I am working on a simple program using stage simulation where I want to find the present position of the robot in the format of (x , y , theta ).

I am not able to understand how to convert the orientation into a understandable format of theta.

How do I go about from this data x: -10.6492617064 y: 7.43208867907 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.210458934126 w: 0.977602698977

Is there a function or formula that I can convert orientation data into theta.

-Suraj

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
3

answered May 02 '11

JeffRousseau gravatar image JeffRousseau
1141 15 21 34
http://jeffrousseau.info/

updated May 02 '11

If you're working in python, it's as simple as using this method found in transformations.py:

import tf 
from tf.transformations import euler_from_quaternion
...
(roll,pitch,yaw) = euler_from_quaternion(quaternion)

In C++ it's just tf::getYaw(quaternion). See here

link delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: May 02 '11

Seen: 155 times

Last updated: May 02 '11