How to understand robot orientation from quaternion yaw angle
I have this line of code
geometry_msgs::Quaternion odom_quat = tf::createQuaternionMsgFromYaw(currentth);
Where currentth is the angle in radian to represent the pose of the robot. Then i am making the assignment
odom_trans.transform.rotation = odom_quat;
where i do the propagation. In another node i have a callback as follows
void odometryCallback (const nav_msgs::Odometry::ConstPtr &odom)
{
// ROS_INFO("ODOMETRY RETRIEVED FROM ODOMETRY NODE and orientation is %f",robotCurrentTheta );
currentX = odom->pose.pose.position.x;
currentY = odom->pose.pose.position.y;
robotCurrentTheta= odom->pose.pose.orientation.w; // not sure here
ROS_INFO("ODOMETRY RETRIEVED FROM ODOMETRY NODE and orientation is %f %f %f %f",
odom->pose.pose.orientation.x,odom->pose.pose.orientation.y,odom->pose.pose.orientation.z,odom->pose.pose.orientation.w );
}
Now how i can obtain robot's orientation in radian? am i missing something.