Husky Quaternion Rotation w/ Odometry
Could someone help me understand what is going on here?
I was following this quaternion tutorial and trying to apply it to a clearpath Husky A-200 : http://www.ogre3d.org/tikiwiki/Quater...
I understand quaternions to be
[x y z w]T = [sin(a/2)nx, sin(a/2)ny, sin(a/2)*nx, cos(a/2)]T
, where a is the angle of rotation and [nx ny nz] describe the vector to rotate about. So, if I input
(a=180, [nx ny nz] = [0,0,1])
quaternion = [0, 0, 1, 0]
and the Husky should rotate 180 degrees. However, it consistently rotates 90 degrees. This is all relative to the 'odom' frame. After its first rotation I would expect an input of
(a=0, [nx ny nz] = [0,0,1])
quaternion = [0, 0, 0, 1]
to return the Husky to its starting orientation in the odom frame; however, this causes it to complete it's 180.
Can someone please explain what is happening? What quaternion do I need to do a 180 degree rotation?
We are using following commands to run the gazebo and navigation packages:
roslaunch husky_gazebo husky_empty_world.launch
roslaunch husky_navigation odom_navigation_demo.launch
Commands are published to the /move_base_simple/goal topic relative to the odom frame.