15.1.0
Description
Abstract
Add override_parameters
argument to scenario_test_runner
to override ParameterDeclaration
in scenarios.
Background
Parameter overriding is performed inside internal web service.
This pull-request provides same functionalities and support local execution of the web service.
Details
service
openscenario_preprocessor_msgs/srv/SetParameter.srv
string name
string value
---
service path: /simulation/openscenario_preprocessor/set_parameter
the service server is hosted by openscenario_preprocessor
and used by scenario_test_runner
.
override_parameters
argument specification
usage
You can specify JSON formatted string to override_parameters
argument
ros2 launch scenario_test_runner scenario_test_runner.launch.py override_parameters:='{"offset": 1.2, "max_vel": 8.88}'
behavior
The specified parameters by override_parameters
argument will override ParameterDeclaration
values.
If there is no ParameterDeclaration
that matches to specified parameters exists, it will simply be ignored.
Note
The target of override_parameters
is ParameterDeclaration
.
Please note that ScenarioModifier
, which directly overrides identifiers in the scenario without going through the value of ParameterDeclaration
, will not be overwritten. (e.g. LANE_ID
in sample.yaml
)
output files
$ tree /tmp/scenario_test_runner
.
├── execution_timer.json
├── result.junit.xml
└── sample
├── raw
│ ├── sample_0.xosc
│ ├── sample_1.xosc
│ └── sample_2.xosc
├── sample_0
│ ├── metadata.yaml
│ └── sample_0_0.mcap
├── sample_0.xosc
├── sample_1
│ ├── metadata.yaml
│ └── sample_1_0.mcap
├── sample_1.xosc
├── sample_2
│ ├── metadata.yaml
│ └── sample_2_0.mcap
└── sample_2.xosc
References
Destructive Changes
None
Known Limitations
As I mentioned, ScenarioModifier
, which directly overrides identifiers in the scenario without going through the value of ParameterDeclaration
, will not be overwritten. (e.g. LANE_ID
in sample.yaml
)