|
1 |
| -# Example Application |
| 1 | +# Vehicle health Application |
2 | 2 |
|
3 |
| -The Example App show how data from the vehicle can be received by an application running in the vehicle. |
| 3 | +The App calculates a score for the driving pattern for a defined amount of time and stored. Data taken at fixed intervals here are used to consolidate a final score. For the purpose of simulation a json file is stored, with the data at fixed intervals. |
4 | 4 |
|
5 | 5 | ## Build
|
6 | 6 |
|
7 |
| -When running `restart-shift2sdv`, or explicitly the `build-apps` script, the Example App will be build and containerized automatically as `ghcr.io/eclipse-sdv-hackathon-chapter-two/shift2sdv/example_app:latest`. |
8 |
| - |
9 |
| -Of course, you are free to build manually if needed by calling the following command from the example_app folder: |
10 |
| - |
11 |
| -```shell |
12 |
| -podman build -t example_app:latest . |
13 |
| -``` |
14 |
| - |
15 |
| -**Note:** Inside the test-vehicle the Example App will run on ARM-Platform. Test the build by running the command above and ask the hack coaches to build your image for ARM to run it inside the test vehicle. |
16 |
| - |
17 |
| -## Running |
18 |
| - |
19 |
| -The Example App is automatically started by Ankaios as there is an entry for it in the [shift2sdv_manifest.yaml](shift2sdv_manifest.yaml). |
20 |
| - |
21 |
| -In the test vehicle the Example App container image will be started and managed by Eclipse Ankaios. |
22 |
| - |
23 |
| -Talk to the hack coaches to build a multi-platform or ARM image before trying to run the app in the vehicle. |
24 |
| - |
25 |
| -## Development |
26 |
| - |
27 |
| -### Run |
28 |
| - |
29 |
| -Start the app inside the devcontainer for local development: |
30 |
| - |
31 |
| -```shell |
32 |
| -python3 example_app.py |
33 |
| -``` |
34 |
| - |
35 |
| -### Testing with mock data |
36 |
| - |
37 |
| -Ask the hack coaches for an eCAL recording to play back a recorded driving scenario with eCAL and to receive the vehicle dynamics data in the Example App for development. |
38 |
| - |
39 |
| -Place the downloaded eCAL recording in a `measurements/` folder next to the current file. |
40 |
| - |
41 |
| -Start the eCAL recording within the devcontainer, replace `<recording_folder>` with the recording folder you received from the hack coaches: |
| 7 | +When running `restart-shift2sdv`, or explicitly the `build-apps` script, the Example App will be build and containerized automatically as `ghcr.io/eclipse-sdv-hackathon-chapter-two/shift2sdv/vehicle_health:latest`. |
42 | 8 |
|
43 | 9 | ```shell
|
44 |
| -ecal_play -m measurements/<recording_folder> |
| 10 | +podman build -t vehicle_health:latest . |
45 | 11 | ```
|
46 |
| - |
47 |
| -Start the Example App inside the devcontainer as shown above. |
48 |
| - |
49 |
| -You should see logs of the JSON data received, and in the web browser the tachometer should show some speed values. |
50 |
| - |
51 |
| -For debugging reasons you can start the eCAL Monitor terminal UI in a separate terminal window by running: |
52 |
| - |
53 |
| -```shell |
54 |
| -ecal_mon_tui |
55 |
| -``` |
56 |
| - |
57 |
| -This lists all eCAL topics with their contents and meta information the host or container can see. |
0 commit comments