Go to Post "Your really pretty and I like your bot" - prettycolors91 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 02-14-2011, 12:14 AM
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: FIRST Robotics Competition C++ Programming Overview [Resources] [Mind Map]

We have our own PID library as well. In our case, aside from the benefits you mentioned, our PID library allows multiple PID controllers to interact. In particular, we defined a PIDDrive object where it takes two PID controllers, one for driving straight and one for turning. Each PID controller can have their own sensors (e.g. driving straight can use the wheel encoders or sonar sensors etc., turning can use the gyro, the compass or the camera etc). Imagine if you can tell the PIDDrive object to "drive forward 20 ft while maintaining heading to the goal seen by the camera". The drive PID controller will calculate the motor values to drive forward 20 ft while the turn PID controller will calculate the motor differential for maintaining the heading. The result from these PID controllers can be combined to generate the final motor values. The PID drive object is extremely flexible, you can tell it to follow a moving object and maintain distance. For example, drive forward and maintain 30-inch distance from the object in front. It can use the sonar sensor for the driving PID controller for setting the 30-inch target while using the camera as the sensor for the turning PID controller to follow the object in front. At first, we were trying to implement this with the WPI PID controller but found that it doesn't have the flexibility. So we wrote our own replacement.
__________________
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 10:23 AM.

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