mitxela.com forum
Welcome. Please log in or register.

Next »Pages: [1] 2

Automated pétanque scoring
wberg Posted: 4 Jun 2017, 10:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
Pétanque is a game played with a small target ball, called a jack, at which players throw larger balls known as boules. The game is played with two teams.

You can read the rules here
https://en.wikipedia.org/wiki/P%C3%A9tanque

(User posted image)


In terms of ball geometry, there are two facts that the players need to know to score a round:

- the distance of the nearest losing team's boule
- which of the winning team's boules lies inside this distance

At the end of the round, an automatic scoring system must either inform them of the two facts or calculate the score and produce that.

A couple of options:

Drone

The drone can capture a bird's eye view of the game, making measuring distance a lot easier. Image analysis could be performed either on a drone computer or on the ground.
Output can be as simple as an numeric LED.

(User posted image)


Smart balls

I have a feeling we can add electronics to the balls themselves and figure out distances using that. Has the issue of batteries etc.. A speaker could be mounted in the jack.

Last edit by wberg at 6 Jun 2017, 08:06 PM

-------------
[top]
mit Posted: 4 Jun 2017, 11:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
For added visibility, sticking LED lights in the balls would help, especially when playing on grass. If the drone/camera system were adopted, the LED lights could be used to aid visually identifying the balls. Perhaps they could flash at particular frequencies, faster than visible to the naked eye. Also an infrared option for when flashing lights aren't needed.

I suppose the drone needs a camera with very low distortion and needs to just centre itself over the jack, take a picture, identify the balls and then calculate their distances. Doable!

-------------
[top]
wberg Posted: 6 Jun 2017, 07:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
QUOTE (mit)
Also an infrared option for when flashing lights aren't needed.

I suppose the drone needs a camera with very low distortion and needs to just centre itself over the jack, take a picture, identify the balls and then calculate their distances. Doable!
Do you think there's an EM frequency we can use that wouldn't suffer from interference? There's probably quite a lot of infrared reflected off the ground outdoors. If we boosted the output the battery would probably go flat quite fast. Maybe microwaves?

The advantage of using a frequency where there is no detectable background is that it makes the image analysis trivial, which is especially useful when the computation is being done on a little drone computer.

-------------
[top]
mit Posted: 6 Jun 2017, 10:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
Well the advantage of sticking with near-visible light is that you can use an ordinary camera module to pick it up. We can get past background noise with modulation - basically take a picture when the lights are off, take another with the lights on, and subtract one from the other to find where the lights are. So long as the ambient is roughly constant compared to your lights turning on and off there's no problem.

But how to make flashing lights that won't run out of batteries? Maybe a crookes radiometer inside each ball!

(User posted image)


It would be powered by sunlight and the rotating part would alternately reflect sunlight maybe perhaps.

Might be kinda delicate, possibly not such a good idea for balls that are meant to hit each other.

(Alternatively, and more boring, a little solar panel and an LED...)

The image analysis could be done with a raspberry pi and OpenCV.

-------------
[top]
wberg Posted: 8 Jun 2017, 08:06 AM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
I think a set of hollow balls made of gorilla glass each containing a crookes radiometer would be extremely cool and probably something the Science Museum would like to put on display. Quite hard to manufacture though.

How feasible is it to build balls containing the necessary components (solar panel, LED and something to modulate it) that also:

- are spherical
- have a centre of mass at the sphere centroid
- don't break when they collide with one another?

Edit: actually, it doesn't have to be gorilla glass, does it. Could a persepex sphere support a vacuum?

Last edit by wberg at 8 Jun 2017, 08:06 AM

-------------
[top]
mit Posted: 8 Jun 2017, 07:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
Perspex would certainly support a vacuum. Might be hard to plug it though, normally you melt the glass tube while the vacuum pump is running and it collapses and seals. Not sure you could do that with perspex.

If we could find some ready made perspex balls we could cut them open and stick the LED stuff inside. Then possibly flood it with glue. Even the plastic pétanque balls might work since they're probably translucent. But then the solar panels might not work. Maybe inductive charging? Or if they could be unscrewed and the batteries replaced.

-------------
[top]
wberg Posted: 8 Jun 2017, 08:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
How about casting the balls with transparent resin? Then it would be easy to make them the right size and weight.

-------------
[top]
mit Posted: 8 Jun 2017, 08:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
That'd certainly do the job, but resin is very expensive. Given the cost of the drone, computer vision system and resin cast balls, it may end up cheaper to merely pay someone to work it out with a tape measure for us.

On the other hand, if games of pétanque become more efficient due to the system, we could potentially start raking in cash by providing Automated Pétanque Scoring as a Service. Or become pétanque bookies.

