View Single Post
  #4   Spotlight this post!  
Unread 01-11-2009, 09: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: 587
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
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