Converting yaw between frames
Hi all, I have a query regarding converting yaw between frames.
The velocity commands (linear and angular) received from the base local planner are in term of robot's frame. Let says that I want to convert the velocity commands into the map's frame in gazebo, do I need to do conversion on the angular velocity?
My intuition is that since the orientation of z-axis in both robot frame and map frame are the same, the yaw in both frame should be the same right?
The reason I asked this question is because after I did an angular velocity conversion between the robot frame and world frame, the values I got are different.
1st update: The way I did the conversion is as such, rot is the double value of the original angular velocity.
(Q_is geometry_msg::quaternion , QS_ and QS_tr is geometry_msgs::QuaternionStamped )
Q_ = tf::createQuaternionMsgFromYaw(rot_);
QS_.header.frame_id = "base_link";
QS_.header.stamp = ros::Time();
QS_.quaternion = Q_;
listener.transformQuaternion("/map", QS_, QS_tr);
yaw = tf::getYaw(QS_tr.quaternion);