Lateral Velocity in odom

asked 2019-11-05 05:04:42 -0600

RedDave gravatar image

I have a simple differential vehicle. The zero point of the vehicle is ground level, centred on the differential axle. I am driving this vehicle in a circle by sending a command from teleop_twist_keyboard.

I am recording the published 'odom' topic into a ROS bag, converting it to CSV and then analysing it.

I am considering the vehicle velocity in two ways.

  • I am taking the difference of the published pose and dividing by the frame rate of 50ms (I have observed that the simulation rate of 50ms gives consistent results as opposed to the difference in the header stamps, which is not a consistent 50ms). i.e. the pose of each reading in the frame of the previous to give forward and lateral deltas.
  • I am taking the velocities from the twist.
  • n.b. I am considering a 2D system so am considering only x, y and yaw.

For forward and yaw, I get matching results. about 0.5m/s and -0.15rad/s

However, for lateral velocity, I get the expected zero (<1mm/s) from the pose deltas, but the velocity reported in the twist is about 75mm/s.

This could imply that the velocity is being reported for a point other than the control point [1m from it].

I believe that the frames are correctly set. And if they weren't I would expect the pose deltas to contain the same lateral velocity as the twist.

Does anyone have an explanation for this phenomenon?

edit retag flag offensive close merge delete