Quote:
Originally Posted by Ether
The math for the above is discussed here, starting at the bottom of page 7.
|
Bottom line, after the math is done and the smoke clears:
Mecanum "forward kinematics" (least squares fit of vehicle motion given wheel speeds):
Code:
FWD = r*(w1+w2+w3+w4)/4
STR = r*(w1-w2+w3-w4)/4
Wv = (1/k)*(w1+w2-w3-w4)/4
r is wheel radius
k is |trackwidth/2| + |wheelbase/2|
w1,w2,w3,w4 are FL,BL,BR,&FR wheel speeds in rads/sec
Wv is robot clockwise rotation rate in radians per second