View Single Post
  #8   Spotlight this post!  
Unread 04-01-2015, 19:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,044
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: mecanum wheel postioning

Quote:
Originally Posted by Ether View Post
...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.
Attached Thumbnails
Click image for larger version

Name:	circle_drive.png
Views:	37
Size:	7.1 KB
ID:	17738