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

Revision history [back]

A quaternion is just another way (one which doesn't have singularities) of representing angles: a quaternion, just like euler angles, signifies a rotation from one frame to another: f2 = q * f1

That said I don't know enough about the navigation stuck but I can tell you that your code doesn't look right.

tf::Quaternion rotateByThis(tf::Vector3(0,0,1), inRadian); // is this call okay?

Even if that were ok, what does it mean to turn by 1° while you said you wanted 45°? That syntax doesn't look right to me, it would probably be something like

tf::transform transform;
transform.setRotation(tf::quaternion(tf::Vector3(0,0,inRadians(45))))

I suggest you check

And after you grasp the TF things then go to the navigation tutorials and look up the one regarding sending goals to the navigation stacks.

This question could also give you insight.