View Single Post
  #19   Spotlight this post!  
Unread 05-02-2015, 16:36
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: How to Program Mecanum

Quote:
Originally Posted by Ether
Quote:
Originally Posted by 3786KRRobotics
If you want to strafe to the left, you want to drive the front left forward and rear left backwards while driving the front right backwards and the back right forwards. This creates a vector in only the left direction.
Not. The wheel speeds described above are all the reverse of what they should be.
I've learned to trust Ether so I'm trying not to doubt this, but it seemed wrong to me the first time I read it.

Quote:
Originally Posted by Ether View Post

Quote:
Originally Posted by 3786KRRobotics
when strafing, one side should have the wheels rotating towards the outside when viewed side on, and the other side should be rotating inwards.
Just to be clear:

Assuming your wheels are mounted correctly,

Strafe Left:
- Left wheels rotate "inward"
- Right wheels rotate "outward"

Strafe Right:
- Left wheels rotate "outward"
- Right wheels rotate "inward"

... which is not the same as this:

Quote:
Originally Posted by 3786KRRobotics
If you want to strafe to the left, you want to drive the front left forward and rear left backwards while driving the front right backwards and the back right forwards. This creates a vector in only the left direction.

The above didn't help me as I'm not able to visualize inward outward-- I can interpret it two different ways-- inward from the top or inward from the bottom?

My thinking is that the left front wheel driving forward means the direction that would carry the robot toward what we are calling the front i.e. counterclockwise when viewed from the left side of the robot.

So on the bottom we have a diamond and that tells me that the wheel rotating that way should create force in the forward and the left direction. (in sand, all the sand would wind up on the right side of the wheel and behind the wheel).

Likewise if I drive the left rear wheel backwards (i.e. clockwise when viewed from the left) or the direction that would carry the robot to its rear if they were normal wheels then that diamond on the bottom will be forcing the robot backwards and to the left.

Summing those, the forward and back cancel and there should be a net left motion out of the left.

On the right if you drive the front right backward (counterclockwise when viewed from the right), the angle from below is identical to the back left wheel which we also drove backwards so again that wheel should be pushing backwards and left (in my eye).

And finally the rear right wheel driving forward (clockwise when viewed from right), so here as in the left front I see it should be pushing foward and left.

So the original position by 3786KRRobotics still seems correct to me. I count equal forces forward and backwards with his incantation and a left force from all wheels.

Yet everyone else seems to agree with Ether and common sense says I should too-- but I must be missing something obvious.

Can anyone point out where I'm thinking wrong?

I need an obviator-- one who can point out the obvious to me because at the moment I can't see it.

Maybe there is something fundamental I'm just not grasping-- we used RobotDrive to handle all this for us and it works fine so I never had to properly think though it.
Reply With Quote