Gazebo object pose and getAsEuler
Hello,
I'm working on a quad-rotor simulation in 3D space. I use the GetPose()
method to get the current object pose in the space. And now there is the problem.
The GetPose()
method return a Pose3D
object. This object contains
- A
Vector3
for the body position. - A
Quatern
for the body orientation.
Now I should transform this quaternion in a Roll-Pitch-Yaw triple through the GetAsEuler()
method of Quatern
. Unfortunately this value is non-continue because it jump from pi
to -pi
and this cause trouble to my controller!
Exist any way to obtain a continue transformation from quaternion to euler triple?