Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Holonomic Drive Program (http://www.chiefdelphi.com/forums/showthread.php?t=89563)

cheezburger 19-01-2011 15:28

Holonomic Drive Program
 
My team is switching to Java this year and we want a holonomic drive system.

Not quite sure how to program it. When we tried to use the holonomicDrive method, Netbeans gave us a slew of errors, the most common of which was that

"holonomicDrive(float, float, float) is not public in edu.wpi.first.wpilibj.RobotDrive; cannot be accesed from outside package."

This is the code we have:

public void operatorControl() {
while (true && isOperatorControl() && isEnabled()) // loop until change
{
drive.holonomicDrive(leftStick.getDirectionDegrees (), leftStick.getMagnitude(), rightStick.getX(GenericHID.Hand.kRight));
Timer.delay(0.005);
}
}

I'm open to help in fixing holonomicDrive or to help in making a holonomic from scratch, as long as it works. The place I got the current code from said it was not tested code. I'd like code that has been known to work.

Jared Russell 19-01-2011 15:38

Re: Holonomic Drive Program
 
I don't see RobotDrive.holonomicDrive in the 2011 JavaDoc. You could use one of the mecanumDrive methods, however - the code for open-loop control of a holonomic drive with 4 wheels on 45 degree angles is identical to the code you'd use for a mecanum setup.

cheezburger 19-01-2011 15:44

Re: Holonomic Drive Program
 
Could you give me a link to that?

Jared Russell 19-01-2011 16:13

Re: Holonomic Drive Program
 
http://www.wbrobotics.com/javadoc/in...w-summary.html

Look in edu.wpi.first.wpilibj.RobotDrive for the "mecanumDrive_XXX" methods.

kinganu123 19-01-2011 16:44

Re: Holonomic Drive Program
 
Its actually
drive.MecanumDrive_Polar(leftStick.getDirectionDeg rees (), leftStick.getMagnitude(), joystick.getTwist());

cheezburger 14-02-2011 07:24

Re: Holonomic Drive Program
 
thanks for all the advice, we ended up making our own drive without the provided methods

everything is working now.

Ether 14-02-2011 08:49

Re: Holonomic Drive Program
 
Quote:

Originally Posted by cheezburger (Post 1022516)
we ended up making our own drive without the provided methods

everything is working now.

I'd be curious to see what you came up with. Are you open to sharing it?





All times are GMT -5. The time now is 22:18.

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