View Single Post
  #18   Spotlight this post!  
Unread 28-10-2014, 16:18
RyanShoff RyanShoff is offline
Registered User
FRC #4143 (Mars Wars)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Metamora, IL
Posts: 147
RyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to beholdRyanShoff is a splendid one to behold
Re: Jaguars and FAST PID Looptimes

Quote:
Originally Posted by Ether View Post
Calling all teams who have deployed successful "Unicorn" swerves with 3DoF driver interface: please share your experience/data concerning steering dynamic response.


Bag motor 90:1 to wheel through versaplanetary.

This loop was minimally tuned to stop any shaking. We didn't spend a lot of time optimizing it. Response of wheels turning 90 degrees wasn't timed. I would guess around 250ms. As tuned, it visibly overshoots a little and comes back on a full speed 90 degree move.

This was all copied from Bombsquad. Looking back on their original code (2013), it looks like we took D from 0 to .2 and increased the STEERPOW from .75 to 1. I don't know what motor or reduction they used.

Next year we'll be looking to decrease the loop period and the tolerance if we do a swerve again. The speed and response was just fine but it could have driven straighter.

PID loops setup like this:

Code:
#define CONTINUOUS true
#define P 1.0
#define I 0.0
#define D 0.2
#define F 0.0
#define POTMIN 0.2
#define POTMAX 4.8
#define STEERPOW  1.0
#define TOLERANCE 0.2
#define PERIOD .02
#define RATIO 1

driveTrainFrontLeftDrive = new Talon(1, FLD);
driveTrainFrontLeftPos = new AnalogChannelVolt(1, FLP, true, RATIO);
driveTrainFrontLeftSteer = new Talon(1, FLS);
driveTrainFrontLeft = new PIDController(P, I, D, F,  driveTrainFrontLeftPos,
driveTrainFrontLeftSteer, PERIOD);
driveTrainFrontLeft->SetContinuous(CONTINUOUS); 
driveTrainFrontLeft->SetAbsoluteTolerance(TOLERANCE); 
driveTrainFrontLeft->SetInputRange(POTMIN, POTMAX);
driveTrainFrontLeft->SetOutputRange(-STEERPOW, STEERPOW);
__________________
Ryan Shoff
4143 Mars/Wars
CheapGears.com