Quote:
Originally Posted by Ether
...if the wheel pattern is not square then trackwidth and wheelbase lengths should enter into the inverse kinematic computation if you want the rotate command to correspond with actual engineering units...
|
Here's a simple example. Suppose your bot has trackwidth 22 inches and wheelbase 26 inches and you want to create a special code to drive around in a 6 ft radius circle at 4 ft/sec speed (see sketch).
Code:
FWD = 4
STR = 0
omega = 4/6
K = ( (22/12) + (26/12) ) / 2 = 2
FrontRight = FWD - STR - K*omega = 4 - 0 - 2*(4/6) = 2.67 ft/sec
FrontLeft = FWD + STR + K*omega = 4 + 0 + 2*(4/6) = 5.33 ft/sec
RearLeft = FWD - STR + K*omega = 4 - 0 + 2*(4/6) = 5.33 ft/sec
RearRight = FWD + STR - K*omega = 4 + 0 - 2*(4/6) = 2.67 ft/sec
If you didn't take the wheelbase and trackwidth into consideration, the rotation would not match the forward speed and you wouldn't get the expected vehicle motion.
Of course, if the driver interface is simply going to be forward, strafe, and rotate commands, then it doesn't matter. The driver just adjusts the commands (after much practice!) to make the vehicle do what he wants.