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

Stage: Orientation of the robot.

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

ss_robotics gravatar image

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


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.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

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

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

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

Question Tools

1 follower


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

Seen: 2,784 times

Last updated: May 02 '11