From: Brian G. <br...@ge...> - 2007-06-22 17:53:49
|
On Jun 19, 2007, at 6:37 AM, mar...@ti... wrote: > it is possible to read the readings of the encoder (I need to know the > velocity of single wheel). Player does not expose the encoder values, because it's rarely useful. This is the cost of abstraction. Luckily, if you know the kinematics and dimensions of your robot, then it's a simple geometric computation to get the individual wheel velocities from the robot's velocity. From memory, something like this works for a differential drive robot, where tv is the translational velocity and rv is the rotational velocity: rotational_term = rv * axle_length / 2.0; left_wheel_velocity = tv - rotational_term; right_wheel_velocity = tv + rotational_term; brian. |