Skip to content

Commit

Permalink
Added map_projection_loader.schema.json.
Browse files Browse the repository at this point in the history
Modified README.md of map_projection_loader to read the schema.json file to construct the table of parameters

Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Jan 31, 2024
1 parent 9481df9 commit 3d754f2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
9 changes: 4 additions & 5 deletions map/map_projection_loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ map_origin:
## Published Topics
- ~/map_projector_info (tier4_map_msgs/MapProjectorInfo) : Topic for defining map projector information
- `~/map_projector_info` (tier4_map_msgs/MapProjectorInfo) : This topic shows the definition of map projector information

## Parameters

| Name | Type | Description |
| :---------------------- | :---------- | :------------------------------------------------------------------------------- |
| map_projector_info_path | std::string | A path to map_projector_info.yaml (used by default) |
| lanelet2_map_path | std::string | A path to lanelet2 map (used only when `map_projector_info_path` does not exist) |
Note that these paramters are assumed to be passed from launch arguments, and it is not recommended to directly write them in `map_projection_loader.param.yaml`.

Check warning on line 89 in map/map_projection_loader/README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (paramters)

Check warning on line 89 in map/map_projection_loader/README.md

View workflow job for this annotation

GitHub Actions / spell-check-partial

Unknown word (paramters)

{{ json_to_markdown("map/map_projection_loader/schema/map_projection_loader.schema.json") }}
42 changes: 42 additions & 0 deletions map/map_projection_loader/schema/map_projection_loader.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for map_projection_loader",
"type": "object",
"definitions": {
"map_projection_loader": {
"type": "object",
"properties": {
"map_projector_info_path": {
"type": "string",
"description": "The path where map_projector_info.yaml is located",
"default": "$(var map_projector_info_path)"
},
"lanelet2_map_path": {
"type": "string",
"description": "The path where the lanelet2 map file (.osm) is located",
"default": "$(var lanelet2_map_path)"
}
},
"required": [
"map_projector_info_path",
"lanelet2_map_path"
],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/map_projection_loader"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}

0 comments on commit 3d754f2

Please sign in to comment.