agent-model-integration
Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles
Science Score: 62.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
✓Institutional organization owner
Organization ika-rwth-aachen has institutional domain (www.ika.rwth-aachen.de) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Repository
Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles
Basic Info
- Host: GitHub
- Owner: ika-rwth-aachen
- License: mit
- Language: C++
- Default Branch: main
- Size: 8.34 MB
Statistics
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles
This repository contains the modular integration of our closed-loop agent model within an open simulation architecture presented in our article. We provide a straight-forward simulation integration approach based on standards such as FMI and the Open Simulation Interface (OSI) enabling the agent model to be integrated within different simulation tools. The model itself is a responsive, closed loop and human-like agent that reacts on other traffic participants and is able to perform basic maneuvers. Find a brief description of the simulation architecture but also the agent model itself in the sections below.
https://github.com/ika-rwth-aachen/agent-model-integration/assets/88664444/e2668a36-0715-4c80-9e65-9d8a1419044f
Notice
[!IMPORTANT]
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University.
Simulation, Agent Models and Human-in-the-Loop for Automated Driving are some of many research topics within our Vehicle Intelligence & Automated Driving domain.
If you would like to learn more about how we can support your DevOps or automated driving efforts, feel free to reach out to us!
Timo Woopen - Manager Research Area Vehicle Intelligence & Automated Driving
+49 241 80 23549
timo.woopen@ika.rwth-aachen.de
Content
Publication
Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles
Christian Geller, Daniel Becker, Jobst Beckmann, Lutz Eckstein Institute for Automotive Engineering (ika), RWTH Aachen University
Abstract – Simulative and scenario-based testing are crucial methods in the safety assurance for automated driving systems. To ensure that simulation results are reliable, the real world must be modeled with sufficient fidelity, including not only the environment but also the surrounding traffic of a vehicle under test. Thus, the availability of traffic agent models is of common interest to model naturalistic and parameterizable behavior, similar to human drivers. The interchangeability of agent models across different simulation environments represents a major challenge and necessitates harmonization and standardization. That is why we propose a standardized architecture for the integration of agent models based on the Open Simulation Interface (OSI) as a structured message format. In addition, the Functional Mock-up Interface is used for a dynamic exchange of models. Using our architecture enables a simple and modular integration of closed-loop agent models into multiple popular simulation tools. The generic nature of the architecture is demonstrated by integrating a novel and modular agent model into three different simulation tools: OpenPASS, CARLA, and CarMaker. Plausible behavior of the agent model to generate realistic traffic is achieved by defining various capabilities such as naturalistic free driving, vehicle following, and obeying basic traffic rules. In our paper, we motivate the simulation integration architecture and evaluate the agent model regarding its capabilities in both simple scenarios, but also in complex multi-agent traffic simulations. We make both the integration architecture and the agent model publicly available at github.com/ika-rwth-aachen/agent-model-integration.
Fig. 1: Intersection scenario populated by multiple agents within the exemplary simulation tool CARLA. The agent model's main capabilities are highlighted to demonstrate a responsive and human-like behavior. In addition, the general integration process is illustrated, starting with the development of the agent model, subsequent simulation integration, and final testing.
Getting Started
The overall architecture is designed to package the model as an FMU capable of transferring data via OSI. Thus, the model can be either directly downloaded as provided FMU file or alternatively built from source.
Download Artifact
We provide a GitHub Action that directly builds the agent model in an FMU package within a GitHub CI workflow. You can download all released FMU packages of the agent model here.
Build from Source
Alternatively, the following steps describe how you can build the resulting ikaAgentModel.fmu package own your own from source.
Requirements
We recommend to use Ubuntu 20.04 or higher and at least CMake version 3.5!
Before starting the build process, the repository submodules need to be downloaded:
git submodule update --init --recursive
[!NOTE] Due to the usage of the CMake feature
ExternalProject_Add(), there is no need to download and build Protobuf from source.
Build Model using CMake
Create a
builddirectory and enter it:mkdir build && cd buildExecute CMake:
cmake -DCMAKE_BUILD_TYPE=Release ..[!NOTE] The default build directory for the
FMUis the subfolderlib/. If a specificFMUoutput dir shall be used, set the variableFMU_OUTDIR, e.g.cmake -DCMAKE_BUILD_TYPE=Release -DFMU_OUTDIR=<dir> ..Compile the FMU package:
make[!NOTE] Use
make -j4for building on multiple cores
Debugging
The external FMU parameter DEBUG enables logging information at runtime within the ${workspace}/debug folder. The resulting json files hold information about the horizon, vehicle_state, and driver_state at each timestep.
Simulation Integration
The final integration of the model into an existing simulation architecture depends significantly on the particular tool, which means that no specific instructions can be given here. While some tools such as CarMaker or OpenPass enable direct support of FMUs, third-party open-source tools such as the Carla-OSI-Service and OSMP-Service can be used for CARLA. Please have a detailed look at the specific documentation of your chosen simulation tool.
Concept
Open Simulation Architecture
Before describing the agent model itself, its framework is briefly described.
The implementation uses the OSI Sensor Model Packaging (OSMP) framework to pack the library as a standardized FMU. This way, the model may be integrated in any simulation platform that supports the Open Simulation Interface (OSI) and FMI.
The figure below illustrates the wrapping around the actual behavior and dynamics model to end up with an encapsulated FMU. The input of the FMU consists of an osi3::SensorView for the environment representation and an osi3::TrafficCommand which holds information on the agent's task in the simulation run. On the output side the simulator can either use the provided osi3::TrafficUpdate to manage the updated pose of the agent or forward the generated sl::DynamicsRequest message to another module that then calculates an osi3::TrafficUpdate. Inside the FMU, internal interfaces are used to feed the behavior model and then calculate its new position with a simple vehicle model and controllers for pedal values and the steering angle.
> *Fig. 2: Agent model packed as FMU integrated into an OSI-based simulation architecture.*
Agent Model
The model core itself is open-sourced in a dedicated GitHub repository. However, its basic structure and features are described in this section.
Information Flow
On the left side of the following figure the input interface is shown. It consists of information on the environment (static + dynamic), the route and the ego vehicle. Inside the model these signals are processed as Perception layer. This is currently just a "pass-through" layer, but it would be possible to model the driver's perception ability by disturbing input signals.
The Processing layer takes the environment and traffic data and enriches them with measured values such as TTC or THW. Following, the most suitable maneuver is selected and modeled by conscious guiding variables (e.g. a THW to a leading vehicle that should be maintained). Conscious variables are controlled by the sub-conscious variables acceleration and curvature (Note: Z-micro corresponds to the later implemented sl::DynamicsRequest message here).
The Action layer models the actual dynamics of the vehicle and is visualized as Dynamics Model also in the right most block of the previous figure.
> *Fig. 3: Behavior model architecture (taken from [2]). An extensive discussion of the figure below can be found in [1]*
Basic Maneuvers
The agent model is implemented such that basic driving maneuvers are modeled which enable the model to perform most driving tasks that are required in urban scenarios (cf. [1]). Those capabilities or basic maneuvers are illustrated as a state diagram in the following:
> *Fig. 4: Behavior model basic maneuvers (taken from [2]).*
Parametrization
The most important parameters are directly configurable using FMU parameters:
| Parameter | Description |
| ------------| ---------------------------------------------------------------------- |
| v_init | The initial velocity of the agent (in m/s) |
| v_desired | The desired velocity the agent reaches on a straight road (in m/s) |
[!NOTE] All other model parameters can be parameterized directly in the source code of the agent model.
External Interface
When integrating the agent model within the open simulation architecture, a well-defined interface is required. OSI already defines a valid and powerful baseline.
Input: Required Fields in OSI3::SensorView
The following fields are required as OSI inputs for the agent model
``` sensorview hostvehicleid globalgroundtruth movingobject base --> all except basepolygon id assignedlaneid --> Is deprecated in osi. Will be changed to classification soon vehicleclassification --> maybe fill that as well. The deprecated signal above will be changed lane id classification type --> typeintersection is important ishostvehiclelane centerline centerlineisdrivingdirection leftadjacentlaneid rightadjacentlaneid lanepairing rightlaneboundaryid leftlaneboundaryid subtype laneboundary id boundaryline classification --> not that important for now, but maybe in the future trafficsign mainsign base position classification assignedlane type value trafficlight base --> all except basepolygon id classification color icon assignedlaneid roadmarking --> not right now but for stop lines in the future
trafficcommand action --> the following actions can be considered right now acquireglobalpositionaction # path and trajectory are implemented the same as acquire position: # the last point of the list is taken and a path along the centerlines # ist planned. So it is not really a follow path/trajectory action followpathaction followtrajectoryaction speed_action --> the desired velocity is updated ```
Output: Fields in OSI3::TrafficUpdate and SL::DynamicsRequest filled by the agent model
The following fields are filled from the agent model and can be used by the simulation tool.
``` osi3 # Values computed by a simple vehicle model and PID controllers for pedal and steering trafficupdate position (x,y) velocity (x,y) acceleration (x,y) orientation (yaw) orientationrate (yaw)
Can be used when a separate dynamic module is used (not the agent's dynamics module)
sl # Can be used when a separate dynamic module is used (not the agent's dynamics module) dynamicrequest curvaturetarget longitudinalaccelerationtarget
Note: these are desired values from the behavior model
```
References
[1] System Design of an Agent Model for the Closed-Loop Simulation of Relevant Scenarios in the Development of ADS, 29th Aachen Colloquium 2020, 07.10.2020, Aachen. Jens Klimke, E.Go Moove GmbH; Daniel Becker, Institut für Kraftfahrzeuge (ika); Univ.-Prof. Dr.-Ing. Lutz Eckstein, Insitut für Kraftfahrzeuge (ika)
[2] Agentenmodell für die Closed-Loop-Simulation von Verkehrszenarien, ATZelektronik 05 Mai 2021, 16. Jahrgang, S.42-46. Daniel Becker, Jens Klimke, Lutz Eckstein. Link
Citation
We hope that our agent model integration can help your research. If this is the case, please cite it using the following metadata.
@article{AgentModelIntegration25,
author = {Geller, Christian and Becker, Daniel and Beckmann, Jobst and Eckstein, Lutz},
title = {{Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles}},
url = {https://github.com/ika-rwth-aachen/agent-model-integration},
year = {2025}
}
Acknowledgements
This work has been done in the context of the SUNRISE project which is co-funded by the European Commission’s Horizon Europe Research and Innovation Programme under grant agreement number 101069573. Views and opinions expressed, are those of the author(s) only and do not necessarily reflect those of the European Union or the European Climate, Infrastructure and Environment Executive Agency (CINEA). Neither the European Union nor the granting authority can be held responsible for them.
Additionally, this work received funding from the SET Level and VVM projects as part of the PEGASUS project family, promoted by the German Federal Ministry for Economic Affairs and Energy based on a decision of the Deutsche Bundestag.
Owner
- Name: Institut für Kraftfahrzeuge, RWTH Aachen, ika
- Login: ika-rwth-aachen
- Kind: organization
- Location: Aachen, Germany
- Website: https://www.ika.rwth-aachen.de
- Repositories: 16
- Profile: https://github.com/ika-rwth-aachen
Citation (CITATION.cff)
cff-version: 1.2.0
message: "We hope that our agent model integration can help your research. If this is the case, please cite it using the following metadata."
title: "CARLOS"
type: software
repository-code: "https://github.com/ika-rwth-aachen/agent-model-integration"
date-released: 2024-05-01
authors:
- given-names: Christian
family-names: Geller
- given-names: Daniel
family-names: Becker
- given-names: Jobst
family-names: Beckmann
- given-names: Lutz
family-names: Eckstein
preferred-citation:
title: "Integration of an Agent Model into an Open Simulation Architecture for Scenario-Based Testing of Automated Vehicles"
type: article
year: 2025
# doi:
url: "https://github.com/ika-rwth-aachen/agent-model-integration"
authors:
- given-names: Christian
family-names: Geller
orcid: "https://orcid.org/0000-0001-8655-3201"
- given-names: Daniel
family-names: Becker
orcid: "https://orcid.org/0000-0003-4224-0195"
- given-names: Jobst
family-names: Beckmann
orcid: "https://orcid.org/0009-0000-6340-9389"
- given-names: Lutz
family-names: Eckstein
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| DBE | d****r@i****e | 1 |
Committer Domains (Top 20 + Academic)
Dependencies
- actions/checkout v4.1.2 composite
- ncipollo/release-action v1.14.0 composite
- threeal/cmake-action main composite