# Turtlebot Odometry Calculations

Hi, thanks for looking at my question:

I'm writing a class to control a Turtlebot. Within this class, I want to measure how many metres the turtlebot has moved, and how many radians it has turned. To achieve this, I have subscribed to "turtlebot_node/sensor_state" whose callback parameter provides delta values for distance and angle.

There's a problem: this callback parameter provides inconsistent delta values for angle radians at low angular velocities. For example, at 0.1 metres per second around the z-axis (yaw), zero radians are returned. I believe this is because the callback only runs at 10Hz.

What I've done now is subscribe directly to the "odom" topic. My callback function is working, but I don't know how to get from the nav_msgs::Odometry struture to useful delta values.

Can someone please help me with the mathematics here?