Eclipse-SDV-Hackathon-BCX / hackchallenge-simulation

Hack Challenge: Virtual Vehicle Application using telemetry data from Simulation
Apache License 2.0
0 stars 1 forks source link

Eclipse SDV Hackathon on BCX2022

One-Pager (PowerPoint, PDF)

Welcome to the "Virtual Vehicle Application with Simulation" hack challenge!

Hackchallenges - Building In-Vehicle Applications with telemetry from Carla and AirSim Simulation

In this repository we collect the content and instruction for the hackchallenge around building in-vehicle applications using telemetry data generated with simulation tools.

As a hack challenge for Eclipse SDV, you will have the opportunity to get involved with the technology and experience some of the challenges when dealing with connected vehicles and build the next generation of software defined vehicles. You will also get to know a few more open source projects along the way.

For this hackchallenge we considered 2 simulation tools, Carla and AirSim although you are not restricted to only these. If you have experience with other simulation tools and have a great idea on how to use it in this hackchallenge please do so.

Architecture

Bill of Material (tl;dr;)

To complete the hack challenge depicted in the architecture slide you need the following content and repositories available on your machine:

Setup of simulation environment

Both Carla and AirSim require a GPU in order to run.

If your computer does not have a GPU, you can setup an GPU optimized virtual machine on Azure. We have pre-tested both Carla and AirSim on NVv4-series.

Each hack challenge team have access to an Azure Pass to use during the Hackathon. Talk to your hack coach to get yours. You will need to activate it before you can use. See Redeeming a Microsoft Azure Pass Promo Code.

Link and Information about Carla simulation environment

You can find detailed information about Carla.

Link and Information about AirSim simulation environment

AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open-source, cross platform, and supports software-in-the-loop simulation with popular flight controllers such as PX4 & ArduPilot and hardware-in-loop with PX4 for physically and visually realistic simulations. It is developed as an Unreal plugin that can simply be dropped into any Unreal environment. Similarly, we have an experimental release for a Unity plugin.

In this hack challenge you will use it to generate telemetry data. See Your mission

Although you can setup your own Unreal environment, we recommend you to download one of the precompiled binaries and run to get started immediately.

You can find more about AirSim.

Links and Information about Eclipse Software Defined Vehicle Projects

Your mission, should you choose to accept it...

Carla and AirSim allows to interact with the simulation through data recording and API's.

AirSim has a Recording feature to easily collect data and images. The Recording APIs also allows starting and stopping the recording using API.

The Carla Python API allows to extract telemetry data about a specific vehicle in the simulation.

So one can use both methods to get data for other applications which are then controlled and influenced by the simulation.

Part of this approach is to consume the vehicle specific data in your application from the Kuksa.val Data Broker which abstracts the specifics of the vehicle internal data sources and sinks by using the data model of the Vehicle Signal Specification (VSS).

The Velocitas project enables the development of Vehicle specific apps. By integrating with the Chariott project, a modern application programming model built on Rust, it exposes a gRPC service that provides a common interface for interacting with applications and vehicle hardware, enabling application lifecycle management between applications and the vehicle.

The Dog Mode Application is an example of such an in-vehicle application built with Chariott. There is a sample python application that demonstrates how to use gRPC, which can be used as a base to use both Velocitas and Chariott.

One benefit of using the same data model in the Velocitas-App for consuming vehicle specific data is that one can easily port the application from the simulation environment to a vehicle which provides data in the same format.

So to realize a use case by writing a Velocitas/Chariott Application, you need to find a way to consume the data from the Carla and/or AirSim simulation, convert it to VSS, and then write it into the Kuksa Data Broker from which the Velocitas/Chariott Application can then consume and use.

interacting with Kuksa.val

As mentioned above the Kuksa.val project provides artifacts for handling and storing in-vehicle data based on the COVESA VSS specification. The idea is to abstract the specifics of the deeply-embedded part within a vehicle for other applications which consume the data from Kuksa.val. To enable this, one needs so-called "Feeders" which convert the data from the embedded systems (e.g., CAN or SOME/IP) to VSS, write it into the Kuksa.val data broker, and vice-versa.

Part of this challenge is to write a custom feeder for transfering data being relevant for your application between the simulation and the Kuksa.val data broker. One can access the data broker through a gRPC API which allows to subscribe with specific queries.

Note, that an alternative approach achiving a similar goal would be to use the Kuksa.val server. However, for the remainder of this hack challenge we focus on the Kuksa.val data broker since it is part of the default Velocitas Dev-Container.

This README will self-destruct in five seconds. Good luck.