# units of twist.angular.z

Hello

The unit of twist.angular.z is noted rads / second. So if I send the robot a twist command linear.x=0.0, angular.z=1.0 it should rotate 1 radians / second, so half a turn / second?

OR

if I give linear.x=0.0, angular.z=3.14 it will give the same half a turn rotation per second?

I am asking this question, because I made my cmd_vel listener to operate like the first case, (1.0 = 1rads/sec) but my odometer is reporting values like 3.14 for thetaVel, when the robot is spinning at 1 rads/sec.

The theta from the odometer is between 0 and 6.28 (2pi) so I am assuming my input equation for cmd_vel is wrong, and not the odometry.

Best regards, C.A.

Please see whether #q185427 clears this up.

As everything in ROS,

`Twist`

uses SI units.@gvdhoorn the question does not clear it up.

but I fired turtlesim package to find that giving angular.z = 3.14 causes 1 revolution in 2 seconds, and reports 3.14 from odom.twist.z as well, which are calculated.

So SI units, right but z=3.14 means 1 radians/sec,

I am trying to get robot_localization package to work, so I wanted to have proper forward and inverse kinematics, and I dont knot if turtlesim package is a good example.

I'm not sure I understand what you're saying here with the "but".

SI units for angles or rotations are radians. For a rotational velocity, that would mean radians/sec. 1 pi radians per sec means half a rotation per second. 2pi radians per second means a full rotation per second.

@gvdhoorn

the but here, is because I have checked the http://wiki.ros.org/turtlesim package as well as https://github.com/merose/diff_drive. So what I have done was to give angular.z = 3.14 and then measure the rotation, [by means of a stopwatch and visual observation] - also monitoring turtlesim's /turtle1/pose (which does publish angular vel - calculated) and the diff_drive's /odom output has twist derived from observed input.

They both require input that is pi * radians. Now they could be both wrong as well.

For pure SI units, I would think that the input should be not pi * radians but just radians.

I am trying to use the twist from /odom in robot_localization package, so I naturally would like the units to be correct.

best regards.