GolfAR


Trackman is a product for golf, tennis and baseball players using radar and various other sensors to measure tiniest details about a shot/swing. It is even used by broadcasting companies for these sports to show statistics and shot replays. We got contracted to build an augmented reality app around this, providing players with real-time visual feedback.

How it started

This was my first professional project. A friend of mine approached me because they were working on this project for a while and needed some help with integration testing. They had been building against the API documentation of trackman, but there was no real device available (it costs like 13.000$).

Trackman uses a plain websocket connection to publish events to subscribers in a pub/sub model, with some basic authentication. I initially built a testing server that emulated a trackman as best I could, and it verified the connection handshake and published some basic data that could be used by our unity app, but it quickly became obvious, that we needed real-world data to verify the functionality.

The real deal

My father had worked in the golf space for a long time and connected me with a pro-shop that had an indoor trackman setup they used for fitting clubs. They allowed me to spend a day at their shop, where I showed up, armed with a laptop and a simple websocket client that would connect to the trackman and just dump the data of a shot into a file.

The staff were very supportive and helped me with the swings, because I couldn’t hit a golf ball straight for the life of me. So they took over, being also very interested in the project at large and eyed my laptop screen with curiosity as the massive streams of data ran down my terminal.

This produced a plethora of data, a single shot being thousands of lines of JSON. I scraped some shots under different conditions and returned to my “Lab”.

A virtual trackman

Back home I got to work building the virtual device. I went through the different events exposed by the trackman, comparing with the documentation and built a websocket server that would emulate the entire device, using the real shots recorded by me.

We then used this virtual trackman to further develop the AR app. I later made some improvements so the shots lined up with real courses for a 3D view, random weather conditions, ball speed, player data, etc..

The final test

Once we were satisfied with the app, it became time for the final test on the real thing. Problems:

So I made another appointment with the pro-shop and we travelled together to Munich, where we showed up at the shop, 3 nerds, armed to the teeth with laptops, the NReal glasses and no golfing ability.

This was also the first opportunity to show the app to real users, the employees of the shop at first, but later we also garnered some interest from the customers, getting real feedback about the visuals and features they would like. As always with AR glasses, especially in 2022, the main concern was the form factor (maybe one day…).

Success

We had been developing for a few months using only the virtual trackman I built. What happened at the shop remains one of my proudest professional moments. We connected the glasses to the trackman and it worked first try, perfectly. There were no issues, only some minor display bugs we found in the software and could fix on the spot.

When we left the shop, the app was done.