Robotics, Stereo Vision, billiards

Started by
7 comments, last by Dwiel 19 years, 9 months ago
I'm sorry if this topic is not suitable here, please delete if so. I tried searching for Robotics forums, but didn't find any with activity. I had an idea to start building a robot that could play billiards against a real person on a real pool table. I understand that this is a huge task and could take years to complete and lots of resources. At the moment I'm willing to start working towards this goal, even if I might give it up at some point because it proved too difficult. I want to start buy building a generic mobile robot that could easily be extended later and I found this project that aims to implement a PC-based robot that seems to be close to what I have in mind: http://oap.sourceforge.net/ It has stereo vision with 2 webcams. I'm wondering if such a vision system could be effectively used to analyse a real-world pool table, or should some other kind of vision be used for that?
Advertisement
if you wish to analyze the game table from a human perspective its nice, but it would really simple things out if the robot could have a way to see the pool table from the top and make a 2d map of it.

Now if you want to make strange calculations with some kind of fuzzy logic around how hard the machine should hit the ball and in which direction in order to complete a task needed for winning the game such as putting balls into pockets without losing by putting the 8 ball into a pocket. You calculate the fuzzy distance with stereo vision, this should be an easy task if you use simple black and white image of the balls without details, just the circles and silhoutes, you compare the images from both cams and blah blah.

Engineering of it should be easy, the building and the money are the hard stuff to get into ;)
I have neurons in my butt!!!
you will find some good robotics advice at the www.generation5.org forum.
Quote:Original post by lukar
if you wish to analyze the game table from a human perspective its nice, but it would really simple things out if the robot could have a way to see the pool table from the top and make a 2d map of it.

Now if you want to make strange calculations with some kind of fuzzy logic around how hard the machine should hit the ball and in which direction in order to complete a task needed for winning the game such as putting balls into pockets without losing by putting the 8 ball into a pocket. You calculate the fuzzy distance with stereo vision, this should be an easy task if you use simple black and white image of the balls without details, just the circles and silhoutes, you compare the images from both cams and blah blah.

Engineering of it should be easy, the building and the money are the hard stuff to get into ;)


maybe you dont know it, or maybe i think you dont know it,
but stereo vision gives you 3d data (a z value for nearly each pixel). so you can get the 2d position by searching your 3d-view for the balls, for corners etc. Reflections of the balls and the uniform green surface can produce some false values, but i bet there will be enought valid data to get the neccessary informations.

but i think for a pooltable you can work with only one camera and analyzing the circular structures you see, the size gives you the distance and if you see more than 2 ballsyou can transform all of them to 2d. you will also need to see at least one corner to get the boundarys of your table if your robot does not know how it moved or how it is positionated (motion tracking etc)


T2k
This is very true that you can use only one camera but when it comes into calculating the distance of the pocket, since it wont be the same shape from different perspectives, you might have to make the table have a small white square in both of the ends of the pocket so the cam measures the size of these squares and the apparent distance between these two to get data. But it would certainly be easier with stereo vision (which i do know how it works, but i just cant explain myself english is not my first language). So in my opinion if you don't want to be sticking square stickers in every pool table your robot plays, just add nice stereo vision and some pattern recognition for the pockets. I think you could get it right with some trained ANN's since they're usualy black spots in the table but not round spots.
I have neurons in my butt!!!
Thanx for your replies, guys. So stereo vision should be enough to generate a 2D map of the table and balls?

Also, as my final goal would be to have the robot require as little help as possible -- so I'd prefer to do it without any markings on the tables.
My dream is that I could turn the robot on near the entrance of a pool hall, it would just hang around, maybe approach some players, ask if they want to play. If someone agrees to play, maybe for some money, the robot can input & output cash, and understand all situations that can happen in a game so he won't get cheated :) And maybe I'll make some pocket money that way in the end :) And if it turns out really good, I hope it could play in sponsored matches against great players.
Well, that's only a dream and definitely not my first goal. Maybe I'll get there but not in this decade.
My first goal would be that I could tell the robot which shot to make, and he'd make it.

Quote:Original post by lukarEngineering of it should be easy, the building and the money are the hard stuff to get into ;)


Yeah, the money is a big problem -- don't have any at the moment. So I'm just planning now, and trying to get started with building a small robot from things like old computer components and other useful stuff I have accumulated over the years :)
I think what everyone's saying is that MONOCULAR vision will probably give you all the data you need. Just measuring the size of things in your 2d view will tell you how far they are.

Now, for a random comment: I've always thought that an interesting way to do depth perception would be to change the focus of the camera and see where which objects are sharpest. But I digress...
I did a lot of work in this field. The way your eye calculates distance is by a combination triangulating(reason for two eyes), amount of focus required for greatest clarity, as well as the reflection of light. I think you should work on the stereoscopic vision on your computer. Just create a pool table, with all the balls, and run the program. Set up your api so that it saves the image that the robot see's from each eye. So now you have a collection of bitmaps for each eye. Just load a bitmap and it's counterpart bitmap of other eye into a program, and have the program try to calculate the 3D location of the balls, etc. You may want to use a neural net to identify the balls from the images.

This will help with the stereoscopic vision part, as well as the engineering, as you will have to program the virtual robot to move arms, hit, etc. Once you have everything finalized, build the robot for real!!!

Since you have a fully working program, you might be able to convince people to sponser you. Surely a PEPSI sign on the back of the robot wouldn't hurt.

That is just my opinion of course...

Sagar Indurkhya
Actually, I have been thinking of doing something similar. I was going to try to write software/robot that could catch a ball thrown towards it. It would be more of just an arm.

I am also worried about the precision of a web-cam. Is there enough for the computer to determine the position of the ball accurately enoguh to catch it? I was thinking that relative information might also be helpful. Such as having it be able to see it's own parts and adjust their position accordingly. In my project, it would see that the arm is a bit to the left of were the ball is heading and adjust accordingly. In yours, it might see that the cue stick is a bit off of where it would like to hit the ball and adjust it accordingly. With pool, I see a problem in getting the precision movements necessary.

we can keep in touch if we both end up working on something.

Dwiel

This topic is closed to new replies.

Advertisement