![]() |
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
we have our camera mounted to the top of our launcher. The launcher is located on the side of the robot, and is not a turret but it does tilt. We use the difference in the x values to determine how far away we are and we use it to determine if were centered. Right now we drive out dead reconing, and then the turn stops one the camera aligns with the target, then we open her up. Today we were scoring in between 7 and 9 of the 10 balls in autonomous.
|
Re: How does your auto-aim work?
Our camera is bolted directly to the robot frame, no pan or tilt. It is in line with the cannon.
We mechanically align the camera to have the target at the center when the cannon shoots balls through the center of the goal from the desired position. In use, when the driver requests it, the firmware uses a PID loop (sort of 2, for X & Y) to drive the robot until the center of the target is at the center of the camera. We also have a custom dashboard program that shows the driver(s) where the camera sees the target. They use this to decide when to activate the auto method, or for manual aiming. |
Re: How does your auto-aim work?
We use two cameras, each mounted on the pan/tilt servo, one on either side of the shooter, to "triangulate" the range to the target. Generally, the range estimate we get from that is accurate to within 5 inches. That gives us the x-vector that we need to plug in to the launch angle formula, given the constant Y-vector and the constant speed that we hold our shooter motors at.
This approach works well. |
Re: How does your auto-aim work?
We'll find out this weekend how (or whether) our auto-aim works. :rolleyes:
We fix-mounted our camera such that at the base of the ramp, the target is at the top of the camera's field of view, and at half court, it is at the bottom. Based upon the Y position of the blob centroid, we calculate (actually lookup) the required shooter speed. We also have an auto-aim driving mode which uses the blob centroid's X position as input to a PID control loop to get and keep the robot pointed at the goal. |
Re: How does your auto-aim work?
Quote:
|
Re: How does your auto-aim work?
Well, for ours, we use two functions, one for pan and the other for tilt (obviously). For our tilt, we simply use a lookup table based on the camera's tilt servo position, and drive the motor to a certain pot reading accordingly. For our pan, we set a zero position for when the camera is centered to the turret, and the turret drives until that center is reached.
Mogunus, I was wondering what the reason was for having two cameras. Can't you simply get the distance to the goal from: Distance to Wall = Height from Camera to Light / Tangent(Camera Angle) and Distance to Goal = Height from Camera to Light / Cosine(Camera Angle) Maybe accuracy increases from two cameras, I'm not really sure. |
Re: How does your auto-aim work?
accuracy could increase with two cameras if you have a problem with it tracking through a few pwm positions in the tilt of the camera. If your out by center field, that makes a big difference in calculations, so you could use the average angle from both cameras to get a better reading, but it would be more efficient to just take the numbers from two loops and average.
For our bot, we had an auto-aim that was working perfectly, but when you get to competitions and the bright lights drown out the targets, its a lot more unreliable. 220 confidence to 20 more unreliable. It also is a pretty large target, but if your shooting from further away, its nice to have auto-aim. We had a tilt and pan motors, each powered by relays, the pan was just a number based on the servo position of our camera it drove until the pot had the same number (after conversion, the pot was 16-bit). Same with the tilt, based on the distance to the wall, we found an angle, which was converted to a postition on the pot, and driven to it, as long as it was within the limits. Thats about it, not overly complex, and with these large nets, aiming is pretty forgiving. |
Re: How does your auto-aim work?
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. |
Re: How does your auto-aim work?
I am not a programmer but I'll explain it to the best of my abilities. Our robot has azimuth and elevation control on the shooter. We have pots on both. The camera has it's own azimuth and elevation control (the one provided in the kit) using servos. The camera is mounted to the shooter azimuth but not the shooter elevation. When the aim button is pressed, the camera searches for the target. When the target is found, it locks on. Then, the "brains" say "okay, where are my camera's servos pointed right now?" and "where do my shooter's pots say it is pointed right now?" and "why the heck aren't they pointing the same way?" and "let's make them point the same way." This all happens in about half a second. That is a non-programmer's description of it. Anyway, because of our turret, we can be pushed around and still be locked onto the goal. At the SoCal regional, it worked so well we won the Radio Shack Innovation in Control Award for it. However, after we won that award, teams came up with autonomous modes (ramming) specifically against us. When they hit us hard, we remained dead locked on the target, but the balls in the feeder mechanism jammed, and we could not use our unjamming function until driver control mode. In one of our Saturday qualifying matches, we made some really long shots, from our low down shooter even with robots trying to block us because we could reposition and still be locked on or easily lock on again.
Also, on our feeder mechanism, we have a light sensor so when the light beam is broken, the motor stops until the "fire" button is pressed again. This allows indexed feeding and control of exactly how many balls we shoot. |
Re: How does your auto-aim work?
Quote:
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. |
| All times are GMT -5. The time now is 12:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi