UWE-AI 2024 Developments
Background
In December 2022, UWE-AI was founded with the aim to create an environment for students to apply skills learned at university on a competitive real-world project. This would give them much-needed experience to help stand out in job interviews and enter the industry with more diverse skill sets. The project was chosen to be the Formula Student AI, Dynamic Driving Task event, in which teams from across Europe would compete in time trial racing events with a shared racing platform called the Autonomous Driving System – Designated Vehicle (ADS-DV). The ADS-DV is a rear wheel drive, no seater, drive-by-wire system capable of doing over 80mph, with only 4 ever being made (named Alice, Bob, Carol, and Dave).
One of the 4 IMechE ADS-DVs at FSUK 2024 (shown is Alice)
Initially, UWE-AI was composed of a small but hardworking team of 12 active members all working together to build the core aspects of an autonomous race car and in the Summer of 2023, UWE-AI competed at FSUK for the first time as one of the youngest teams to attempt an entry at only 7 months old. The team fought hard for their right to be at the competition, winning funding awards such as the UWE Student Experience grant to pay for camping and receiving generous support from the UWE Engineering faculty for the Competition entry fee. Unfortunately, being such a new team meant achieving hands-on testing of the ADS-DV was nearly impossible, an issue the team struggled with even into 2024.
At FSUK 2023, UWE-AI competed for the first time, securing 17th place in the static events, but due to technical issues being unable to pass the autonomous inspections needed to be allowed to compete in the dynamic events.
UWE-AI team photo at FSUK 2023
The Problem
The issue UWE-AI had was due to communication between the AI computer on the autonomous car running the student-built software, and the virtual control unit (VCU) inside the ADS-DV. The team were able to verify control of wheel speed, steering angle, braking, and the emergency stop function, but unable to set the final mission finish flag. During debugging, the closed source nature of the VCU became an issue for diagnosing where the fault lies, so the UWE-AI team went back to the drawing board in September 2023 to find a solution that could avoid this issue occurring again.
Our Solution
During the planning stage of 2023/24, the team chose to focus efforts of the Systems Integration team on development of our own VCU. This would aim to reverse engineer the provided API for communicating to the VCU to design an embedded hardware system that could mimic all forms of communication the ADS-DV would normally perform. Within the provided API for interacting with the ADS-DV, teams were provided CAN memory addresses in which control information would be sent to by the AI computer as well as CAN memory addresses to receive VCU feedback, so to create a mock VCU, we would need to create a system that could read the AI to VCU control addresses and send back simulated feedback on the VCU to AU addresses.
System Diagram for AI computer to ADS-DV interaction.
In order to realise this design, UWE-AI were successful in being awarded the RS Grassroots Formula Student Build fund to design our VCU in February 2024, and over the next few months as the parts started to arrive, development began.
Team members Ben (left) and Yasine (right) working on the first prototype for our VCU
Until the parts arrived in from RS, we decided to first build a prototype configuration to serve as a proof of concept for the project. In order to make sure that we could accurately simulate the ADS-DV VCU, we had to first incorporate its communication protocol. Almost all modern VCUs use a multiple-access protocol called Controller Area Network (CAN). It is designed to be efficient and reliable, ideal for real-time systems. It is a message-based protocol that runs using 3 wires; Ground wire, Can High, and Can Low; the latter 2 are used for redundancy. The Specific configuration that the ADS-DV uses is a standard 11-bit message ID running at a bitrate of 500,000kbps. We already confirmed that we were able to set up a CAN connection using a machine running Windows OS connected to a CAN to USB module, but the real challenge came when we tried to set up the same connection using an Arduino. As the Arduino has no USB ports, we needed to acquire a specific module that would handle the CAN interfacing. We decided to purchase a “mcp2515” module, which we found was the industry standard for our specific application. Using the “CAN” open-source library, we were able to initialise a CAN interface and using our configuration, we were able to send and receive messages on the CAN bus in real time. As a further proof of concept, we decided to connect two Arduinos using a CAN bus. We wired Arduino A with controller modules (joysticks, buttons, etc) and Arduino B with output module (LEDs, servos, etc). Using the control modules on Arduino A we were able to send commands through the CAN bus to Arduino B and visualise them on the output modules. These commands were being sent in real-time in an efficient and reliable manner, which was exactly what we were looking to achieve; with that, we were ready to kickstart development for the UWE-VCU project with the parts gifted by RS.
Once the last of the parts had arrived from RS in March 2024, we then began development of our second iteration of the UWE->VCU. This iteration primarily made use of a ROCK 5B Single Board Computer as well as the Innomaker USB to CAN Converter for ease of plug-and-play functionality to any computer. We started by installing the KUbuntu Operating System to run the Rock and opted to use the robotic operating system 2 (ROS2) framework to incorporate ROS nodes to run our stack. Starting off, we decided to develop our VCU as similar to the ADS-DV VCU as possible and to accomplish this we reverse-engineered the open source “FS-AI-API" given to all teams to use for vehicle communication. This API informs teams how to send and receive CAN commands from the AI computer, but does not detail how the same process occurs at the VCU side. As such, we developed the “UWE-AI-API" to handle VCU-sided API calls. The “UWE-AI-API" handles more CAN addresses than the API it was based on to be able to handle more use cases and allow for more capabilities. To handle the logic of the VCU itself, we referred to the FS-AI documentation. The software specifications include a state machine that highlights how the VCU should behave in different states, such as the emergency brake state (locking up all brakes) or the Autonomous driving state (releasing full control to the AI computer). Using the state machine to develop the logic of the VCU. We used C++ as our programming language for the entire backend of the UWE-VCU and followed a “read update respond” approach to read the vehicle requests from the AI stack, update the VCU state machine, and then respond by sending information about the VCU state machine back to the AI computer. Finally, in order to display the data that we are receiving and sending we incorporated a rudimentary CLI logging structure in order to diagnose the behaviour in real-time. The UWE-VCU is not only built as a diagnostics tool but also designed in a way to be used as the building block for vehicle development. The system is modular so that we can add and remove different sensors and motors to mimic the ADS-DV.
The second iteration of the UWE-VCU, using parts from the RS grassroots FS Build Fund
Outcome
In July 2024, the UWE-AI team returned to FSUK for the second time, now confident in our ability to complete the autonomous inspections and compete on track against other teams. On the first day of competition, we were successful in passing all autonomous inspections, highlighting the importance of all the development we had done for the UWE-VCU as a testing tool for the current and future iterations of the AI system. Additionally, having the UWE-VCU on hand gave confidence in team members to make developments to the codebase over the competition weekend, with most members making code changes and confirming the expected behaviour by using the VCU tool. UWE-AI were successful in placing 13th in static presentations, paying special tribute to this newly developed testing unit supported by RS, and placed 15th overall.
UWE-AI team photo at FSUK 2024
UWE-AI watch with bated breath the running system during the Acceleration event
Looking to the Future
With the 2024 season at a close, UWE-AI have recognised the need for more testing time on a dynamic vehicle in order to enhance the performance at competition, and once again look to the VCU tool to do this. As the VCU tool is a replica of the one onboard the ADS-DV, it is capable of supporting modular addition of sensors, motors, and other electronic devices. For this reason, UWE-AI is now beginning the first step towards building our own autonomous vehicle at a smaller scale to that of the ADS-DV. This will make use of the provided DC motors by RS to control the wheels as an Ackermann steering, 4-wheel drive system, and other structural materials to assemble the body. The aim is to have a mobile vehicle for early 2025 for which UWE-AI can begin dynamically testing the autonomous driving stack in outdoor environments on cone-based tracks, exactly as we would encounter at the Formula Student competition, and ensure we are as competitive as possible.
UWE-AI would like to extend a massive thank you to RS, and all our other sponsors who have made it possible to compete at Formula Student and provide the in-depth learning our students have been able to experience. We truly value the support of each and every one of you.
Comments