View Full Version : Moving to a point between lights with autonomous
minfranco
12-02-2007, 20:43
I was just wondering if anyone has discovered a way to get the robot to a column between lights while in autonomous. A pointer in the right direction would be very helpful!
half geek
12-02-2007, 21:02
A very simple method would be to find two lights based on virtual windowing or otherwise, then drive to the center.
How to get there and position yourself accurately is a bigger problem.
I was just wondering if anyone has discovered a way to get the robot to a column between lights while in autonomous. A pointer in the right direction would be very helpful!
We have a good technique. It also doesn't use a camera.
minfranco
12-02-2007, 22:30
well how exactly would u do that without the light?
Is there anyone willing to point us in the right direction? We are already using the virtual window splitting, but the camera shakes violently between the 2 lights, and only inches up. It is not nearly fast enough. Has anyone been able to resolve this, or solve this conundrum in any other creative way? We would love to chat about this. ( dmazza90@gmail.com, infranco@gmail.com, gk2400 (aim) coolsn06 (aim)). You could post it on our forum too!! :: http://longwoodrobotics.org/ :: :-) Thanks a million in advance. We know we can always count on the Chief Delphi community.
well how exactly would u do that without the light?
There's a big giant eight-sided object in the middle of the field. You should be able to find that without a camera. The camera just gives you one way of doing it.
Bomberofdoom
13-02-2007, 04:03
Well, two things:
1) You need to get to the exact point in between the two lights. The rack is allways twisted in the begining of the game. The point between the two lights can always be in a diffrent direction. How are you going to get EXACTLY to that point without the camera?
2)From what I've heard, the rack itself is can be moved less than a meter from the cetner of the arena, where we all expect it to be. Now how you're gonna' find the point?
minfranco
13-02-2007, 06:54
There's a big giant eight-sided object in the middle of the field. You should be able to find that without a camera. The camera just gives you one way of doing it.
I get that it is not difficult to drive up to the light, and I'm perfectly aware of the size of the object on the field. Maybe you read the post to fast we are looking to do this in autonomous so if you have a method post it.
There are numerous ways of detecting the rack without a camera, including:
Sonar
IR Distance Sensors
Intricate system of limit switches
Banner sensors
Photogates
The problem is are any of these as accurate as the camera? In most cases I'd say no, but depending on how you implement them, who knows...
psquared89
13-02-2007, 08:23
Wow, I hope I don't start off a discussion off-topic or offensive to anyone here, but I am truly disappointed in this thread. minifranco came to CD asking teams for a little help, a pointer in the right direction, and all he got were a series of cryptic, useless responses of teams guarding their hard-earned success instead of sharing them, even the tiniest part of them, with the community. I understand the competitive nature of the game, but why would you waste both his time and yours by rubbing in his face that you had succeeded where he had failed; I don't think he much cared that you did succeed, congratulations and all of that, he came here looking for help.
That brief rant non-withstanding, I am not our team programmer, but I do have some understanding. One method that, if not entirely accurate, should be somewhat successful:
Take advantage of what you know:
1.) Where YOU are, call this position the origin.
2.) Where each light is, relative to you. You know the structure these points are mounted to. As you travel towards them, keep calculating the relative growth/decay in the brightness of each light; yes, the camera is flipping back and forth, but in this case that's a good thing, updating your data for the two points roughly once/2sec. Using this growth/decay data and your relative position and orientation (all being relative from your starting position and orientation, the only thing you can really depend on (and that's depending on your drive team...)), you can extrapolate the position and orientation of the rack.
This does demand that you have some nice sensors on your robot; wheel encoders will well enough for position relative to your starting origin, or an accelerometer if you're feeling bold.
Hope I could help and sorry for the rant.
Well, two things:
1) You need to get to the exact point in between the two lights. The rack is allways twisted in the begining of the game. The point between the two lights can always be in a diffrent direction. How are you going to get EXACTLY to that point without the camera?
I repeat, there are plenty of things to cue off aside from the lights. Look at the drawings of the rack.
And who says you need to get to exactly one point? There are many ways of making a scoring mechanism, and most of them should have a reasonable tolerance for "hunting" to find the spider leg.
Never assume there is only one solution to a problem.
(I'd tell more, but I don't want to give up too much strategy).
There are numerous ways of detecting the rack without a camera, including:
Sonar
IR Distance Sensors
Intricate system of limit switches
Banner sensors
Photogates
Exactly my point. Our team has evaluated these, and some of these are surprisingly workable, or at least have been on our test rack.
Wow, I hope I don't start off a discussion off-topic or offensive to anyone here, but I am truly disappointed in this thread. minifranco came to CD asking teams for a little help, a pointer in the right direction, and all he got were a series of cryptic, useless responses of teams guarding their hard-earned success instead of sharing them, even the tiniest part of them, with the community.
I'm not trying to be too cryptic, I'm trying to reinforce the idea that there are many approaches to autonomous mode, not just one technique (camera imagery). The original poster asks a real question (how to position the bot between the lights, when many (most?) camera installations won't be able to see one or both lights at this location). I'm trying to point out that if you get to this point, there may be simple solutions one can try aside from or in addition to camera strategies.
Too many discussions I've seen make the assumption that there is one way of doing this, which simply isn't true. The simply camera approach might be the best way. The double camera approach might turn out to be better. I'm reminded of both of the last two seasons, in which people proclaimed early on that cameras were absolutely necessary, and in both cases, many teams went on to do surprisingly well without (Team 95's robot last year, for example, ended up without a camera since we found it gave little benefit)
The only cryptic part comes from not needlessly exposing our team's specific strategy too early.
Hope I could help and sorry for the rant.
You have some valid points.
Tom Line
13-02-2007, 10:36
There are dozens of ways that would work, with varying degrees of success.
You could use blob size to determine your angle to the front of the light. (Yes, yes you can. We've done it.)
You could track multiple lights with a single camera simultaneously.
You can track multiple lights with a single camera by switch back and forth between them.
You could track one light while dead reckoning. With 2 positions and distance measures to the same light, along with the distance of traveling, and angle from the light you can triangulate with reasonably good accuracy.
You can drive the arc of a specific distance of the light until you lose the camera tracking. This is very repeatable (you move along at the same distance from the light until you pass the "event horizon" of the light).
Basically, to be able to score on any post in auton, you MUST have a way of determining your position relative to the racks.
To be able to score only on the spiders under the lights is significantly easier, and I suspect you'll see far more of this in the early competitions.
The neat part about this whole thing is that while I've given you a good number of ways to do what you want - I haven't told you how we're going to do it :)
To be able to score only on the spiders under the lights is significantly easier, and I suspect you'll see far more of this in the early competitions.
Indeed it is, and I know our team is going that route. We looked at trying to score on in between legs early on, but decided it really wasn't worth it unless we had alot of extra time to work on that.
Have you gotten autonomous to work for a spider leg directly under a light yet (the full autonomous mode, not just tracking it)? If you haven't, I recommend you do that first and not worry about dual-light tracking.
Indeed it is, and I know our team is going that route. We looked at trying to score on in between legs early on, but decided it really wasn't worth it unless we had alot of extra time to work on that.
We're counting on filling in the gaps between the other teams going for the ones under the lights...
Daniel_LaFleur
13-02-2007, 14:54
I was just wondering if anyone has discovered a way to get the robot to a column between lights while in autonomous. A pointer in the right direction would be very helpful!
I'm not the programmer for our team, but ....
In order to be able to place a keeper between the spider legs that have the lighted targets your camera needs to detect 2 targets (*note: that may not happen depending on initial setup).
Once you have 2 targets (since they have range data) you need to do some trig. You need to calculate the center of the line between the lights, then calculate the offset of the spider leg from that line. Then you need to plot a course from your current position to that position.
@ kaszeta
Since he specifically asked for the spider leg between the target lamps, how are you going to know which legs have target lamps and which ones dont without a way of detecting the lamp???
Since he specifically asked for the spider leg between the target lamps, how are you going to know which legs have target lamps and which ones dont without a way of detecting the lamp???
Several techniques, but we're basically counting on the other teams on our alliance going for the ones on lights, and avoiding them. We've got several coordination strategies that should take care of interfering with alliance partners in case they have different strategies.... Right now, only time will really prove how well they work. :)
Andrew Schreiber
15-02-2007, 00:37
How about, instead of constantly checking your position on the field using the camera you only check once and figure out where you need to go. if you have some sort of guidance system (more accurate then time) then it is very possible to dead reckon to a position on the field and place from there. Simply calculate the way the moved the rack based off what you SHOULD be seeing as opposed to what you ARE seeing. Think about how the deep space probes navigate, they have a star map so they know what they should be seeing and if they get something different they react accordingly. One huge advantage is the decrease in the amount of code the processor has to run so it can run faster because it doesnt have to run through the math library every time. Though I like what kaszeta has been saying, if you cant figure it out with the camera there are other options out there. Perhaps your scoring mechanism will automatically find the spider leg... just think outside the box. The idea i posted just now is what I intend on doing (for at least one of the approaches) this year. Hope that wasn't too cryptic and actually helped a little.
dpick1055
15-02-2007, 00:57
The problem with attempting dead reconing based off where the lights start is that it is very hard to account for slippage of your wheels and what other robots will be doing. If your alliance has 3 robots going for the rack at once and you hit another robot on your way without some sort of feedback you will have no way of correcting yourself and getting back on target.
The problem with attempting dead reconing based off where the lights start is that it is very hard to account for slippage of your wheels and what other robots will be doing. If your alliance has 3 robots going for the rack at once and you hit another robot on your way without some sort of feedback you will have no way of correcting yourself and getting back on target.Dead reckoning doesn't mean just setting some motor outputs and waiting for a specified amount of time. Dead reckoning in this case refers to the process of estimating the position of your robot based solely on speed and direction of travel and time elapsed since the last known position. The "reckoning" part referes to the fact that you can't get new known position information based on the location of the rack. You can, however, account for wheel slippage by using accelerometers and a gyro, which track absolute--not commanded--speed and heading since you left where you know you were. This system can be very accurate if implemented correctly.
Robinson Levin
Thank you all for you suggestions so far. Damien1247, I think I am going to do something similar to what you suggested, however, dpick1055 does have a valid point about the inaccuracy. To solve both problems, why not use the camera to get close to the rack, and then do "dead reckoning" based on where the camera tells you you are at that point. Anyway, thanks again, keep the suggestions and ideas pouring in!
mjbrauck
15-02-2007, 17:57
I might be wrong about this but if you use the old camera code that dose not actually know when it sees 2 lights but thinks it is 1 big light, and you lower the confidence necessary to track it should track directly between the 2 lights almost acting like a 3rd light in the middle
Just in case someone hasn't seen this yet, check out this thread to see what I am talking about for tracking 2 lights: http://www.chiefdelphi.com/forums/showthread.php?t=52467
Yea, Donut has a point. Our team started this year and I do most of the programming. I haven't been able to figure out a way to pin down the spot between lights due to the movement of the rack with a camera and encoders, but I can get a tube on any spot under lights, thats 12 spots we can get. So even if you can only get the ones under the lights, it doesn't mean that you're at that big of an disadvantage. (although if your team can get 3 keepers in a row horizontally you are in pretty good shape)
CircularLogic
17-02-2007, 14:18
Disclaimer: I do not have a robot, nor have I seen a robot the entire season (stupid graduating High School to go to college). However I have been thinking about this for quite some time.
Note: I fully thought it out around kick off. This is what I remember. Hopefully it can get you thinking in a good direction.
The first thing you need to have planned for in your autonomous is knowing your starting position, because that will make a difference later on.
When the autonomous period starts, have your camera track the closest light. Figuring out which light is the closest should be able to do be done relatively easily based off of the fact that you know all cameras are a constant distance apart. Then simply do an an angle check of the pan on the camera. If its too great, tell the camera to search the other way.
Now, once you have that target, you can make some reasonable estimates about the position of the off-light row. Using trig (specifically the law of cosines) you should be able to calculate the distance you need to adjust your robot in the X axis direction. That requires some ability to make reasonably accurate turns and movements (if you dont have some type of closed loop system, I would say go with the slowest viable speed to make those movements). Once you are aligned in the X direction, deploy your mechanism and drive forward the estimated distance that will get the ringer on the spider. I realize that you will be approaching the spider at an angle, but worst case scenario is about a 45 degree approach to it, which most arm designs should be able to handle.
Its not the best way. Its probably not fully thought out. It absolutely isnt tested. But the the thing it has going for it is that the math will work. There are a number of known things about the field when you first start the match, you have to use those to your advantage. It involved a lot of angle calculations. It involves creating lots of triangles to figure out distance accurately. When looking to make those triangles, remember a couple of things. Your robot will always be approximately the same distance away from the rack regardless of orientation but dependent on starting position.
The straight line distance is between spiders is a very useful thing for creating triangles.
Good luck.
Our team can (probably) score between lights. I made a rom table of trig values and used that to approximate where each light is. Knowing two lights and their relative positions to each other, it can find the center of the rack and angle of rotation, and therefore where leg #3 is. Of course, this is still untested.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.