diff --git a/map/autoware_lanelet2_map_validator/README.md b/map/autoware_lanelet2_map_validator/README.md index 2b9fa55c..90336b27 100644 --- a/map/autoware_lanelet2_map_validator/README.md +++ b/map/autoware_lanelet2_map_validator/README.md @@ -65,13 +65,13 @@ requirements: - The name list of available validators can be obtained from the `--print` option. - The user can write any other field (like `version`) besides `requirements`. -Then, the `autoware_lanelet2_map_validator` will scan through the input yaml file given by the `--requirements_file, -r` option, and output the validation results to the directory given by the `--output_file_path, -o` option. +Then, the `autoware_lanelet2_map_validator` will scan through the input yaml file given by the `--input_requirements, -i` option, and output the validation results to the directory given by the `--output_directory, -o` option. ```bash -ros2 run autoware_lanelet2_map_validator autoware_lanelet2_map_validator --requirements_file ./requirements_set.yaml --output_file_path ./ +ros2 run autoware_lanelet2_map_validator autoware_lanelet2_map_validator --input_requirements autoware_requirements_set.yaml --output_directory ./ ``` -When the `requirements_file` is thown to `autoware_lanelet2_map_validator`, it will output a `lanelet2_validation_results.yaml` file which looks like the following. +When the `input_requirements` is thown to `autoware_lanelet2_map_validator`, it will output a `lanelet2_validation_results.yaml` file which looks like the following. ```yaml requirements: @@ -130,9 +130,9 @@ requirements: passed: true ``` -- `lanelet2_validation_results.yaml` inherits the input `requirements_file` and add results to it. +- `lanelet2_validation_results.yaml` inherits the yaml file of `input_requirements` and add results to it. - `autoware_lanelet2_map_validator` adds a boolean `passed` field to each requirement. If all validators of the requirement have been passed, the `passed` field of the requirement will be `true` (`false` if not). -- The `passed` field is also given to each validator. If the validator found any issues the `passed` field will turn to be `false` (`true` if not), and adds an `issues` field which is a list of issues found. Each issues contains information of `serverity`, `primitive`, `id`, and `message`. +- The `passed` field is also given to each validator. If the validator found any issues the `passed` field will turn to be `false` (`true` if not), and adds an `issues` field which is a list of issues found. Each issues contains information of `severity`, `primitive`, `id`, and `message`. ### Available command options @@ -141,8 +141,8 @@ requirements: | `-h, --help` | Explains about this tool and show a list of options | | `--print` | Only print all avalible checker, but dont run them | | `-m, --map_file` | Path to the map to be validated | -| `-r, --requirements_file` | Path to the yaml file where the list of requirements and validations is written | -| `-o, --output_file_path` | Path of the yaml file where the list of validation results will be written | +| `-i, --input_requirements` | Path to the yaml file where the list of requirements and validations is written | +| `-o, --output_directory` | Directory to save the list of validation results in a yaml format | | `-v, --validator` | Comma separated list of regexes to filter the applicable validators. Will run all validators by default. Example: `routing_graph.*` to run all checks for the routing graph | | `-p, --projector` | Projector used for loading lanelet map. Available projectors are: mgrs, utm, transverse_mercator. (default: mgrs) | | `-l, --location` | Location of the map (for instanciating the traffic rules), e.g. de for Germany | diff --git a/map/autoware_lanelet2_map_validator/autoware_requirement_set.yaml b/map/autoware_lanelet2_map_validator/autoware_requirement_set.yaml new file mode 100644 index 00000000..9437fb00 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/autoware_requirement_set.yaml @@ -0,0 +1,9 @@ +requirements: + - id: vm-04-01 + validators: + - name: mapping.crosswalk.missing_regulatory_elements + - name: mapping.crosswalk.regulatory_element_details + - id: vm-05-01 + validators: + - name: mapping.traffic_light.missing_regulatory_elements + - name: mapping.traffic_light.regulatory_element_details diff --git a/map/autoware_lanelet2_map_validator/docs/crosswalk/regulatory_element_details_for_crosswalks.md b/map/autoware_lanelet2_map_validator/docs/crosswalk/regulatory_element_details_for_crosswalks.md index 6c94498b..8d423b00 100644 --- a/map/autoware_lanelet2_map_validator/docs/crosswalk/regulatory_element_details_for_crosswalks.md +++ b/map/autoware_lanelet2_map_validator/docs/crosswalk/regulatory_element_details_for_crosswalks.md @@ -9,7 +9,7 @@ mapping.crosswalk.regulatory_element_details This validator checks whether the details in the `crosswalk` subtype regulatory elements are valid. This validator checks seven types of issues. -All output issues specify the crosswalk "lanelet" as the **primitive**, and the lanelet ID will be specified as the **ID**. +All output issues specify the crosswalk "regulatory element" as the **primitive**, and the lanelet ID will be specified as the **ID**. | Message | Severity | Description | | ------- | -------- | ----------- | diff --git a/map/autoware_lanelet2_map_validator/docs/traffic_light/regulatory_element_details_for_traffic_lights.md b/map/autoware_lanelet2_map_validator/docs/traffic_light/regulatory_element_details_for_traffic_lights.md index 254d8010..dfa58c28 100644 --- a/map/autoware_lanelet2_map_validator/docs/traffic_light/regulatory_element_details_for_traffic_lights.md +++ b/map/autoware_lanelet2_map_validator/docs/traffic_light/regulatory_element_details_for_traffic_lights.md @@ -9,7 +9,7 @@ mapping.traffic_light.regulatory_element_details This validator checks whether the details in the `traffic_light` subtype regulatory elements are valid. This validator checks four types of issues. -All output issues specify the traffic_light "linestring" as the **primitive**, and the linestring ID will be specified as the **ID**. +All output issues specify the traffic_light "regulatory element" as the **primitive**, and the linestring ID will be specified as the **ID**. | Message | Severity | Description | | ------- | -------- | ----------- | diff --git a/map/autoware_lanelet2_map_validator/src/lib/cli.cpp b/map/autoware_lanelet2_map_validator/src/lib/cli.cpp index 0aef833b..66622b29 100644 --- a/map/autoware_lanelet2_map_validator/src/lib/cli.cpp +++ b/map/autoware_lanelet2_map_validator/src/lib/cli.cpp @@ -34,11 +34,11 @@ MetaConfig parseCommandLine(int argc, const char * argv[]) ("map_file,m", po::value(), "Path to the map to be validated") - ("requirements_file,r", po::value(), - "Path to the yaml file where the list of requirements and validations is written") + ("input_requirements,i", po::value(), + "Path to the yaml file where the list of requirements and validators is written") - ("output_file_path,o", po::value(), - "Path of the yaml file where the list of validation results will be written") + ("output_directory,o", po::value(), + "Directory to save the list of validation results in a yaml format") ("validator,v", po::value(&validation_config.checksFilter), "Comma separated list of regexes to filter the applicable validators. Will run all " @@ -83,11 +83,11 @@ MetaConfig parseCommandLine(int argc, const char * argv[]) config.command_line_config.mapFile = vm["map_file"].as(); } - if (vm.count("requirements_file") != 0) { - config.requirements_file = vm["requirements_file"].as(); + if (vm.count("input_requirements") != 0) { + config.requirements_file = vm["input_requirements"].as(); } - if (vm.count("output_file_path") != 0) { - config.output_file_path = vm["output_file_path"].as(); + if (vm.count("output_directory") != 0) { + config.output_file_path = vm["output_directory"].as(); } if ( (vm.count("lat") != 0 && vm.count("lon") != 0) && diff --git a/map/autoware_lanelet2_map_validator/test/test_requirement_set.yaml b/map/autoware_lanelet2_map_validator/test/test_requirement_set.yaml new file mode 100644 index 00000000..19e5487f --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/test_requirement_set.yaml @@ -0,0 +1,13 @@ +version: 0.0.1 +requirements: + - id: test-01 + validators: + - name: mapping.crosswalk.missing_regulatory_elements + - name: mapping.crosswalk.regulatory_element_details + - id: test-02 + validators: + - name: mapping.traffic_light.missing_regulatory_elements + - name: mapping.traffic_light.regulatory_element_details + - id: test-03 + validators: + - name: mapping.stop_line.missing_regulatory_elements