# Relation between cmd_vel and odometry twist data.?

Hi,

I have some short questions please if anyone can answer these questions.

Q1: What will be the unit of angle when we use

angle = tf::getYaw(odom.pose.pose.orientation);

Q2: What should be the unit of linear and angular velocity when setting cmd_vel of diffrential drive robots?

i.e. cmdvel_.linear.x = vt; (m/s)

cmdvel_.angular.z = w; (rad/s) is it ok?

Q3: What is the unit of (Odometry.twist.twist.angular.z)?

Q4: If I want to find the previous velocity vector from Odometry data. Am I doing right? I want to find velocity vector in Odom frame?

linearV = (odom.twist.twist.linear.x); angularV = (odom_globalVal.twist.twist.angular.z);

Vx = linearV * cos(angularV) // wrong::its not an angle its angular velocity

Vy = linearV * sin(angularV) // wrong::

Thanks a lot.