Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Vision Targeting for Aerial Assist 2014 (http://www.chiefdelphi.com/forums/showthread.php?t=123994)

MikeE 10-01-2014 14:43

Re: Vision Targeting for Aerial Assist 2014
 
I am seeing at least two strands of assumptions in this thread.

Identifying specific objects and tracking them under ideal conditions is an very interesting, worthwhile and fairly achievable project within the skill set of many capable teams.

Doing so in the real world on a robot, in competition, with intervening fast moving objects, variable lighting, possible network issues (if DS processing), another team playing heavy defense on you, then relying on the data to perform a critical dynamic function on your robot is a totally different scale of problem.

Justin Shelley 10-01-2014 18:29

Re: Vision Targeting for Aerial Assist 2014
 
Since auto is the only part where a single robot can score competitively by itself i think it will be even more important than usual to score the max possible in auto. At weaker districts and regional teams that can score their alliance partners balls in the hot goal will be far ahead of most other teams. To me vision tracking of balls and hot goals in auto is a top priority

faust1706 12-01-2014 14:09

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by Justin Shelley (Post 1325215)
Since auto is the only part where a single robot can score competitively by itself i think it will be even more important than usual to score the max possible in auto. At weaker districts and regional teams that can score their alliance partners balls in the hot goal will be far ahead of most other teams. To me vision tracking of balls and hot goals in auto is a top priority

took at what simbotics did in logomotion, 2011. They would hang their uber tube and their partner's. I believe I saw them hang all 3, but I could be mistaken. A team on einstein that year hung their partner's tube as well. It was crazy and ingenius because a lot of teams had trouble with autonomous that year (at the regional I went to and galileo), us included for the first few matches. But, this year autonomous mode is only 10 seconds, so it will be more difficult, but not impossible.

video of simbotics here: https://www.youtube.com/watch?v=4l-Kq_tZ8cA

bs7280 12-01-2014 19:27

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by faust1706 (Post 1320719)
Track the hot zone, the balls (calculate its speed and go to where it will be autonomously), track other robot and pass the ball so it will meet them in their path. Track opposing robot so you can autonomous move around them. Track the vision tape on the wall and index from that.

Not going to lie, this this very elementary stuff.


How do you plan to track other robots?

SoftwareBug2.0 12-01-2014 21:37

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by bs7280 (Post 1326095)
How do you plan to track other robots?

He seems to be assuming that all robots are rectangles with bumpers colors in the obvious locations. If that's the case and he goes through with his plan for an autonomous robot then I'll look forward to seeing what his robot does when going up against a robot that looks like this: http://www.idleloop.com/frctracker/p.../2013/2972.jpg

faust1706 13-01-2014 00:15

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by SoftwareBug2.0 (Post 1326170)
He seems to be assuming that all robots are rectangles with bumpers colors in the obvious locations. If that's the case and he goes through with his plan for an autonomous robot then I'll look forward to seeing what his robot does when going up against a robot that looks like this: http://www.idleloop.com/frctracker/p.../2013/2972.jpg

eh. There are multiple ways to track other robots. One is cascade training, but that would require me, or someone else, going around to every other robot at our regional and taking a multitude of pictures of them, which might not be welcomed. Also, cascading is notoriously slow in terms of algorithm speed.

The approach I am going is a depth camera. The ball is going to return a sphere with the closest point (theoretically) being it's center via a nth order moment calculation. So, with this being known, you can do a couple of things. If the object you are looking at isn't a circle, it isn't a ball, simple enough, right? I think so. Another thing to do is the take the moment of a given contour (or just segment of the screen if canny is chosen), then check to see if the center is indeed the closest point within all of the contour. I'm going to bet it isn't, which me and 2 mentors agreed was another fair assumption.

Then you can calculate it's velocity by recording it's position relative to you from the previous frame, then calculating it for the current frame, and doing vector math to get it's velocity because you can calculate how much time passed between the two frame. Same math applies for calculating the velocity of the ball.

Alan Anderson 13-01-2014 09:34

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by faust1706 (Post 1326264)
If the object you are looking at isn't a circle, it isn't a ball, simple enough, right? I think so.

What if your view of the ball is obscured by a piece of robot? It won't look like a circle then.

faust1706 13-01-2014 09:42

Re: Vision Targeting for Aerial Assist 2014
 
That's true, you would be hindered. But, if something is blocking part or all of a ball, then you can't do autonomous retrieval via path planning anyway because a robot is in the way. I don't know. I haven't put much thought into ball or robot tracking yet, I'm still focusing on tracking the vision tapes because that is the most important vision task of the competition in our team's eyes. Priorities. Also, I wouldnt even trust my own program for retrieving a ball multiple yards away. In my mind, ball tracking will be used when the drivers gets close to a ball, then software can take over for the last meter or so. It would be cool to see a robot play fetch with itself and throwing it into the high goal every time. We might do that for a school assembly.....an idea for another day.

apalrd 13-01-2014 09:45

Re: Vision Targeting for Aerial Assist 2014
 
You guys are making this too complicated.

In autonomous, you need to know which goal is hot to score the maximum number of points for that ball. Alternatively, you can get 15pts by scoring on a non hot goal (or possibly 20pts if youre lucky)

You already know precisely (to the nearest inch or two) where everything else on the field is on your side of the field if your drive team knows how to setup the robot (training them is far easier than writing code around this). If your intake device needs a higher precision than that then you will have a very hard time playing this game.

If you choose to be a blocker, you could try to find robots by moving along the wall until you find one. There's a possibility that they are turned, which you can't reliably know until you see the ball path, and it's probably too late to block it at that point. It's also possible that the one robot you find is not scoring in autonomous.

During teleop, you have these guys who drive the robot, who know how to drive robots. In the time it takes you to calibrate your vision system on the robot, you could train them to play the game faster, with more strategic input from the coach than an autonomous system could.

IMHO, find the hot goals, and train your drivers.

faust1706 13-01-2014 09:59

Re: Vision Targeting for Aerial Assist 2014
 
That may be true, but what if a ball retrieving algorithm is more efficient time wise than a human doing it? First is about fostering the creativity and wonder about science, technology, math, and engineering in students (and mentors, I've seen a few mechanical mentors inspired by a program and then I see them playing around with ardiuno. You're never to old to learn, especially in a stem career). I personally would rather make a complex robot, learn a lot, and preform mid to bottom table than make a simple robot that relies on driver skill and makes it to eliminations. That's just me though. To each their own. My sophomore year I wrote my first program, the team's vision program. I finished it a week before our first regional and we had 5 days to implement it on our practice robot. We had communication issues to the field and maybe a short in our wiring somewhere to our shooter that prevented us from spinning our wheels to the appropriate speed. We didn't win any matches on our own. Our alliance partners won them for us. So the philosopher could argue that the program I wrote was for nothing. But it wasn't. I now am deciding between going to wash u or mit and studying computer science with an emphasis on computer vision (medical applications in mind). Because my team decided to do something complex and unique, it changed my life.

Sparkyshires 13-01-2014 10:53

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by apalrd (Post 1326351)
IMHO, find the hot goals, and train your drivers.

I agree completely. At absolute most have an autonomous to pick up a second ball, but thats only if you have ample time as its not necessary and will really only be game changing at worlds.

Jared Russell 13-01-2014 11:12

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by faust1706 (Post 1326358)
... snip ...

I admire your passion and sure, sometimes cool things are worth doing just because they are cool.

However, there are plenty of ways to go above and beyond in programming that will be FAR more beneficial to your team than automated path planning for ball retrieval.

Can your robot autonomously turn in place to within a degree of the desired angle?

Can you keep track of where your robot is (in a field-centric coordinate system) as it drives?

If you give your robot a series of waypoints to follow in autonomous mode, can it drive to each of them within a couple inches? Even if you are bumped?

Do you have a way to provide such waypoints to your robot that doesn't require re-compiling and downloading code?

These may sound simple, but they aren't. Being able to do any of the above places you in the top 90th percentile of teams in programming. As it turns out, you would probably need each of these capabilities anyhow if you wanted to be fully automated and do path planning. So start simple and build from there. See how far you get. If you don't achieve your grandiose vision, at least you have developed some useful (and still pretty cool) capabilities on the way.

mwtidd 13-01-2014 11:15

Re: Vision Targeting for Aerial Assist 2014
 
Personally my priority list would be the following:

Priority 1 : Find / Range the goal. Missing shots will be very costly.
Priority 2 : Detect / Find Second or Missed Ball.
Priority 3 : Detect a Goalie. Same reason as priority 1.
Priority 4 : Detect Hot Goal. You have a 50% chance of hitting it anyway.

JamesTerm 13-01-2014 13:27

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by faust1706 (Post 1320719)
Track the hot zone, the balls (calculate its speed and go to where it will be autonomously), track other robot and pass the ball so it will meet them in their path. Track opposing robot so you can autonomous move around them. Track the vision tape on the wall and index from that.

Not going to lie, this this very elementary stuff.

We at NewTek have spent years on vision tracking... check this out:
http://www.youtube.com/watch?v=JqnwC3eHdZ0
This is merely tracking a primitive solid color rectangle, and I can say with 100% confidence there is nothing elementary about it. There is nothing elementary about figuring out all of the tricks needed to have that tracking in a real-time environment. If you do get around to tracking robots... please do like I did and post a demo of it in action. As Tim Jenison once said to me as I tried and failed... "real video is a dirty world". I admire your persistence and I hope you can pull it off... good luck! ;)

