Monday, October 18, 2010

Naoqi :: Robot Soccer :: Vision

(Thanks to Kiera for taking this video on her new snazzy Droid : P )

So this is the robot I've been doing research on, we're programming them to play soccer in teams of four! I have a wonderful partner, and we're hoping to destroy everyone else by the end of the semester. Right now all it does is find the ball and kick it, which sounds pretty simple but is actually fairly difficult.

 :: Technical Stuff ::     (feel free to skip if this kind of thing makes your eyes glaze over)
The robot is a "Nao" and it essentially runs a mini version of ubuntu, you can ssh into it wirelessly or with an ethernet cable and copy your compiled code and type commands into the command line. However, its memory is pretty small, so typically all we do is run our written behaviors on the robot itself. The cool part is that you start with basically nothing, you have to control everything from the "eyes" to each joint.

First off, here is what it sees through its "eyes" (read : camera).

The top image is the raw feed, and the bottom is the parsed version the robot actually uses to determine its actions after we run our vision algorithm on it. Right now we're just doing ball tracking, so we determine the purest color of each pixel, (right now the only relevant ones for us are orange and green) and search for orange ones. If there is no orange present, it does a pretty sparse search, only one out of six pixels. Once it locates something that might be a ball, it does a much more refined search in only that area, and will search that area first in the next frame.

This makes our code run much faster and allows the robot to react more quickly to changes in the ball's position since it doesn't have to look at every single pixel each time.

We are also super cool, so instead of figuring out which quadrant in vision the ball is located and then moving accordingly (like we used to do in the picture above), we now do visual servoing (as seen in the video)

The robot ALWAYS keeps the ball in the center of its vision by moving its head if it sees it, and then aligns the body with the head in order to precisely line up with the ball. It then checks if the ball is in its right or left field of vision to kick!

That's all for now, I'll post on goal finding next, and then on my latest and greatest art project : P

No comments:

Post a Comment

c'mon hit me again