This user has no status.
New Member
Howdy all, got a proof of concept for a feature. Spent a total of about two hours on this today. Would love to bounce ideas with others, and also see if anyone else is interested in this or not. If not I will just engineer the solution to work for my own home setup and that is it.
Proof of Concept
Problem Statement: Right now almost all table tennis robots have one big feature lacking. I have no way to practice serving and third ball attacks.
What I want: I decide what serve I want to practice. I then program a few balls with some scatter for possible receives, then when the ball I serve is detected to cross the net it then chooses a receive (random or in order whatever is chosen) and sends it back.
Bonus Feature: Opponents sometimes mess up returns and pop the ball high, allow user to define probability of each return so user can program 70% pushes, 20% flips, 10% high returns etc
What I have done so far: Basic OpenCV python program that detects when ball crosses the net. User defines the net by clicking. When ball crosses net applies a cooldown (5 seconds) to account for the fact that the robot will send a ball back and you will third ball attack it so there will be 2 more crossings in a short time you want to ignore.
Example I put into the webapp:
Ignore the load video button, that is because I don't have a webcam right now so I have the ability to load a video file instead to test. The idea is you just program a drill like normal and then can select it as the drill for return options, you start your camera, select the net location and define if the serves go from right to left or left to right.
When ball detected crossing net it then sends the next ball of the return drill
Issues right now: My OpenCV detection works great in python, been unable to replicate accuracy in Javascript
Where to go from here:
I will keep experimenting a bit on the javascript side of things to see if I can replicate accuracy. Changing camera angle to include more of the table induces more false positives and more noise, but current angle doesn't give a lot of time so faster balls go undetected
Potential Problems / Drawbacks: I fear that once I use a real webcam their may be too much latency to get good results. If the return happens seconds after the ball hits the other side it isn't as good training.
An IR sensor net would be a lot more accurate but add complexity and hardware costs
A 120 fps iPhone video works great... Live WebCam feed may not work well as I haven't tested it yet. 60 FPS or lower video feeds would probably kill any chance of this working well
This may be all completely unnecessary... maybe a big enough delay between balls on drills could be good enough for most people instead of something like this. But if this is done well enough it could provide value
@olanga Curious your thoughts, you are way more familiar with everything as you've done it. Is the latency/delay too much to make something like this work practically? Do you think camera detection is a valid approach via javascript or there's too much room for false positives and it would run too slow?
Python OpenCV Detection Photos
Proof of Concept
Problem Statement: Right now almost all table tennis robots have one big feature lacking. I have no way to practice serving and third ball attacks.
What I want: I decide what serve I want to practice. I then program a few balls with some scatter for possible receives, then when the ball I serve is detected to cross the net it then chooses a receive (random or in order whatever is chosen) and sends it back.
Bonus Feature: Opponents sometimes mess up returns and pop the ball high, allow user to define probability of each return so user can program 70% pushes, 20% flips, 10% high returns etc
What I have done so far: Basic OpenCV python program that detects when ball crosses the net. User defines the net by clicking. When ball crosses net applies a cooldown (5 seconds) to account for the fact that the robot will send a ball back and you will third ball attack it so there will be 2 more crossings in a short time you want to ignore.
Example I put into the webapp:
Ignore the load video button, that is because I don't have a webcam right now so I have the ability to load a video file instead to test. The idea is you just program a drill like normal and then can select it as the drill for return options, you start your camera, select the net location and define if the serves go from right to left or left to right.
When ball detected crossing net it then sends the next ball of the return drill
Issues right now: My OpenCV detection works great in python, been unable to replicate accuracy in Javascript
Where to go from here:
I will keep experimenting a bit on the javascript side of things to see if I can replicate accuracy. Changing camera angle to include more of the table induces more false positives and more noise, but current angle doesn't give a lot of time so faster balls go undetected
Potential Problems / Drawbacks: I fear that once I use a real webcam their may be too much latency to get good results. If the return happens seconds after the ball hits the other side it isn't as good training.
An IR sensor net would be a lot more accurate but add complexity and hardware costs
A 120 fps iPhone video works great... Live WebCam feed may not work well as I haven't tested it yet. 60 FPS or lower video feeds would probably kill any chance of this working well
This may be all completely unnecessary... maybe a big enough delay between balls on drills could be good enough for most people instead of something like this. But if this is done well enough it could provide value
@olanga Curious your thoughts, you are way more familiar with everything as you've done it. Is the latency/delay too much to make something like this work practically? Do you think camera detection is a valid approach via javascript or there's too much room for false positives and it would run too slow?
Python OpenCV Detection Photos