Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Autonomous Perception (http://www.chiefdelphi.com/forums/showthread.php?t=85072)

Tom Line 13-04-2010 01:08

Re: Autonomous Perception
 
Quote:

Originally Posted by kamocat (Post 953042)
I was going to say that your estimation is overshot, but then I figured I'd calculate it out.
The SONAR has a sample rate of 20hz, with the analog signal updated between 38 and 42ms into the cycle. If you sample just before it updates the analog, there can be up to 92ms lag after the signal is measured.
At 10 ft/s, that puts you at about 10 inches.
Now the processing time:
If it takes you 500ms to process, then you're in serious trouble.
I think 100ms is reasonable and achievable, so we'll go with that. You've added 12 inches to your distance.
How far does it take to slow down?
If you have a coefficient of friction of 1, then you can decelerate at 1g, or 32 ft/s/s.
10ft/s ÷ 32ft/s/s = ~300ms. 300ms * 10ft/s * 1/2 = 1.5 feet, or 18 inches.

Combined, it's taken 40 inches to slow down; a bit over 3 feet.
Let's hope the other robot isn't travelling your way.

No doubt! The one thing you didn't add in is the pure lag in the maxbotix sensor (there's more than just processing lag). For whatever reason, not only does it take some time for it to see something moving quickly to you, it ends up overshooting when you stop moving.

We had to work hard to use these until we figured out a few tricks for orienting them. Mainly, in 2008, we had the best results when we bounced the sensor off the inside wall. Our robot would constantly adjust to be within 1.5 feet of that inside wall. When the the reading jumped to more than 3 feet we hung a sharp left because we knew we had passed it.

The trick there is that the inside wall doesn't move in relation to the robot very much or very quickly assuming you're close to driving parallel to it.

In addition, we had a sensor on the front of the robot and were sweeping it with a servo. However, we found that (as you calculated) you can simply not get enough time to sweep it. You're going to smash into something before you get a full check of whats in front of you (we were sweeping 135 degrees). So we went to a static sensor and tuned when to hit the breaks based on the idea that in overdrive it's unlikely anyone will be driving toward you - they will probably simply be stopped. So we adjusted it by putting cardboard boxes in the line of travel.

There's a couple very neat videos of our robot stopping to let another one go by, then continuing to drive :D. It LOOKS awesome, like our robot is thinking about it, but it really was just luck that it worked so well.

Tom Line 13-04-2010 01:13

Re: Autonomous Perception
 
Quote:

Originally Posted by reversed_rocker (Post 953104)
wouldnt the goal be the same color as team's bumpers? could that confuse the color detection? i think it would be much easier to use a gyro for field orientation rather than color detection, thats going a bit overboard on something that should be relatively easy. gyro drift shouldnt be too bad because you only need to be accurate to 180 degrees

The problem with a gyro is that it can easily be knocked 180 degrees out by a hard collision. So what you'll need to do is use a combination of the gyro and the encoders on your drivetrain, and you'll need to correlate the two to wipe out any potential errors.

For instance, if your gyro is showing you at 170 degrees and you get hit, and your encoders are showing 210 afterwards but your gyro is showing 0, you can guess which is more likely.

This is, of course, assuming a very stable very non-slipping drivetrain. Once you add that in you'll need to go elsewhere other than drivetrain encoders.

This will still end up varying over the period of a match, so you may want to go a step further and find one other way to re-zero your system, perhaps correlating it to the camera and a sensor you can check your distance to the wall with.

AdamHeard 13-04-2010 01:23

Re: Autonomous Perception
 
In robocup, each team is given access to the feed from an overhead camera. Each robot has a distinct color pattern on top of it, and teams can use this to determine position and other information about all the robots on the field. Some real cool things could be done if FIRST implemented such a system

Ian Curtis 13-04-2010 01:30

Re: Autonomous Perception
 
I don't think there's a need to actively search for balls. They always end up against the walls. Always. And it seems that teams never realize this, and always have trouble picking balls when they are resting against the edge of the field. They ended up against the walls in 2004, 2006, 2008, 2009, and now in 2010. When will we learn? :p

We used the Sharp IR sensors with great success to detect where balls were in our mechanism last year. We put the Maxbotix Sonar sensors on servos to try and find other robots to knock in autonomous in 2006. It even worked once!

Al3+ 13-04-2010 02:05

Re: Autonomous Perception
 
Quote:

Originally Posted by Tom Line (Post 953155)
The problem with a gyro is that it can easily be knocked 180 degrees out by a hard collision. So what you'll need to do is use a combination of the gyro and the encoders on your drivetrain, and you'll need to correlate the two to wipe out any potential errors.

For instance, if your gyro is showing you at 170 degrees and you get hit, and your encoders are showing 210 afterwards but your gyro is showing 0, you can guess which is more likely.

This is, of course, assuming a very stable very non-slipping drivetrain. Once you add that in you'll need to go elsewhere other than drivetrain encoders.

