Ask Your Question
0

Stage: Orientation of the robot.

asked 2011-05-01 19:51:18 -0600

ss_robotics gravatar image

updated 2011-05-01 19:51:46 -0600

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2011-05-02 01:01:28 -0600

updated 2011-05-02 01:39:04 -0600

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-05-01 19:51:18 -0600

Seen: 2,315 times

Last updated: May 02 '11