View Single Post
  #8   Spotlight this post!  
Unread 08-09-2013, 17:17
mschwab013's Avatar
mschwab013 mschwab013 is offline
Registered User
AKA: Matt Schwabenbauer
FRC #0291
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Erie, PA
Posts: 87
mschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to allmschwab013 is a name known to all
Re: Controlling the individual speed of mecanum wheels within the main programme

Quote:
Originally Posted by ekapalka View Post
The problem we're having is that we can't strafe (and the x axis, y axis, and rotation are all mixed up). When we try to strafe, the robot simply spins the wheels towards or away from the central point of the robot (i.e the front two wheels spin inwards and the back two wheels spin inwards xor vice versa) and it stays in place or runs in circles. The rollers are arranged in an "X" pattern when viewed from the top.
I had a similar problem this past year while programming our mecanum drive. I fixed it by putting the axis' in this order: y axis, rotation, x axis.

The code looks like this:
Code:
stick_LeftY = stick->GetLeftY();
stick_LeftX = stick->GetLeftX();
stick_RightX = stick->GetRightX();

myRobot->MecanumDrive_Cartesian(stick_LeftY, stick_RightX, stick_LeftX);
I was using a logitech gamepad but I believe the principles would be the same for sending commands. I hope this helps! If you have any questions you can PM me. I've been working with mecanum for several years now and may be able to help
__________________


2013 Pittsburgh- Gracious Professionalism award, 7th seed, 6th alliance captian, quarter-finalist(291,3492,4601)
2013 Queen CIty- Chairman's Award, 39th seed
2012 Pittsburgh- 23rd seed
2012 Buckeye- 34th seed, 2nd alliance, quarter-finalist(291,1241,4085)
2011 Pittsburgh- 13th seed, 5th alliance, quarter-finalist(291,337,3504)
2011 Buckeye- 18th seed, 8th alliance, quarter-finalist(279,291,3496)
2010 Finger Lakes- 15th seed, 5th alliance, quarter-finalist(291,1507,1559)
2010 Buckeye- Chairman's Award, Imagery Award, Quality Award, 4th seed, 1st pick, 1st alliance, semi-finalist(291,1014,1629)