-------------
[top]
wberg Posted: 8 Jun 2017, 08:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
QUOTE (mit)
That'd certainly do the job, but resin is very expensive.

Really? This stuff is £8/kg:

http://www.easycomposites.co.uk/#!/resin-gel-silicone-adhesive/casting-resin/water-clear-polyester-casting-resin.html

Or is that the wrong stuff?

-------------
[top]
mit Posted: 8 Jun 2017, 09:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
Ah, nice find! I know about the polyurethane resins which are much more expensive. For this application I doubt there'd be any difference between them.

For polyurethane resins you can normally choose their hardness, which can be anything from rubber-like to glass-hard. Obviously we don't want them brittle, but I guess to play properly they need to be a certain hardness.

Should they be tinted different colours for different teams? Or clear but with coloured LEDs?

-------------
[top]
wberg Posted: 8 Jun 2017, 10:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
I think it would be easier to tell the difference if we used tinted balls. We may have other options, e.g. adding something coloured like a tiddlywink to the ball. Actually it might be hard to guarantee that it doesn't obscure the LED or the solar panel.

Last edit by wberg at 9 Jun 2017, 11:06 AM

-------------
[top]
mit Posted: 13 Jun 2017, 11:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
We should totally do this. I think the next question is, what drone to go for?

It could be something big enough to hold a raspberry pi on board, which would make the system self-contained. This would be a nice stable solution, we could also add whatever hardware we need onto the drone, IR cameras etc.

Another idea is to go for the very smallest, cheapest quadcopter possible and have the calculation at ground level. I just remembered there's a WiFi version of the cheerson CX-10 (my old favourite). It has a first-person view camera that transmits video over wifi, which is kinda crap compared to most FPV quads, but it doesn't need to be particularly high frame-rate or low-latency for us. It's also flown via wifi, which means the ground-based computer could autopilot it, if we can reverse engineer the protocol.

I just did some research, one possible mini-quad is the Eachine E10WD. Similar to the wifi cx10, it can be controlled using an app over wifi, and has a wifi video stream. The only modification we'd need to do is to get the camera to point downwards. A feature this mini-quad has is:

QUOTE
With high density air presure sensor which can precisely hold the height, stable and easy to operate.

That might make auto-pilot a lot easier, if it works. We should research it. The quad is only about £15 anyway.

Battery life might be an issue, but it could potentially land when not in use, fly up, take a picture, then land again.

-------------
[top]
wberg Posted: 18 Jun 2017, 08:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
Yeah, let's do it! We might be able to complete it in a few days, including testing and calibration.

You have a lot more experience with drones and quadcopters than I do so I think I'll go with your decision on what one we get.

I can see advantages to both on-board computer and ground computer. I'm leaning towards a ground computer, if it's feasible. It allows us to use a big battery to power the computer without making the drone carry it. This increases the run time of both the drone and the computer. You mentioned that the system would be contained in the drone if the computer was on-board, but I think we will need a device on the ground to receive and display score information anyway.

What computer should we get? A raspberry pi? They're probably dirt cheap now. We could install Arch Linux on it and only install the bare minimum software we need, to keep power drain down. Unless there's some way to get an ATtiny to do what we need. ;)

-------------
[top]
mit Posted: 19 Jun 2017, 01:06 PM
Avatar
yeah whatever

Admin
Posts: 405
Joined: 4-May 16
I just ordered one, it's the Eachine E50. It's slightly bigger and more expensive (£31, whoa!) but has "8 to 15 min" battery life. It's hilariously marketed as a 'selfie drone' but the important point is it's flown by WiFi and has an onboard camera. The camera can be tilted but not straight downwards, we could either modify it, or maybe just mount a 45 degree mirror in front of it.

Once it arrives, the first thing we need to do is play pétanque, fly the drone over it and get some screenshots. Then we can work on the software for the scoring with useful data to go by.

There's a more expensive drone which someone has reverse-engineered the API for: http://gw.tnode.com/drone/micro-drone-3-0-camera-api/ - I wonder how hard it'll be to reverse engineer the eachine protocol? Might require some tedious android debugging...

-------------
[top]
wberg Posted: 20 Jun 2017, 08:06 PM
Avatar
Maybe microwaves?

Member
Posts: 9
Joined: 20-May 17
Oh man, this drone. I was going to post an advertising image but they're all hilarious: https://www.banggood.com/Eachine-E50-WIFI-FPV-With-Foldable-Arm-Altitude-Hold-RC-Quadcopter-RTF-p-1105949.html

I've done some Android programming before. It's not exactly enjoyable but it can be done. I am very much up for having a go at reverse engineering the protocol, though, I'd love to learn how.

We need to build the balls first before we can capture data, right?

-------------
[top]

Next »Pages: [1] 2

Sign in to post a reply.