This repository contains contributions of ČVUT to the IPA2X project.
The main goal is to create an Android application that will run on a phone in the car. The application will:
- communicate with the rover via Fast DDS
- show warnings on car infotainment screen, via Android Auto screen mirroring.
Programs for testing the communication with the mobile application can be compiled as follows:
-
Compile (or install) Fast DDS libraries.
-
Compile demo programs:
cd warning_cpp mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=~/Fast-DDS/install .. make
The above works with so called local Fast DDS installation. If you installed Fast DDS differently, you may need to change
CMAKE_INSTALL_PREFIX
or remove it completely.
Alternatively, you can build the programs with the Nix package manager:
nix --experimental-features "nix-command flakes" build
The compiled programs will be then located in result/bin
.
Compiled Android application is available in the apk directory.
To compile the app from source using Android Studio, follow this guide.
There are two ways how the communication can be tested:
- local network with simple discovery – all communicating devices (mobile phone, rover or computer running a demo program) should be connected to the same network (e.g. Wi-Fi access point).
- VPN with a discovery server – this will be used for final demo - all devices need to be connected to CVUT's VPN. We will provide VPN credentials for those who need them upon request.
The Android application works differently in portrait and landscape mode. The portrait mode is meant for debugging and testing and display various controls and settings. The landscape mode is meant for mirroring the screen on the car.
- Run IPA2X Warning Android app.
- In the portrait mode switch off Discovery server toggle.
- Press Start
- Run
./src/CrossPub
(from thebuild
subdirectory) without any arguments. - Press
x<Enter>
to show the crossing warning on the phone.
- Download the WireGuard application from Google Play.
- Import the interface configuration from the QR code provided by CVUT (+ → Scan from QR code)
- Turn on the created interface (toggle switch next to the interface name)
-
Configure the VPN base the credentials provided by CVUT (choose one option below):
-
Newer Linux distributions have WireGuard integrated and it can be configured via the standard UI. What is required is NetworkManager with version 1.26.2 or higher. Ubuntu 20.10, Fedora 33, and Arch Linux 2020.09.01 or later have this version.
-
Use
wg-quick
command that comes with WireGuard.mv <config-file-from-cvut>.conf /etc/wireguard/ipa2x.conf wg-quick up ipa2x
-
- Run IPA2X Warning Android app.
- In the portrait mode switch on Discovery server toggle.
- Enter the IP address of the Discovery server. The default IP address
192.168.162.10:11811
corresponds to the CVUT discovery server accesible via the VPN. - Press Start
- Run
./src/CrossPub --server
(from thebuild
subdirectory) - Press
x<Enter>
to show the crossing warning on the phone.
- Shapes DDS demo for Android (currently accessible only to selected people). This is our initial result of "porting" FastDDS to Android. It will be used as a baseline for developing IPA2X Android app.