Source
Client: https://github.com/dannyhyatt/autonomous_car_display Server: https://gitlab.com/nvarner/car-sever
Inspiration
Every time you step on the brakes, you're wasting energy. All the gasoline burned or electricity used to push your 2.5 ton car to get to a momentum is lost and turned into heat from friction with the wheels of the car sliding against the ground causing it to stop. We realized that, if cars were able to be connected - if a car could know that an intersection will be clear for a certain amount of time - it would rarely (or never) have to use its brakes. This opens the doors to not only saving energy, but also will get people to their destinations quicker, while being safer as inter-car communication could be automated and expanded (the network can regulate car spacing, braking, and everything else in real time and with generous leeway to allow for safer driving). As more and more cars become autonomous, our roads will start looking vastly different. We realized that we could control traffic with a network that each car could be connected to. How can you efficiently and safely manage traffic flow through an intersection if all the cars have superhuman reaction time, coordination, and planning?
What it does
Our app safely routes a number of cars through an intersection by timing their routes so they will not collide. The server receives positional data and velocity, and is able to coordinate with other cars When a car approaches an intersection, it tells a server associated with the intersection about the route it wants to take within the intersection (like turning left, going straight, etc.), how long it will be until it arrives there, and how long the route will take to follow. Using this information, the server utilizes a greedy algorithm to select the soonest opportunity for the car to traverse its route without intersecting another car's route (AKA, not crashing). It then tells the car at what time it can begin its maneuver. In real life, this would allow an approaching car to apply the exact level of brakes or gas needed to arrive at the intersection at the exact moment it's able to enter it, increasing overall traffic efficiency and reducing energy waste.
Essentially, this is what we're trying to do. Because those bee cars never step on the brakes, they never waste energy. Of course, we wouldn't put cars anywhere near that close.
How I built it
We built our app as a separate client and server. The client is written in Dart and utilizes the Flutter GUI framework for UI and rendering. The server is written in multi-threaded Rust code for high performance and extreme safety, which allowed for less debugging and faster development. The client and server communicate over a JSON websockets protocol. The client requests that the server add cars and requests data on the location and path planning of cars. The server tracks all the cars, simulates the intersection and controls the traffic flow.
Challenges I ran into
We originally had bigger plans that had to be scaled down; fortunately, the final product is still a useful demonstration of how future intersections may look. There were also issues implementing the data structure that the intersection server uses to keep track of what routes are in use when, and we settled on graph theory notation.
Accomplishments that I'm proud of
We are very proud of our top-notch UI. It has a distinct and beautiful style and is intuitive for users. We also managed to develop both a server and client in parallel and easily communicated between them. In addition, we were also able to come up with an algorithm to make cars able to not hit each other but still safely go through an intersection without stopping.
What I learned
We learned about the design of server-client interfaces, making intuitive UI, designing effective data structures, and planning the implementation of complex algorithms.
What's next for routeX
One of the factors we considered was the inevitable holdouts who prefer driving cars manually. These drivers would have to be taken care of so automatic cars do not smash into them when the human driver reacts more slowly than the computerized one. Though we do not have a manual driving client due to team changes, the server can be easily adapted to support human drivers alongside automatic cars. We would also like to simulate a larger road network and broaden our scope to focus on more than just intersections. We later plan to use physics libraries to simulate physics in the real world, and also see if we can use our network with small cars (ex. RPI cars) and do a real world, to-scale simulation.

Log in or sign up for Devpost to join the conversation.