Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   mecanum wheel postioning (http://www.chiefdelphi.com/forums/showthread.php?t=132080)

cad321 04-01-2015 16:33

mecanum wheel postioning
 
Yesterday while talking with one of my mentors about the use of mecanum wheels on our bot this year, he mentioned concern about whether the wheels must be configured in a square. I told him that I was pretty sure that we could have them in a wide configuration as well (to aid in turning) however I wanted to double check here.

Can I place mecanum wheels like this without doing mass amounts of math and programming to compensate:

|--------|

|--------|

Or Must they be square like this:

|--------|


|--------|

EricH 04-01-2015 16:37

Re: mecanum wheel postioning
 
There should be no change with regards to the programming for a long, wide, or square robot. Ether, you want to chime in here?

Sparkyshires 04-01-2015 16:44

Re: mecanum wheel postioning
 
From my experience, the only difference it will make is the side with the longer aspect ratio will be more difficult to move directly in that direction. For example:
|------------|

|------------|

would be more diffcult to drive straight vs. strafe left and right, while
|---|


|---|

would have much more difficulty strafing, and would be able to easily drive forwards and back.

Whippet 04-01-2015 16:48

Re: mecanum wheel postioning
 
Quote:

Originally Posted by Sparkyshires (Post 1421194)
From my experience, the only difference it will make is the side with the longer aspect ratio will be more difficult to move directly in that direction. For example:
|------------|

|------------|

would be more diffcult to drive straight vs. strafe left and right, while
|---|


|---|

would have much more difficulty strafing, and would be able to easily drive forwards and back.

Also, keep in mind that this becomes fairly easy to compensate for with a gyro and field-oriented driving.

cad321 04-01-2015 17:06

Re: mecanum wheel postioning
 
That is what I had thought. One other question is do both left wheels have to be collinear with each other, or can they be spaced apart so long as they are parallel.

-|--------|-

|----------|

or must they be like this:

|----------|

|----------|

Ether 04-01-2015 17:18

Re: mecanum wheel postioning
 
Quote:

Originally Posted by EricH (Post 1421187)
Ether, you want to chime in here?

Theoretically, 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:

Code:


FrontRight = FWD - STR - K*omega

FrontLeft  = FWD + STR + K*omega

RearLeft  = FWD - STR + K*omega

RearRight  = FWD + STR - K*omega

... where:

FrontRight,FrontLeft,RearLeft,RearRight are wheel tangential speeds, ft/sec

omega is CW rotation around center of area, rad/sec

FWD and STR are driver commands, ft/sec

K is (trackwidth + wheelbase)/2, ft

WPILib and LabVIEW don't support this, so you would have to scale your rotation before calling these methods.

If you don't scale the rotation, it won't cause wheel scrub. It just won't correspond to the rotation you expected.



Ether 04-01-2015 17:23

Re: mecanum wheel postioning
 
Quote:

Originally Posted by cad321 (Post 1421216)
One other question is do both left wheels have to be collinear with each other, or can they be spaced apart so long as they are parallel.

-|--------|-

|----------|

or must they be like this:

|----------|

|----------|


The inverse kinematic computations in WPILib and LabVIEW expect the wheels to be colinear on both sides. A small non-colinearity would likely still work, but wouldn't be ideal.



Ether 04-01-2015 19:20

Re: mecanum wheel postioning
 
1 Attachment(s)
Quote:

Originally Posted by Ether (Post 1421233)
...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.

Ether 04-01-2015 20:23

Re: mecanum wheel postioning
 
1 Attachment(s)

Here's another example.

Suppose you want to pivot the bot clockwise around the front right wheel (see sketch) at 90 degrees per second.

Trackwidth = W = 22/12 ft. Wheelbase = L = 26/12 ft.

Code:

ω = π/2 rad/sec

FWD = ω∙(W/2) ft/sec

STR = -ω∙(L/2) ft/sec

K = (L+W)/2


goofy173 12-01-2015 12:03

Re: mecanum wheel postioning
 
Because of stability, I would space them as far from each other as possible. We have ours outboard of the KOP chassis but we'll be raising them up a little from the stock holes as the chassis is dragging just slightly on the scoring ramps.

slibert 12-01-2015 13:59

Re: mecanum wheel postioning
 
In case you find a source code example helpful:

Here's a link to some java drive subsystem code that's based on Ether's Inverse Kinematics equations, there are some coefficients in there for the wheel base (length and width) as well as for wheel diameter that account for the issues being discussed.

This code also has optional field-oriented drive in it as well, and support for speed control via quadrature encoders ("traction control"). Team 2465 has found both of these to be helpful, and think they're useful for this year's game. This code is written to work w/black Jaguar motor controllers.

There are other examples posted on ChiefDelphi that you'll find, too.

idahorobot 12-01-2015 17:24

Re: mecanum wheel postioning
 
Quote:

Originally Posted by slibert (Post 1426820)
In case you find a source code example helpful:

Here's a link to some java drive subsystem code that's based on Ether's Inverse Kinematics equations, there are some coefficients in there for the wheel base (length and width) as well as for wheel diameter that account for the issues being discussed.

This code also has optional field-oriented drive in it as well, and support for speed control via quadrature encoders ("traction control"). Team 2465 has found both of these to be helpful, and think they're useful for this year's game. This code is written to work w/black Jaguar motor controllers.

There are other examples posted on ChiefDelphi that you'll find, too.

The link did not work.

markmcgary 12-01-2015 17:40

Re: mecanum wheel postioning
 
Quote:

Originally Posted by idahorobot (Post 1426964)
The link did not work.

How about this one?

slibert 12-01-2015 17:54

Re: mecanum wheel postioning
 
Quote:

Originally Posted by idahorobot (Post 1426964)
The link did not work.

Here's a direct link to the Drive.java file.

The previous link works for me, but it leads to a source code browse view, so you need to navigate around a bit to get to the Drive.java file above.


All times are GMT -5. The time now is 03:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi