Learn how to integrate a Vehicle Service that executes the request on vehicle side
The open and web based playground.digital.auto offers a rapid prototyping environment to explore and validate ideas of a vehicle app which interact with different vehicle sensors and actuators via standardized APIs specified by the COVESA Vehicle Signal Specification (VSS) without custom setup requirements. It provides the opportunity:
- To browse, navigate and enhance the vehicle signals (sensors, actuators and branches) in the Vehicle API Catalogue mapped to a 3D model of the vehicle
- To build vehicle app prototypes in the browser using Python and the Vehicle API Catalogue
- To test the vehicle app prototype in a dashboard with 3D animation for API calls
- To create new plugins, which usually represent UX widgets or remote server communication to enhance the vehicle mockup experience in the playground
- To collect and evaluate user feedback to prioritize your development portfolio
Prototype an idea of a Vehicle App
You now have the option to browse existing vehicle signals for the selected vehicle model which you can use for prototyping your Vehicle App by clicking on Vehicle APIs.
The next step would be to prototype your idea. To do so:
- Click on Prototypes (in the top right toolbar),
- Create a new prototype, by clicking on New Prototype and filling out the information or select one from the list,
- Click on the Open button (right side),
- Go to the Code section and
- Start your prototype right away.
To test your prototype go to the Run section, which opens a dashboard consisting all vehicle and application components similar to mockups. The control center on the right side has an integrated terminal showing all of your prototyped outputs as well as a list of all called VSS API’s. The Run button executes all your prototype code from top to button. The Debug button allows you to step through your prototype line for line.
To get started quickly, the digital.auto team has added a number of widgets to simulate related elements of the vehicle – like doors, seats, light, etc. – and made them available in the playground.
Feel free to add your own Plugins with addition widgets for additional car features (maybe an antenna waving a warm “welcome”…?).
Transfer your prototype into a Velocitas Vehicle App
In the previous step you started with envision and prototyping your Vehicle App idea and tested it against mocked vehicle components in Digital.Auto. To transfer the prototype from playground.digital.auto to your development environment and test it with real Vehicle Services we provide a project generator. This generator allows you to generate a Vehicle App GitHub repository using your prototype code based on our vehicle-app-python-template.
In the ‘Code’ section of your prototype in the playground.digital.auto you have the Button ‘Create Eclipse Velocitas Project’.
If you press this button you will be forwarded to GitHub to login with your GitHub Account and authorize velocitas-project-generator to create the repository for you. After you authorized the project generator you will be redirected to the playground.digital.auto and asked for a repository name (Which also is the app’s name). After pressing “Create repository” the project generator takes over your prototype code, adapts it to the structure in the vehicle-app-python-template and creates a new private repository under your GitHub User.
After the generation of the repository is completed a pop-up dialogue with the URL of your repository will be displayed. Among other things the newly created repository will contain:
- /app/src/main.py containing your modified prototype code
- /app/AppManifest.json with definition of required services
- /app/requirements.txt with definition of dependencies
- /.devcontainer/ required scripts to install every prerequisite in Microsoft Visual Studio Code
- /.github/workflows/ with all required CI/CD pipelines to build, test and deploy the vehicle application as container image to the GitHub container registry
Your prototype Vehicle App transferred into a GitHub repository is now ready to be extended. Clone your newly created repository and open the Vehicle App in Microsoft Visual Studio Code and start to extend it. More information you can find here:
CodeQL AnalysisBy default the template repository comes with automated CodeQL Analysis to automatically detect common vulnerabilities and coding errors. It is available if you have a GitHub advanced security license in your org or if your repository is public. To change visibility: Go to your repository settings -> General -> Danger Zone (at the bottom) -> Change repository visibility -> Change visibility to public.
Since the project-generator identifies typical python syntax and patterns out of the prototype there could be several cases where manual code adaptions cannot be excluded.
Most of the prototype code is extracted into the
on_start-method of velocitas.
- Prototyped local variables which need to be accessed e.g. in callback methods need to be global (move them out above the VehicleApp class).
- Depending on how using variables in a Print/Logging statement is implemented, statements need to be adapted in Velocitas.
- Have in mind that Velocitas uses the standard VSS model. If you use custom signals in your prototype, you have to find similar standard signals to use in Velocitas.