|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||||
|
|||||
|
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.
|
|
#3
|
||||
|
||||
|
Re: Holonomic Drive Program
Could you give me a link to that?
|
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
|||
|
|||
|
Re: Holonomic Drive Program
Its actually
drive.MecanumDrive_Polar(leftStick.getDirectionDeg rees (), leftStick.getMagnitude(), joystick.getTwist()); |
|
#6
|
||||
|
||||
|
Re: Holonomic Drive Program
thanks for all the advice, we ended up making our own drive without the provided methods
everything is working now. |
|
#7
|
||||
|
||||
|
Re: Holonomic Drive Program
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|