I do have a few questions for you... what kind of tracking setup are you going to use (e.g. Raspberry pi, m1011, m1013 etc.)? Will it be on-board or over the network and processed on the driver station?

faust1706 13-01-2014 13:44

Re: Vision Targeting for Aerial Assist 2014
 
Quote:

Originally Posted by JamesTerm (Post 1326478)

I do have a question for you... what kind of tracking setup are you going to use (e.g. Raspberry pi, m1011, m1013 etc.). Will it be on-board or over the network and processed on the driver station?

After much (semi) heated discussion between me, another student, our mentor who is a ee, a mentor who is a biomed engineer that does biotechnology, and our teacher sponsor, we decided on the O-droid xu. Last year we used the O-droid x2. It will be on board and will relay info from the xu to the labview side of things via a udp message. We might have multiple xus. we are not sure how much computational power we will need this year. As of right now, the tape tracking program runs at ~27-28 fps without uncapping the 30 fps limit or threading it.

We are going the route of 3, 120 degree cameras for a complete view of the field. A case sensitive pose calculation will be done to calculate x, y, and z displacement and pitch, roll, and yaw, with respect to the middle of the wall on the floor. There are 3 cases: left corner, right corner, and both.

We are also going to have an asus xtion to do robot and ball detection, maybe 2, still unsure, we are prioritizing our tasks in case we run out of time. The xtions will be for ball and robot detection, and then we can measure velocity of whatever we see (assuming we aren't moving and everything around us)

I'm going to be outsourcing some of the code that tracks the vision tape in the next few days. I taught another student some computer vision and he is starting to work on depth tracking with the xtion. A concern we have with the xtion is lighting in the area. The depth works by projecting a pattern of dots in ir, but if there is so much light, the depth won't work, so it's a gamble.


All times are GMT -5. The time now is 22:53.

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