Gazebo | Ignition | Community
Ask Your Question

Problem of trigonometry

asked 2017-04-19 08:29:18 -0500

shenki gravatar image


I have a big problem of trigonometry, I want to convert the yaw of my robot from quaternion to radians using GetYaw() function, it's working pretty well, but I still have a problem.

I am using cos and sin functions but the robot orientation is now in radians but it's going from -pi to +pi, why wont it be like any normal trigonometric circle, from 0 to 2pi ?

Here there a way to change that ? Im pretty stuck at the moment and my brain is smelting, thank you in advance !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-19 09:31:50 -0500

sloretz gravatar image

Gazebo uses a right-handed coordinate system. Most models are created with the x axis pointing out the front, and +z pointing up. Yaw behaves as one would expect from trigonometry. Looking from above the yaw angle increase when the model rotates counter-clockwise, and decreases when the model rotates clockwise.

image description

edit flag offensive delete link more



hello, I Am retarded, thank you for your answer

shenki gravatar imageshenki ( 2017-04-20 01:55:51 -0500 )edit

Question Tools

1 follower


Asked: 2017-04-19 08:29:18 -0500

Seen: 418 times

Last updated: Apr 19 '17