Go to Post I fear sometimes as time increases between the present and when someone started, some sight of just how hard it can be to field a functioning robot for a young team is lost. - xForceDee [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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