OCCRA
Go to Post just flat out, full force, take no prisoners driving - spears312 [more]
Home
Go Back   Chief Delphi > Technical > Programming > WindRiver C++
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-10-2009, 12:30 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
I feel better now.
AKA: Jared341
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 2,639
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
PIDController class (PIDSource/PIDOutput interfaces?)

I was looking at the WPILib codebase and saw that their PIDController class uses the PIDSource and PITOutput interfaces for I/O to/from the control loop. However I was surprised to see that no WPILib classes actually inherit from these interfaces.

Is the intention that I should inherit from PIDSource and PIDOutput as necessary? Ex:

Code:
class PIDEncoder : public Encoder, public PIDSource
{
... (override PIDget() here)
};

class PIDJaguar : public Jaguar, public PIDOutput
{
... (override WritePID() here)
};
Or is there some other intended design pattern that I'm not getting?

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 01-10-2009, 06:51 PM
wt200999's Avatar
wt200999 wt200999 is offline
Registered User
AKA: Will
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Dallas, Texas
Posts: 214
wt200999 will become famous soon enoughwt200999 will become famous soon enough
Send a message via MSN to wt200999
Re: PIDController class (PIDSource/PIDOutput interfaces?)

Give it a try and see what happens. Tell me how its goes, I am starting to look at the same thing now.


also

Quote:
All sensors that can be used with the PID class will implement the PIDSource
They probably haven't implemented it themselves.
__________________
FIRST LEGO League 2005
FRC Team 870 Student 2006 - 2009
FRC Team 870 College Student 2009 - 2013
FRC Team 3005 Mentor 2014


Last edited by wt200999 : 01-10-2009 at 07:19 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-10-2009, 08:39 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
I feel better now.
AKA: Jared341
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 2,639
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: PIDController class (PIDSource/PIDOutput interfaces?)

Quote:
Originally Posted by wt200999 View Post
Give it a try and see what happens. Tell me how its goes, I am starting to look at the same thing now.


also



They probably haven't implemented it themselves.
Thanks for responding. Yeah, I guess that WPI didn't get to it yet. Extending sensors/outputs should be just fine.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-11-2009, 08:49 AM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: PIDController class (PIDSource/PIDOutput interfaces?)

The idea is that you create subclasses of whatever you want to read inheriting PIDSource and whatever you want to control inheriting PIDOutput. They provide the methods to get the values from the sensor and provide output values for the controlled thing.

It works that way because a single sensor might not be used, but maybe some group of sensors, or a camera X position, or something more complex. And the thing being controlled may be more complex then just a motor.

We'll try to post an example later today.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
So class of 07... santosh College Teams 31 04-21-2007 08:52 AM
Cool Operator Interfaces rsilverstein Control System 19 03-29-2007 11:14 PM
Carrying Operator Interfaces On Airplanes? Richard Neese Technical Discussion 8 04-01-2003 08:32 PM
class of 03 Andrew Rudolph Chit-Chat 6 03-04-2003 02:52 PM
In class? Quain Chit-Chat 19 05-15-2002 09:33 AM


All times are GMT -5. The time now is 07:17 PM.

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


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