Go to Post To borrow a slogan from the last place KC Royals "It's Our Time" The curse will be broken! ;) - Alpha Beta [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #28   Spotlight this post!  
Unread 27-03-2006, 14:09
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: How does your auto-aim work?

Quote:
Originally Posted by iamthetallpaul
I wish I had had more experience to learn about PD, PID, and PI loops, this was my first and only year as our only programmer (any my only year on the team). Th last one graduated and left me with nothing.

I used a slightly modified version of Kevin's code. Instead of driving a pan servo based on the pan_error, pan_error is just added to or subtracted from 127 to drive the turret motor towards the center of the light. Actually slightly off center since the camer is mounted off center. Tilt is exactly the same and the hood is a lookup table.
That's effectively P control, power output proportional to the error, with a gain of one (That is the output is the error times one, which is just the error). If you'd like a better explanation of P, I, and D contact me via PM and I'd be happy to help you out.

Our auto aim works similar to 696s but the camera is directly mounted to the shooter, our brain just goes "Where are we?" followed by" Where does the camera say we want to be?" and then using the error computed from that, runs through a P, I, and D formula with their own specific gains (some of them very low) set, then we run sanity checks on all the values to make sure they're sensible, add them up, check that (We're so paranoid ) before returning it from our aiming function, then, depending on mode it's either use to drive the Heads-Up display, the pan motor, or both.

Firing consists of three modes:

Manual - Camera feedback drives LED HUD on operators safety glasses, operator can start firing checklist at will, pan control is handled by a dial on controls representing absolute position, no auto-targeting.

Semi-Auto - Camera feedback drives pan motors to maintain targeting on goal, drives LED HUD on glasses, operator can start checklist at will, auto-targeting, no search. This mode is currently not implemented due to a few reliability issues.

Auto - Camera feedback drives pan motors to seek and maintain targeting with search algorithm, drives LED HUD on glasses, checklist constantly cycling and firing when completed, auto targeting and search within current field of view.

The checklist runs through a series of sensor checks to make sure the system is ready to take a shot:

1. Is there a ball in the firing mechanism? (Optical beam sensors)
2. Is the piston in ready position? (Reed switch)
3. Are the impeller wheels up to speed? (Tachometer/DC Motor from kit)
4. Do we have permission to fire? (Firing button still pressed/Auto fire mode)
5. Are we on target? (Camera/Overridden in manual mode)

We use manual mostly while in driver mode because our operator responds to changes faster than our conservative PID control (we slowed it down for system stability, working on improving that as well) whereas our autonomous mode, at least a few of them ;-) uses the camera based Automatic Mode to acquire a lock and score during autonomous. It worked pretty well, in the semifinals and quarterfinals of SBPLI we were rammed several times in autonomous, the turret corrected and continued scoring.

The heads-up display are two bright LEDs mounted so they're on the edge of our operators peripheral vision, they indicate to which side of the turret the target is on, in other words, which way to turn, both light when on target, neither light when the target is not visible to camera and they blink back and forth rapidly if communications with the camera fail.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
 


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
What Artist Influence You? Koko Ed Chit-Chat 12 01-12-2006 11:33
Springs and Work sanddrag Math and Science 11 17-05-2005 18:35
(part II) We aim for the stars Ken Leung General Forum 6 03-05-2005 16:57
Who knows how the motors [I]really[/I] work? Wetzel Chit-Chat 5 13-02-2002 21:50
Does anyone on this board work at home depot? mnkysp6353 General Forum 2 30-12-2001 13:27


All times are GMT -5. The time now is 16:49.

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