cheezburger
19-01-2011, 15:28
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.
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.