tf::Quaternion syntax question
Hello,
Recently I've found out, that I must give the navigation stack a quaternion describing rotation in addition to the vector3D goal. Quaternions were new to me, so I learnt about them because I would like to use them in ROS. My question is about actual implementation.
Suppose that I would like to go from (0,0,0) to (1,1,0). Then I know, that the robot would probably face to 45°, so...
double inRadian = radian(degree);
tf::Quaternion rotateByThis(tf::Vector3(0,0,1), inRadian); // is this call okay?
goal.target_pose.pose.orientation.w = ? // tf::Quaternion has getW() method, should I use that value?
goal.target_pose.pose.orientation.x = ?
goal.target_pose.pose.orientation.y = ?
goal.target_pose.pose.orientation.z = ?