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
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
Asked: May 02 '11
Seen: 155 times
Last updated: May 02 '11
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.