This year’s Hackathon Stuttgart took place in the beautiful Römercastel location in Bad Cannstatt. This is a huge building with plenty of places to work and sleep at night. This hackathon is organized by logicline.

The Idea

When it comes to hackathons I am always a fan of crazy projects you wouldn’t or cannot do at home. In this case we were interested in Car2Go and Kärcher (which is a German company producing machines and equipment for cleaning) – both provided interesting hardware for the event. Car2Go had different versions of their cars and Kärcher had a street sweeper. After looking at the different APIs we chose the street sweeper to work with because it just provides more capabilities. It has multiple sensors and interfaces to be able to help workers and companies to smoothen the cleaning-process. On top of that the machine offers a secret WiFi-diagnose interface. We decided to use the SSH-diagnose interface to build a little fun-project.

The Team

Leo Mehlig whom I met at several WWDCs before attended this hackathon as well. Together with Praveen Kumar Thota and Poulastya Mukherjee whom we met there at the hackathon we decided to build an iPad game that receives input signals from the Kärcher street sweeper. At this time we had no ideas which values we could expect from the machine.

The Breakthrough

It was about 2am on Saturday when we had the groundbreaking idea to create a game called “SuperMarioKehrt”. Which is a Germany pun for “SuperMarioKart”, where “Kehrt” means “Cleaning”. So a perfect match! We just had to develop the iPad game and connect it to the street sweeper using the provided WiFi hotspot and some SSH commands. The diagnosis port offers detailed information for all sensor values of the street sweeper. Leo was literally sitting on the street sweeper driving around and trying different SSH commands to find the right ones for the appropriate sensors – we literally had to hack the street sweeper to get this information. These values are normally being used for diagnosing the street sweeper. We requested this data every 200 milliseconds, so in the end we had real-time updates of the steering wheel angel and the accelerator position.

This information is translated into a Super-Mario game that we wrote for the iPad using SpriteKit and SceneKit. After all we have been awarded with the price “Hacker’s Favorite” worth of 1000€.

This is what the final game on the iPad looks like. We wrote this game from scratch using Apple’s SpriteKit and SceneKit and lots of math (cos, sin, tan and vectors 😀). The game consists of three main parts: A two-dimensional background which creates a depth-effect using parallax layers, the three-dimensional map which rotates and moves according to the driving direction, and the driver itself, which turns into the direction of driving.

This is what it looks like to debug an iPad-game while driving on a street-sweeper:

We also included an audio-framework for in-game sounds (accelerating, braking, drifting) and in-game music.

To prevent crashes when the driver is playing our game we attached an additional ultrasonic sensor to detect walls and other obstacles. The sensor is attached to a ThinkerForge board which is connected to the same diagnose-WiFi-hotspot to be able to exchange data with the iPad. When distance value falls below the minimum threshold the board will send a TCP message to the iPad. The iPad then displays a warning message to the driver.

This is a short video about the capabilities of our app:

The Presentation

Our team presenting the project in front of the hackathon jury:

This is the full video of our presentation:

The source code of our project is available on GitHub. The game itself written in Objective C, the SSH communications is written in Swift and the Thinkerforge Sensor is written in Python.

Company Tour at Kärcher HQ

The company behind the street sweeper, Kärcher, invited us for a company tour in February. The company is located in Winnenden near to Stuttgart. They showed us how they use industry 4.0 to build street-sweepers with different customer requirements – over 40’000 combinations are possible. After seeing the factory where the street sweepers are being built, we were able to present our project SuperMarioKehrt in front of some employees and managers of the Kärcher factory. You can see our presentation in this periscope live stream:

This is what the Kärcher experience center looks like from outside. It has been built on the compound of an old brick manufacture and many architectural details have been kept in place, such as the huge brick smokestack. This looks beautiful!

Leave a Reply

Your email address will not be published. Required fields are marked *