openMSL / sl-2-0-traffic-participant-model-repository-template

Template repository: Clone and build your ASAM OSI traffic participant model.
Mozilla Public License 2.0
3 stars 2 forks source link

11 implement osi validation check against a set of rules #12

Closed ClemensLinnhoff closed 3 months ago

ClemensLinnhoff commented 4 months ago

Reference to a related issue in the repository

11, #14

Add a description

Take this checklist as orientation for yourself, if this PR is ready for Maintainer Review

ClemensLinnhoff commented 4 months ago

OSI-Validation is now running on both output trace files (TrafficUpdate and TrafficCommandUpdate).

And for both trace files, two sets of rules are tested: The default rules from OSI and custom rules placed in rules/output_rules according to the defined output fields in the readme. This is the output in the pipeline: image

The first test with the default rules does not generate any warning, so everything is compliant with the OSI standard.

The second test generates one warning per trace file:

  1. The dismissed_action in the TrafficCommandUpdate is not set, which is correct, because it is only set, when an action is actually dismissed. I am currently not sure how to handle this. So the is_set rule needs to be removed from the rules but we still want to indicate, that this field is filled if necessary.
  2. BaseMoving.orientation is not set in the TrafficUpdate. This is actually a bug, that is correctly caught and should be fixed.

The pipeline is currently not failing. I could check if the last line of the individual osi-validation output ends with "--------------" to detect, if there were no warnings and if not set the job to fail.

What do you think @jdsika ?

ClemensLinnhoff commented 3 months ago

Pipeline now fails if errors are found in a trace file, as implemented in https://github.com/OpenSimulationInterface/osi-validation/pull/76