View Single Post
  #5   Spotlight this post!  
Unread 04-01-2017, 20:48
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Driving Straight

Quote:
Originally Posted by YairZiv View Post
Hey, so as we get close to the season, there's one thing we wanna understand how to do. We wanna understand how to drive straight using autonomous period. Using a PIDController for distance will not work since the two sides of the chassis may drive in a different speed. Using a PIDController for speed might work a little better though it will be hard to land in the distance we tried to go to. So how do we go into doing something like that?

Good luck in the season everybody!
You can also look at our library in which you will find a PidDrive class that provides a method named "setTarget". It allows you to set the target distances in X or the Y direction. It also let you specified the "heading" you want to maintain relative to current heading. Don't worry about it being a FTC project. Our library is shared between FTC and FRC, so the TrcLib portion of the library is platform independent. So it would be identical code between FTC and FRC.
https://github.com/trc492/FtcSamples...cPidDrive.java
__________________
Reply With Quote