View Single Post
  #1   Spotlight this post!  
Unread 11-12-2011, 18:25
TEAM-3871 TEAM-3871 is offline
Registered User
FRC #3871
 
Join Date: Feb 2011
Location: US
Posts: 10
TEAM-3871 is an unknown quantity at this point
Question Help with mecanum Drive!

Hey Andy from Team 3871 here, this year will be our first year using java and we curently are using macanum wheels... just wonder how to program them... dont quit understan the how to state the joystick axis..

PHP Code:
drive.mecanumDrive_Cartesian(leftStick.getDirectionDegrees(), leftStick.getMagnitude(), rightStick.gyroAngle(); 
Am i on the right track, and how do i go about wachdog...
missing something?

Here is everything i have so far...

PHP Code:
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;

public class 
Team3871Robot extends SimpleRobot {
    
    
RobotDrive drive = new RobotDrive (12);
    
Joystick leftStick = new Joystick(1);
    
Joystick rightStick = new Joystick(2);
    
    public 
void autonomous() {
     
    }
       public 
void operatorControl() {
        while (
isOperatorControl() && isEnabled())
        {
            
drive.mecanumDrive_Cartesian(leftStick.getDirectionDegrees(), leftStick.getMagnitude(), rightStick.gyroAngle(); 
        }
        
Timer.delay(0.005);
    }

Thanks
Reply With Quote