This repository is for the ECU-HeadUnit part of the Autonomous-Driving-System project. The ECU-HeadUnit is based on an independent RaspberryPi board and displays information such as vehicle's driving status and location on the head unit screen. The head unit was developed with QT5 and interacts with ECU-Core via CAN communication.
This repository includes head unit developed in Ubuntu OS. By following the documentation, you can setup the environment and run the head unit on Ubuntu. However, in the overall project, this head unit runs in an OS based on the Yocto Project and is updated via OTA. For more detailed information, refer to the Autonomous-Driving-System project.
-
Ubuntu 20.04
Install Ubuntu 20.04 for RaspberryPi using RaspberryPi OS Imager.
-
CAN HAT setup
Follow the instruction of 2-CH CAN FD HAT setup and enable Single SPI Mode.
-
HDMI display setup
Follow the instruction of 7inch HDMI LCD setup.
-
QT packages
sudo apt install qt5-default sudo apt install qtdeclarative5-dev sudo apt install qml-module-qtquick-controls sudo apt install qml-module-qtquick-extras sudo apt install libqt5serialbus5*
# Execute on the ECU-HeadUnit
mkdir build && cd build
cmake ..
make
cd ..
sh can_setup.sh
sh run.sh
Context of CAN communication
Message | Purpose | Arbitration ID |
---|---|---|
steering | Control | 0x00 |
throttle | Control | 0x01 |
x position | GPS | 0x02 |
y position | GPS | 0x03 |
orientation | GPS | 0x04 |
headunit start | Autonomous driving | 0x05 |