|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
Quote:
|
|
#32
|
|||
|
|||
|
Re: A Vision Program that teaches itself the game
You might want to read some of the RoboCup literature - just do a Google Scholar search for "RoboCup". At this point, the wheeled-robot classes are actually pretty decent, and the small class is very good. The RoboCup community has solved a lot of interesting problems along the way. But just to give a little perspective: their game is very simple, and the teams are groups of PhD students who have been working on the robots for several years.
When I was taking a machine learning class and we were choosing course projects, the professor suggested a simple benchmark to tell if the project was appropriate: Is the task easy for a human? If not, it's probably between hard and impossible for a computer, unless it involves huge amounts of data or extremely fast reaction times. Driving an FRC robot is hard, way harder than driving a car. Here's an interesting place to start that's a little easier: Given a video that shows the whole field for the duration of an Aerial Assist match, calculate the score. Don't worry about penalties. Just track the robots, track the balls (there's only 2!), and keep track of the score. Once you can do something like this, you will have solved a number of the hard vision and analysis tasks, and will be in a position to make a robot react to play the game. Also, this would be a ludicrously awesome scouting tool. ![]() |
|
#33
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
The reason why it seems so difficult to automate many things on the robot is because we are thinking about the big picture. After you decompose the robot behavior down into small pieces, you get things that don't actually seem too difficult to implement! When you have tools such as Octave and MatLab, things like AI and ML become like, "How in the world did I implement this uber-complicated thing in just 3 lines of code?!". It is quite simple to use OpenCV and acquire data, such as target, robot position, etc.
Just think of this. For the 2014 game, if you just acquired the ball and shot it into the goal -- no passing, etc., you could break up the game into the following parts: -shooting -- optimal position, shooting power, robot velocity, robot acceleration -driving -- optimal speed, obstacle avoidance, static field, dynamic field, etc. -picking up -- map of the gamepieces This all can be accomplished by quite simple OpenCV + MatLab code! Now, let's try a practice implementation (idea, not code): Code:
OPENCV: generate field view, find all obstacles, find all the gamepieces, triangulate robot position, gather facing direction <-- this can be done in the matter of 600 lines of OpenCV code. INPUT: wait for user input -- what to do next? drive to a location, shoot, or intake? PERFORM: DRIVE: field data would be sent to the MatLab generated code. SHOOT: find the optimal shooting location, use DRIVE to prepare the shot and go for it INTAKE: read the list of gamepieces. Use DRIVE to get to the gamepiece. Use native code to pick up Now, the program is capable of playing the game almost by itself -- little but some human intervention. Now say that the driver wants to relax and doesn't want to drive by themselves -- sure, get new drivers , but even better would be if you program a bit of AI so the robot can play by itself.Forget about the DRIVE feature, above. Now, the list is -- INTAKE, SHOOT, and maybe a WAIT command. This is what I would do: Check if the robot is loaded. If it is ready, go directly into SHOOT. Otherwise, WAIT (do nothing, but watch and wait for an event) for a gamepiece to be available. INTAKE the gamepiece. Use SHOOT to score. Repeat this over and over again until the game timer is up. ^^ You have a fully autonomous robot. Sure, it won't be as competitive as a human -- it couldn't defend or pass, or anything, but a computer can think very fast to a very high accuracy. This means that a computer can perform all of this with a higher accuracy than a human could! The code would of course be much more difficult if you wanted to implement features like passing or catching. And even better is that there can be human control overrides, so if the human wants the robot to do something his way, it can do it his way. |
|
#34
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
Writing a goals class and breaking down the big picture to smaller pieces is the easy part. The devil is in the details at the bottom end.
|
|
#35
|
|||
|
|||
|
Re: A Vision Program that teaches itself the game
Quote:
You think of this as a game in code because it is a game. It's why I use iterative. Reminiscent of a game loop. But unlike a game it's a lot more difficult to handle AI and ML in reality, let alone competition. Sorry for spelling errors. Mobile is not friendly to my hands. Last edited by MatthewC529 : 10-07-2014 at 01:29. Reason: spelling |
|
#36
|
|||
|
|||
|
Re: A Vision Program that teaches itself the game
So, I'm a graduate student in electrical engineering, and have taken classes in machine learning, artificial intelligence, image processing, and computer vision. I've spent four summers in internships doing image processing with MATLAB and OpenCV.
![]() Ok, I hesitate to call myself an expert, but I do know what I'm talking about. Quote:
But even with such great tools, I think you are radically underestimating the problem. Seriously, if you create a robot that can play Aerial Assist autonomously the way you're describing, you will have done enough innovative work to publish several papers and get a PhD. I'm not saying this to discourage you. You've got a lot of passion and excitement, and a lot of great ideas, and I want to see something cool and innovative come out of it. You can do great work, and I look forward to seeing it. But I encourage you to focus your effort on a small piece of the problem. It may feel like a teeny, tiny, insignificant part. But unless you start with something small, it's hard to finish. I'm a dreamer by nature - like you, I have big ideas and grand plans, and I like to start new things. But too many of my projects have died shortly after I wrote down the grand vision, because I took on too much at once. So, think about a small part of the problem, but also something you can get excited about.
Quote:
![]() |
|
#37
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
Quote:
This gives me the question: If it is so easy to host a webpage without much processor usage footprint, would it be possible for us to give our alliance partners a web address where we can basically create a diagnostics system/chat system for each other to rapidly talk through? Quote:
-Automatic gamepiece collection -Automatic gamepiece scoring -Automatic driving algorithm so the robot automatically gets to a location requested by the driver Those are all the things required to make the robot self-capable of possibly winning a match. I guess the gamepiece collection algorithm can get a bit weird because you would need to make sure that you do not hit a ball of the other team, and so you don't attempt to collect a ball present within another robot. However, proper camera calibration will mean that the height to y axis in the camera , according to the ground. I believe that the relation would be linear. This would allow the program to tell whether the gamepiece is available for pickup! Quote:
Driving through traffic cones is quite the opposite I am trying to perform. Catching the ball would be a challenge, but I know that it has been performed by quite a few teams. Catching a ball without knocking over cones is also past my goals. I am not trying to build something that is so accurate that it will never hit anything. I know that on the field, if the robot just touches, or maybe takes a small hit, nothing bad will happen. I just want to make sure that the robot won't generate a path through the wall! The main thing that will help is that the path will be regenerated constantly in a seperate thread, so if one error happens, the robot will be out of control for less than an eighth of a second! I want to build a multicam system, however, the processing power, resources, etc. will be beyond the reach for my team, so I want to stick with two high-FOV cameras and set up stereo vision! |
|
#38
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
Quote:
Given this context... the AI foundation for our game code we wrote , and the robot code are 100% identical. I think your context of AI includes the details of the goals themselves... assuming this to be true, it should be abstracted away to not be a part of the AI... so let's take 2011 logomotion as an example, and only just the autonomous part as an example to illustrate my point: goals drive forward 10 feet raise arm to 9 foot mark drive forward one more foot open raptor claw lower arm 6 inches drive backwards a few feet In this example these are high level goals that I could have used in the game, the details of how to do the goals would have been different, and FWIW... driving forward *straight* is not as easy as it sounds. ![]() |
|
#39
|
||||
|
||||
|
Re: A Vision Program that teaches itself the game
Quote:
I'll throw some things out there for you... sayings that I've found to be true: 1. People need to follow through their plans... just like a tennis player needs to follow through when he hits the ball on the serve. So follow your passions and see them through to the end. I hope you get some new innovation and learning experience and share with us the outcome! 2. Top down design, bottom up implementation. You now have the plan... break it down to small goals and start to form some implementation strategies. It's time to get down from the dream cloud to face reality! 3. Don't waste your time shuffling/organizing chairs on the titanic. As we get older we realize how precious time is and how little of it we really have. As a team player you have a responsibility to your team as well as following your passion... try to find a happy medium in there. Is your time invested in this taking away what you can contribute to your team? What is the biggest fire or issue with the team that needs help. What can you do this summer to be ready for next year... to overcome known mistakes learned from this season etc. My biggest regret in life is not being a better team player when I was younger. The sayings in 2 and 3 come from my boss/mentor and I've adopted them as my own, and I'm passing them down to you. Good luck! Whatever the result... it will be a great learning exercise! |
|
#40
|
|||
|
|||
|
Re: A Vision Program that teaches itself the game
Quote:
And no that is not the context I am looking at it from. In reality if you write an overly specific AI focused on conducting only a few tasks than you end up writing a lot more unmanageable code (Learned the hard way, it was an invaluable learning experience), possibly resulting in several anti-patterns, when in reality an abstract approach goes a LONG way. Though you should know from writing that game that you cant just ignore the deeper details. If you dont account for the details you can end up with an exploitable and appearingly buggy AI. Your example though is great, that is ideal, but as you said it's difficult to even account for the driving "straight" part, and that is what I am getting at. You can say a bit of "MATLAB and OpenCV" but in reality to have a truly effective AI you will need more. Having AI to achieve goals can be easy in a digital game, creating an AI to adapt to the player and other AI is more difficult and having an AI to adapt to the player and other AI with uncertainties in what may occur (particularly speaking about reality) then it gets more difficult. Again I love this idea and I love the plan but its also being over simplified in my opinion. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|