![]() |
Several programming and electrical questions
Hey guys,
My team, 4058, finished a few weeks ago, so I figured I should start learning some more in depth programming and electrical techniques (yes, I do both, on a small team) so that I can pass on knowledge to the younger members of the team To start, I read a lot of teams were using PIDs on their shooters, and I am not sure what they are or what they do, so if someone could enlighten me it would be greatly appreciated. Another thing I would like to learn is how to use vision tracking. At boilermaker regional, we were relegated to putting a piece of tape in the center of the camera image to aim (crudely), and I figured using vision tracking could make scoring exponentially easier in all games, not just rebound rumble. The last thing I would like to know would be how encoders are used, how they are hooked up, and how they are programmed. I apologize if some of the things I said make no sense. If they do, let me know and I will try to reword the question. Thanks in advance for the help. |
Re: Several programming and electrical questions
Here are a couple of links from FIRSTWiki:
http://www.firstwiki.net/index.php/PID_controller http://www.firstwiki.net/index.php/C...PID_controller There are also some technical discussions in other threads on CD. If you are still wondering after the competition season (our regional is week 6 and my programmers are still busy) send me a message and I will have one of them get back to you. |
Re: Several programming and electrical questions
What programming language are you using? If you are doing labview there are a whole bunch of examples and tutorials to show many of these situations.
FIRST Community on NI.com |
Re: Several programming and electrical questions
Quote:
Encoders: These are devices that you mount onto a spinning shaft (i.e. shooter wheel shaft, or drive train shaft.) They are connected to motor controllers (i.e. jaguar) and tell the controller and/or cRIO how fast the shaft is turning, and in which direction it is turning. PID: This is a very commonly used method to get some system measurement (usually RPM) to a desired value quickly and efficiently. Think about accellerating from a red traffic light just turned green, where you want to get to 60mph as quickly as possible. Initially, you will floor it, but if you were to leave the gas pedal there, you'd eventually be going much faster than 60. You don't wan to leave it there until you get to 60, and then suddenly back off. Instead, as you approach 60MPH, you back off so that you smoothly get to 60. Similarly when braking. To stop when you see a yellow light, you first press on the brake pretty hard, but if you left your foot there, you would get quite a jolt at the end of the stop, so you back off on the brake as your speed slows. PID does the same thing, using a mathemetical model. It requires an encoder (or other feedback mechansm) to tell the model how far you are from your goal, how quickly you are approaching it and so forth. Vision: One quick improvement to 'tape' on the image is that you can program your driver station to draw a cross-hair (or in the case of this year's game a vertical line may be sufficient). One of the things we decided (sort of) this year is doing vision processing on the cRIO was over taxing of it-- so we send the image to the driver station. Once it is there, the best/fastest image processor we have is the human brain standing next to it. We have some 'sweet spot' shooting locations (key, midcourt, etc.) where we know the shooter speed needed (we have an encoder which tells us RPM). So we ended up not using any software for vision processing. |
Re: Several programming and electrical questions
Quote:
Thanks for all the feedback, guys, really appreciate it. |
Re: Several programming and electrical questions
Quote:
|
| All times are GMT -5. The time now is 18:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi