Go to Post Then there's the electronics, pneumatics, and all that stuff on top that will magically make the ball score billions of points. That will add up to a lot of weight. - MrForbes [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 29-02-2016, 13:09
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: GRIP WITH PID and 1 Target Tracking

Quote:
Originally Posted by mlyhoops View Post
So in this example the PIDController constructor only has 1 output source. What happens if I am trying to use 6 motors? (Since it is the drive train)
So these are all separate speed controllers? In that case, you could use a lambda to set all of them.

Code:
PIDController pid = new PIDController(0.8, 0.01, 0.2, gyro, speed -> {
	frontLeft.set(speed);
	centerLeft.set(speed);
	backLeft.set(speed);
	
	frontRight.set(-speed);
	centerRight.set(-speed);
	backRight.set(-speed);
});
Code:
double setpoint = calculateSetpoint();
pid.setSetpoint(setpoint);
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC

Last edited by ThomasClark : 29-02-2016 at 13:12.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi