Chief Delphi

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

faust1706 04-01-2014 01:04

Re: Complete Autonomous Robot
 
Quote:

Originally Posted by magnets (Post 1319165)
This has popped up in the past before, and while I'm a huge fan of trying to automate different things the driver must do (climb, shoot/reload, balance, hang...), I don't see a fully autonomous robot being possible with any of the previous games(but we have yet to see the 2014 game).

Lets take an average fully autonomous robot. It would have to know where it is on the field to get from the pyramid to the feeder station. There isn't an easy way to do this. Teams have used follower wheels, but they slip and aren't accurate over an entire match. From experience, you're not going to get rotational accuracy over an entire match with just a gyro. If you go for the acceleromter/gyro/magnetometer combo, you'll be +/- 15 degrees at the end of the match. That being said, I'm sure there are creative solutions to these problems that a FRC team can find, it's just a matter of finding them.

Creating a fully autonomous robot is a really, really ambitious project, and you should make sure your team is on board with the plan. On the team I've been with, the controls team has two rules, as simple as possible, and if the driver can be trained to do it faster than we can program it, then the driver does it.

Some backstory to this: We created a demo west coast drive train for practice and to get familiar with it because we have always built tall and heavy robots (there is nothing wrong with that, we have done great in the past with them), but we have zero experience with the short, ~90 lbs, 15fps robot, so we wanted to try it out. We got it done in august. So we had nothing to do. In November a mentor suggested a mini challenge.

Here it is: 2 sides with a 5 foot semi circle on the short side against the wall. in the center of it raised on the wall will be either the 2012 target or 2013 target. In the middle are traffic cones and a defending robot. To get points the robot has to go from semicircle to semicircle (there and back). Points are deducted if you push over a traffic cone. We had everything programmed on the vision side and almost had the path planning worked out in this short time, but sadly we never got to implement it. Our simulations worked though. We could feed our xz image of the depth map and a star would find a path, and we'd send it to the cRIO as a series of vectors.

I've addressed the errors with gyros. We have had some trouble with gyros in the past with them climbing. We had a quick fix of doing a gyro reset, but that was a temporary fix. So, we can use the camera pose to tell us our angle of rotation in all 3 degrees, as well as position.

faust1706 04-01-2014 01:33

Re: Complete Autonomous Robot
 
Quote:

Originally Posted by BBray_T1296 (Post 1319154)
This has crossed my mind a time or two before

I think it would be somewhat straightforward for the robot to maintain location awareness, as there are probably enough stationary objects on the field to use as reference/triangulation points (think of using a map and compass to find yourself [if you ever have before]).

There are several tricky parts and stumbles to be had though
-maintaining tracking and location awareness of other robots on the field
-identifying friend or foe to coordinate a movement path
-detecting, tracking, and interacting with game pieces and scoring zones (think of Logomotion, and already filled pegs)

What happens if:
-A robot falls into pieces (We hit a robot so hard last year all 4 of their bumpers fell off and were then strewn about the field)
what will your robot to when it suddenly can see extraneous parts/unidentifiable robots?
-The robot gets into a position it cannot figure its way out (I would assume you would have a manual override)

I can foresee a fully autonomous robot getting a lot of fouls, especially one operating in some sort of defensive mode.

That all being said, It would be REALLY cool to see a robot that plays by itself. Maybe in the future there could be a fully autonomous regional (including pit crew :P)

Addressing your "detecting, tracking, and interacting with game pieces and scoring zones" first. Simbotics did this in logomotion (on einstein, mind you). There had a 3 uber tube autonomous and the robot had to be aware of where it had already hung the previous ones. That blew my mind when I saw it as a freshman. It was probably the most influential and eye opening moment of my FIRST robotics career as a student. (I might not be much of a mentor while in college, but I will be back for some team once I get my life all figured out and underway). So it has been done. And, I've written a code that tracked the frisbees before, and our cRIO programmer programmed it so he would push a button and it'd go to the nearest [insert colour here] frisbee autonomously, but...we didn't have a means of picking it up, so we had to forget about it. (http://www.chiefdelphi.com/media/photos/39015)

Moving on
"maintaining tracking and location awareness of other robots on the field"
That is where camera pose estimation comes in handy. I can know exactly where the camera is (and therefore the robot) on the field in respect to an object (the target). My mentor created a simulation to test to see if our camera could see the 3 pt from the feeder station. He used the PNP method of camera pose to recreate the field by inputting displacement vectors and giving the 3d world coordinates of the aspects of the field (2pt goals, 3 pt, and the pyramid by the target). So, it proved that yes, we can see the 3pt from the feeder station, barely. This same thing can be applied to real time, though, you can hard code the coordinates of the pyramid in a star, so the program will automatically avoid it. As for awareness of other robots on the field, it will be very difficult to decipher friend from foe, but if teams are so generous as to allow us to "learn" their robot via cascade training, then we can do it. I dont really see a point, however. A completely autonomous robot will be very independent, so it would be better to assume the robot will not get out of your way.

"A robot falls into pieces" this is actually an interesting question. The other student first started depth while I made the algorithm for finding the corner coordinates of a square more accurate over the summer. What he does is he takes a depth image of nothing in front the camera except the floor, and then the aspects of the camera are constant. it cannot be moved up or down, or be tilted. That image is now the calibrated image. Then, we can put anything in front the of the camera and it will see it. I just posted a picture on here, but it hasn't loaded yet. But as you can see in it, there is also a bookshelf and a couch in the image, but the program only sees 2 objects, the objects that weren't there in the calibration image. edit: http://www.chiefdelphi.com/media/photos/39264?

