499 views|0 replies

4

Posts

0

Resources
The OP
 

[The 3rd Xuantie Cup RISC-V Application Innovation Competition] Car HUD display device based on Lichee Pi 4A [Copy link]

 This post was last edited by hancok1990 on 2023-12-5 11:53

1. Project Background

In-car head-up displays are gradually becoming more popular. They can provide car owners with necessary prompt information without affecting the driving field of view. Advanced functions also include combining AR to identify roads and navigation to provide route guidance. They are also often seen at auto shows and are basically standard equipment for smart cars.

This project aims to implement the vehicle hud on LicheePi4A and explore the performance and potential of Lichee Pi.

II. Introduction

At the beginning of the design, I wanted to explore the possibilities of the development board as much as possible and tried many solutions, including using the Android system combined with Unity's AR framework to complete road guidance and basic HUD display.

See:

[The 3rd Xuantie Cup RISC-V Application Innovation Competition] Feasibility verification of Unity on Lichee Pi https://en.eeworld.com/bbs/thread-1262095-1-1.html

The verification process failed very quickly (the official support was very powerful, responsible and fast, thumbs up~)

In addition, in the project research of vehicle-mounted HUD, we also saw a more complete open source solution:

链接已隐藏,如需查看请登录或者注册
, which monitors the vehicle status through the car harness.

I tried to compile this project on the development board, but unfortunately it could not be compiled and run because the project did not support the risicv architecture. I also did not have the ability to complete the porting, so this plan could only be declared a failure.

The remaining solutions basically only include manual road recognition and using the development board as a HUD display device terminal and using a mobile phone to complete AR recognition. Due to time constraints, the latter was chosen as the implementation solution for the project.

3. System Block Diagram

The hud system is relatively simple and only requires a hud display device (a monitor is used here as a simulation), a development board and a mobile phone.

The connection method is as shown in the figure:

The development board serves as a terminal for obtaining vehicle information, displaying the mobile phone's AR navigation, and displaying to the HUD display device.

The mobile phone acts as a camera and provides AR navigation function.

4. Functional description of each part

Prerequisites

The first step is to burn the image. The one burned is the Debian system package of 20231023 provided by the official website, which contains flash_image.sh, which can be installed with one click~

Use ssh to connect to the debian system. The account and password are both debian.

Install some custom libraries

sudo apt update sudo apt install aptitude

Install the necessary environment

sudo aptitude install ffmpeg sudo aptitude install scrcpy sudo aptitude install git sudo aptitude install libsdl2-dev

Test hardware decoding capabilities through ffmpeg (required by scrcpy)

ffplay /home/sipeed/Desktop/4k_example.mp4

Decoding can have more than 30 frames~

Connect your phone

Through the adb mobile device, use scrcpy to project the content on the mobile phone. The default 2k resolution is not enough, so you need to use scrcpy to reduce the bit rate, adapt to the size of the 1080p screen, and rotate the screen.

scrcpy --bit-rate 2M --max-size 1600 --lock-video-orientation=1 --always-on-top

Mobile AR navigation

There have actually been apps on the market with complete mobile AR navigation functions (AutoNavi), but the latest version has taken this function offline. It may be that the solution is not yet mature. However, we can enable this function by installing an old version of the software. The last supported version is probably v12.03.4.2008. After downloading and installing it on your phone online, enable the AR navigation function (see the video for specific operations).

HUD displays additional information

The hud interface is drawn using lvgl

There are two ready-made ported solutions for lvgl, one is to display directly via framebuffer, and the other is to display via sdl or x11windows:

The solution chosen is the latter (because the Debian graphical desktop is used, the desktop will not be taken over for operation)

Although it can be compiled on the board, it is slow after all, so you can verify it on your own computer first, and then copy it through scp

For example: file transfer via ssh

scp -oHostKeyAlgorithms=+rsa-sha2-512 -r * debian@10.4.3.36:dictory

lvgl head-up display screen and effects:

Application startup script

Generally, a mouse and keyboard are not connected to the development board on the computer, so it is necessary to detect the insertion of the USB device and automatically start the script.

The boot script can be placed in /etc/init.d

Detecting the inserted device and executing the script can be done through the mdev mechanism of Linux, which is usually used in embedded systems or those Linux systems that do not use udev. Generally speaking, mdev can be used to start the script on embedded Linux, but our Linux system is Debian and uses udev. ps aux | grep udev to determine whether udev is used to manage the device. If there is a related daemon process, it is udev.

A simpler way is to listen to the device directly through the script.

5. Video Demonstration

A brief introduction to how the system works and the operation of AR navigation on mobile phones.

【Licheepi4A mission video】 https://www.bilibili.com/video/BV1bH4y1C7k8/?share_source=copy_web&vd_source=89c0cd31677cf2c0dcc51bdaf904ceef

6. Project source code

lvgl's project source code address:

链接已隐藏,如需查看请登录或者注册

7. Published Blogs

[The 3rd Xuantie Cup RISC-V Application Innovation Competition] Lichee Pi 4A unboxing and Android burning (no need to... https://en.eeworld.com/bbs/thread-1261099-1-1.html

[The 3rd Xuantie Cup RISC-V Application Innovation Competition] Feasibility verification of Unity on Lichee Pi https://en.eeworld.com/bbs/thread-1262095-1-1.html

8. Project Summary

The functions of the work are basically completed, exploring the use of Android on the development board and trying to run Unity and OpenPilot. Although the project is relatively simple, it also provides a possibility for HUD display. After all, everyone has a mobile phone, and it is generally used as a navigation when driving. Using it as an AR navigation is not an option~

 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list