View Single Post
  #1   Spotlight this post!  
Unread 04-02-2014, 14:43
PANTHERPROJECT's Avatar
PANTHERPROJECT PANTHERPROJECT is offline
Registered User
FRC #2064 (The Panther Project)
Team Role: Webmaster
 
Join Date: Dec 2013
Rookie Year: 2007
Location: Southbury, Middlebury
Posts: 14
PANTHERPROJECT will become famous soon enoughPANTHERPROJECT will become famous soon enough
Programming Mecanum

Hi! I'm having trouble programming the mecanum wheels. I can make the robot move sideways and rotate but I cannot make it move forward and backward and I'm not sure why. I included the important parts of my code below.

Code:
Joystick joy1 = new Joystick(1);

RobotDrive drivetrain = new RobotDrive(1, 3, 2, 4);//Front Left - 1, Rear Left - 2, Front Right - 3, Rear Right - 4

double magnitude = joy1.getMagnitude();
double direction = joy1.getDirectionDegrees();
double rotation = joy1.getZ(); 

drivetrain.mecanumDrive_Polar(magnitude, direction, rotation);
I know for certain that it isn't an issue with the wiring. I tried using two joysticks instead of one but that didn't work either. I've pretty much run out of ideas at this point and hope someone can help. Thank you!

Last edited by PANTHERPROJECT : 04-02-2014 at 14:47.
Reply With Quote