"The robot gets into a position it cannot figure its way out " Yes, we will have a manual override. If it even faulters, the driver could take over. I think it'd be really cool to do a cycle completely autonomously once a game or so. We are worried about the speed of a star and our collision detection algorithm. If they are slower than the human reaction, then this would not be justified in doing (but that is not going to prevent us from trying!).

"I can foresee a fully autonomous robot getting a lot of fouls, especially one operating in some sort of defensive mode." yes. We are not planning on doing defense, as of now. There is nothing wrong with playing defense, it wins a lot of games. Our team has this unsaid motto "better to have tried, failed, and learned." I love seeing rookie teams (and non rookie teams for the matter) build defensive bots. Who cares if they aren't seeded first? Only one team will be, and we have never been in that position and have done very well in the past. The students, and mentors, learned stuff and had fun. They became inspired. We've been playing around with a lot of different things for the past several years, and this year we're going to attempt to put them all together.

faust1706 04-01-2014 01:53

Re: Complete Autonomous Robot
 
Quote:

Originally Posted by BBray_T1296 (Post 1319169)
I dont think location awareness would really be impossibly difficult, but certainly one of the "easiest" challenges of a fully autonomous robot. (remember easiness is relative)

Hardware: you could use a revolving camera or other sensor such as a complex laser range finder (like you use on boats). On your processing computer (cRIO, some open source board, or a laptop) you process the data like this:
-You have some sort of computer model of the game field (like CAD).
-You have a 360 degree data field of distances of the closest object to you.
-You know how high your sensor is off of the ground
-You would have to throw out some data such as nearby robots as interference, but that might not be as hard as it sounds.
The computer would basically have to compare the range data it receives to the field structure file to find its exact location, like a piece to a puzzle (Use 2013 for example, if you know there is a wall to your left, and a vertical post to your right, you know you are next to the pyramid.

This system would not be the only source of location awareness. There is some degree of dead reckoning to be used as well. Your robot starts knowing it is roughly in your auto position, and fine tunes it to what it exactly sees around it. you don't have to rely on a gyro for rotation because with your range sensor you know the post is to the robots front (by an encoder on the revolving sensor), so you are facing the pyramid. Knowing your robots heading and speed you can guess your next location, but double check and fine tune it based on your advanced data.

Factoring out piece and robot interference to the system can be done since at another stage of the operation you have to know where the pieces and bots are anyways, so you can ignore data from that direction.

Think of how experimental robotic vehicles are working. They are tackling these same challenges and succeeding this very second. While Google's self driving cars don't have to track Frisbees, they do have to identify and track other cars with us dinguses behind the wheel.

Would it be hard? Yes.
Would it be impractical? Probably.
Could it be done in 6 weeks? Probably not.
Is it innovative? Absolutely.

Me and the other student briefly talked about using a spinning camera or a 360 degree one, but decided against it. We are probably going to use 2 depth cameras, one on each side the robot can move (if we do use west coast, all depends on the challenge), and an rgb camera to track a target if applicable. (Sad day in my mind: we are no longer going to be using the kinect. We are switching to the asus xtion for depth and a webcam for target tracking. It has been a good 2 years of developing with you, kinect. You might finally be plugged into my xbox for the first time ever now.)

A lot of people (ok, like 3) on here are talking about robotic cars. I competed at ISWEEEP and was next to the romanian kid that (got first and) made a completely self driving car with the opencv libraries. We've been talking since then and have been working on some projects together.

The most ideal method would be doing a slam of the environment 30 times a second, but that is impossible, so we have to keep our data flow limited, but useful. The two depth cameras should be plenty. The A star will have to be able to decide which depth feed to use, but that wont be too hard.

I've already discussed knowing position and rotation as well. But, an issue that could occur is if we are not getting a solution from the rgb camera. Then we would have to rely on our gyro. A team last year at terre haute spent 30 minutes with us going over how our vision worked just so they could block it
and so we could not shoot at all 3 targets. They just put up a pole to keep the target from being a closed contour. It was really clever. I wasn't even mad. I was lazy and didn't put a bounding rectangle when around contours when there wasn't a solution. (only do it if there isnt a solution. It will shave a few microseconds off the program). That was my fault. Oh well. I learned my lesson.

"Would it be hard? Yes.
Would it be impractical? Probably.
Could it be done in 6 weeks? Probably not.
Is it innovative? Absolutely."

Hard? Our team is up for the challenge. We aren't the most famous team in Missouri (cough cough 1986), and have only actually won one regional in our existence, but we are gaining attention through our software.

Impractical? to the extreme. I just want to do one operation completely autonomously during a game. To see our drivers let go of the controls and for us to be still scoring points.

6 weeks? No. That's why we build 2 robots XD. And I may be going into the hospital soon for IVs for 2 weeks, so that's what I'll be doing for those 2 weeks. (no worries about my health, just have a bug that I can't shake)

faust1706 04-01-2014 19:32

Re: Complete Autonomous Robot
 
Yes, we are still going for it. We are going to do cascade training on our 6 wheel robot to act as a teammate during the build season. We will track the wall (obviously) and use it to know where we are on the field. Simple math allows for you to calculate the speed of a ball on the ground and then the robot can autonomously go to where it will be to pick it up.

Cascade a friendly robot, calculate their speed and pass them the ball where they will be. Find the ball in mid air and automatically go to where is will land to catch it.

Lastly, in a mode where our other 2 robots cant do anything (broken or otherwise), find ball, shoot it over truss, get it back, shoot it into target.

I'm really tempted to write all the code real quick, but...I'm a senior and that would really not be good if a student didn't know how to do this next year.


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

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