|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Learning Simple PID
Hello CD,
Can anyone please post tutorials or working sample Java code for someone learning PID loops and gyro programming. Iterative or Command Based Java is good! Thank you so much. ![]() |
|
#2
|
|||
|
|||
|
Re: Learning Simple PID
I know this is silly, replying to a member of my own team, but here are a few links:
http://www.chiefdelphi.com/forums/sh...d.php?t=106082 http://www.chiefdelphi.com/forums/sh...hreadid=110220 http://www.chiefdelphi.com/forums/sh...90&postcount=5 |
|
#3
|
|||
|
|||
|
Re: Learning Simple PID
Also check out http://wpilib.screenstepslive.com. There is a bunch of documentation that was posted yesterday and more coming as fast as we can write it.
Brad |
|
#4
|
||||
|
||||
|
Re: Learning Simple PID
Thank you for the helpful links!
The main goal I want to accomplish with these resources is to implement a drive straight system with our tank drive code. I am having trouble figuring it out. Essentially I want to use the gyroscope to run and check if the robot is zeroed, (when in a "drivestraight" command), so that if it comes out of alignment, then it will "re-zero" itself, and continue driving straight. Has anyone produced a java method for doing this yet, that they would like to share? Thank you. |
|
#5
|
||||
|
||||
|
Re: Learning Simple PID
Quote:
http://www.chiefdelphi.com/media/papers/2438 edit: I should have mentioned: If your vehicle is not driving straight when so commanded, check the hardware first before trying to correct it in software. Check drivetrain alignment and friction on left & right sides. Check your wiring to make sure you don't have asymmetric voltage drops left vs right. Check the left & right motors to make sure they have similar performance curves. Last edited by Ether : 27-12-2012 at 16:17. |
|
#6
|
||||
|
||||
|
Re: Learning Simple PID
What's the general opinion on using PID through the Jaguars vs using it through WPILib?
And what's the correct procedure for PID (either distance or speed) when you have one encoder on each side of the drivetrain? Average the two together, or command them both separately? |
|
#7
|
||||
|
||||
|
Re: Learning Simple PID
Quote:
|
|
#8
|
|||||
|
|||||
|
Re: Learning Simple PID
Generally, you pick one parameter to control and then control it. Trying to control two parameters will lead to conflicts.
Using the built-in PID in the Jaguar allows you to control that Jaguars output. If you want to control the outputs from multiple Jaguars quasi-independently, such as in the drivetrain, you would need to do it at a higher level such as in your cRio. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|