This will still end up varying over the period of a match, so you may want to go a step further and find one other way to re-zero your system, perhaps correlating it to the camera and a sensor you can check your distance to the wall with.

For zeroing the angle, how about having two ultrasonics bouncing off the walls on either side? You can calculate the distance between the walls by adding the two readings and the width of the bot, and you know that the field is 27' wide, so you can do some sort of trig calculation to find an angle.

This is of course assuming (1) you're bouncing off the right walls, (2) there aren't any obstacles on either side, and (3) the angle is small enough that you get a proper/accurate reading.

oddjob 13-04-2010 12:01

Re: Autonomous Perception
 
Quote:

Originally Posted by Tom Line (Post 953155)
The problem with a gyro is that it can easily be knocked 180 degrees out by a hard collision. So what you'll need to do is use a combination of the gyro and the encoders on your drivetrain, and you'll need to correlate the two to wipe out any potential errors.

For instance, if your gyro is showing you at 170 degrees and you get hit, and your encoders are showing 210 afterwards but your gyro is showing 0, you can guess which is more likely.


A magnetic compass might be an option, e.g. NXT CMPS-Nx, either to use directly or to make gyro corrections.

reversed_rocker 13-04-2010 13:26

Re: Autonomous Perception
 
compasses are cool assuming that they work with all the electronic noise that gets stirred up at the comps. I havent used one myself tho so i guess that makes my opinion void.

anyway, if this is going to be done by any team its almost a give that theres going to need to be more than 1 experienced programmer on each participating team. I'm sure theres a couple people out there who think they could pound this out with 4 mountain dews, an extra large bag of munchies and a good weeks work, but the sheer amount of testing required to get this to work will be impossible without a fairly large and experienced group of programmers.

so my suggestion is to use this whole coopertition hogwash that FIRST teams keep on talking about. I dont like the idea of any robot being the same as another, but if we share some basic mechanism with each other (maybe some robots have a common drive train, ball control, or kicker, but hopefully not all 3 in common). Anyone who writes code for a mechanism and shares it online will be privvy to mechanical specs and code for mechanisms for other participating teams. maybe we should make a website completely devoted to teams working on all autonomous robots.

Tom Line 13-04-2010 14:59

Re: Autonomous Perception
 
Quote:

Originally Posted by oddjob (Post 953278)
A magnetic compass might be an option, e.g. NXT CMPS-Nx, either to use directly or to make gyro corrections.

Teams have attempted to use Compasses but have had difficulties due to the large amounts of metal we use in our robots, the large amounts of electrical fields our motors and wiring put out, and the large metal field and building that usually surround them.

That is a non-trivial pursuit. I believe Al from 111 has experience with them and has commented on how difficult they were to apply.

Tom Line 13-04-2010 15:00

Re: Autonomous Perception
 
Quote:

Originally Posted by Al3+ (Post 953166)
For zeroing the angle, how about having two ultrasonics bouncing off the walls on either side? You can calculate the distance between the walls by adding the two readings and the width of the bot, and you know that the field is 27' wide, so you can do some sort of trig calculation to find an angle.

This is of course assuming (1) you're bouncing off the right walls, (2) there aren't any obstacles on either side, and (3) the angle is small enough that you get a proper/accurate reading.

Unfortunately, most ultrasonics become inaccurate (+/- a foot) when you start moving them around due to processing lag and non-perpendicular surfaces. That would be a difficult proposition unless you picked specific times that the robot would do some special action to try to rezero itself.

kamocat 13-04-2010 18:28

Re: Autonomous Perception
 
Quote:

Originally Posted by Tom Line (Post 953155)
The problem with a gyro is that it can easily be knocked 180 degrees out by a hard collision. So what you'll need to do is use a combination of the gyro and the encoders on your drivetrain, and you'll need to correlate the two to wipe out any potential errors.

For instance, if your gyro is showing you at 170 degrees and you get hit, and your encoders are showing 210 afterwards but your gyro is showing 0, you can guess which is more likely.

This is, of course, assuming a very stable very non-slipping drivetrain. Once you add that in you'll need to go elsewhere other than drivetrain encoders.

This will still end up varying over the period of a match, so you may want to go a step further and find one other way to re-zero your system, perhaps correlating it to the camera and a sensor you can check your distance to the wall with.

I think you might be able to use an analog trigger to tell you when your gyro is maxed out, and then you know you have to reorient yourself against a wall or a bump.
Another option is having a hi-rate gyro that is only used during impacts, for approximate positioning.
http://www.sparkfun.com/commerce/pro...oducts_id=9425
(I think 1500º/s is enough, but it does require a 3.3v regulator.)

AFTERTHOUGHT:
Getting a robot to track its location most of the time is pretty easy, but getting it to track its location correctly ALL of the time is quite difficult.


All times are GMT -5. The time now is 05:23.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi