All Posts
 min read

Mocking a vehicle on a Linux laptop

Volvo Cars have been pioneers in using and providing feedback during the initial development of RemotiveLabs tool for virtual development of vehicle topologies. The tool enables developers to iterate and perform integration tests directly on their laptops. This left-shifting approach significantly reduces dependencies on costly and scarce/unavailable hardware.

Published on
September 12, 2024
Pär-Olof Håkansson at Volvo Cars working with RemotiveTopology to simulate a Usage Mode

Case Study: Early integration testing with RemotiveTopology

‍

The challenge

Automotive software development often relies on Hardware-in-the-Loop (HIL) rigs for integration testing. However, these rigs are scarce, expensive, require complex maintenance and are unavailable in early project stages, limiting early integration testing opportunities for software engineers. The challenge was to simulate the necessary vehicle topology to test a specific Usage Mode (UM) — driving in reverse. This was done using a virtualized environment that mimics a HIL rig, allowing early integration testing automatically on a developer's Linux laptop or in a CI pipeline.

Pär-Olof Håkansson portrait
"We use RemotiveLabs tooling to simulate the topology of a Usage Mode. With the Docker Container setup, developers can start testing the core computer functionality early in an environment that closely resembles an actual Hardware-in-the-Loop (HIL) rig."– Pär-Olof Håkansson
Senior Software Engineer at Volvo Cars

‍

Solution & key elements included

With RemotiveTopology Volvo Cars has created a virtualized environment that allows engineers to mock the required ECUs for testing the required “Usage mode”. Using the framework from RemotiveLabs, engineers mocked each ECU and ran them containerized using Docker. The topology produces real CAN frames for the entire mechatronic rim and the test replicates the start-up sequence of a real vehicle. The solution is highly flexible, allowing developers to test the core functionality of the vehicle’s central computer early in the process without needing the physical hardware typically required for these kinds of tests.

  • ECU simulation: Starting with an ECU restbus which can be extended with behavioral code.
  • Containerization and orchestration:Each ECU simulation is containerized, enabling deployment on any Linux system. The ECUs are orchestrated by a central controller, typically a test framework, e.g. pytest.
  • Integration to CI pipeline:The setup can be run on a Linux laptop or integrated with a CI pipeline typically hosted in a cloud, e.g. Zuul, where parts can be deployed on architectures closely resembling target hardware, e.g. AWS/Graviton.
RemotiveTopology of Usage Mode Driving at Volvo Cars
Volvo Cars engineers are using RemotiveTopology to mock relevant ECUs for early integration testing of core computer functionality. This approach virtualizes the early integration tests and reduces the reliance on scarce/unavailable and costly HIL rigs.

Result & key outcomes

The implementation of RemotiveTopology provides Volvo Cars with an advantage in their software development process. The ability to perform early integration tests on core computers accelerates development timelines and reduces dependency on scarce hardware. Running integration tests locally left-shift the testing effort with the result of identifying and resolving issues earlier in the development cycle.

  • Increased testing access: When this case study was first published in September 2024, an integration test in the Usage mode driving took approximately 20 minutes, and engineers in Lund ran over 400 integration tests in one week.
  • Scalability: At that time, a single developer laptop could host at least 20 virtual ECUs, and the setup can be scaled with more laptops, hardware or in the cloud.
  • High test throughput early on: Developers can run tests and iterate as often as needed for the task, ensuring well-tested software early on rather than having engineers waiting in line for a HIL-rig. 

Volvo Cars has been leveraging RemotiveLabs' toolchain since the start in 2020, integrating it into software prototyping, development, and testing processes, and the setup has kept growing since this case study was first published. This lightweight, open platform is gaining recognition within the company for setting its developers up for success.

Alwin Bakkenes, Head of Software Engineering at Volvo Cars
"Virtualization of automotive software is becoming an integral part of our developer experience, providing tooling for easy, efficient and re-usable testing. Remotivelabs tools reduce dependencies on hardware, allowing our teams to iterate faster and more efficiently".- Alwin Bakkenes
Head of Software Engineering at Volvo Cars.

‍

Carin Lagerstedt RemotiveLabs portrait
Carin Lagerstedt
Author
Pär-Olof Håkansson portrait
Pär-Olof Håkansson
Expert
Alwin Bakkenes portrait
Alwin Bakkenes
Expert
Early stage virtualization

“We use RemotiveLabs tooling to simulate the topology of a Usage Mode. With the Docker Container setup, developers can start testing the core computer functionality early in an environment that closely resembles an actual Hardware-in-the-Loop (HIL) rig.”

PO Håkansson portrait

Pär-Olof Håkansson

Senior Software Engineer, Volvo Cars

“We use RemotiveLabs tooling to simulate the topology of a Usage Mode. With the Docker Container setup, developers can start testing the core computer functionality early in an environment that closely resembles an actual Hardware-in-the-Loop (HIL) rig.”

PO Håkansson portrait

Pär-Olof Håkansson

Senior Software Engineer, Volvo Cars

We’re here for you – just email us with any questions you might have! 

hello@remotivelabs.com
Related blog posts

Check out the latest from us

View all posts
Street lights city