Skip to content

Commit

Permalink
refactor(json-schema): align schema and config file names (autowarefo…
Browse files Browse the repository at this point in the history
…undation#5798)

The schema files need to follow a NODE_NAME.schema.json naming
convention and the configuration files need to follow a
NODE_NAME*.param.yaml naming convention. It allows to have one schema
file per node in a package.

Rename files that didn't match this pattern.

Signed-off-by: Ambroise Vincent <[email protected]>
  • Loading branch information
ambroise-arm authored Dec 27, 2023
1 parent b585d60 commit 4e0503b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Parameters for Radar Fusion to Detected Object Node",
"type": "object",
"definitions": {
"radar_fusion_to_detected_object": {
"radar_object_fusion_to_detected_object": {
"type": "object",
"properties": {
"node_params": {
Expand Down Expand Up @@ -104,7 +104,7 @@
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/radar_fusion_to_detected_object"
"$ref": "#/definitions/radar_object_fusion_to_detected_object"
}
},
"required": ["ros__parameters"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Parameters for Mission Planner nodes",
"type": "object",
"definitions": {
"mission_planner_nodes": {
"mission_planner": {
"type": "object",
"properties": {
"map_frame": {
Expand Down Expand Up @@ -73,7 +73,7 @@
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/mission_planner_nodes"
"$ref": "#/definitions/mission_planner"
}
},
"required": ["ros__parameters"]
Expand Down
4 changes: 2 additions & 2 deletions system/autoware_auto_msgs_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `autoware_auto_msgs_adapter` package provides the following capabilities:

## Usage

Customize the adapter configuration by replicating and editing the `adapter_control.param.yaml` file located
Customize the adapter configuration by replicating and editing the `autoware_auto_msgs_adapter_control.param.yaml` file located
in the `autoware_auto_msgs_adapter/config` directory. Example configuration:

```yaml
Expand Down Expand Up @@ -90,7 +90,7 @@ To add a new message pair,
- Add a new entry to the [schema/autoware_auto_msgs_adapter.schema.json](schema/autoware_auto_msgs_adapter.schema.json) file in the `definitions:autoware_auto_msgs_adapter:properties:msg_type_target:enum` section.
- Learn more about JSON schema usage in [here](https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/parameters/#json-schema).
- Create a new config file by replicating and editing:
- [adapter_control.param.yaml](config/adapter_control.param.yaml)
- [autoware_auto_msgs_adapter_control.param.yaml](config/autoware_auto_msgs_adapter_control.param.yaml)
- Add a new test file by replicating and editing:
- [test_msg_ackermann_control_command.cpp](test/test_msg_ackermann_control_command.cpp)
- No need to edit the `CMakeLists.txt` file as it will automatically detect the new test file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="control_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/adapter_control.param.yaml"/>
<arg name="map_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/adapter_map.param.yaml"/>
<arg name="perception_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/adapter_perception.param.yaml"/>
<arg name="planning_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/adapter_planning.param.yaml"/>
<arg name="control_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/autoware_auto_msgs_adapter_control.param.yaml"/>
<arg name="map_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/autoware_auto_msgs_adapter_map.param.yaml"/>
<arg name="perception_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/autoware_auto_msgs_adapter_perception.param.yaml"/>
<arg name="planning_param_path" default="$(find-pkg-share autoware_auto_msgs_adapter)/config/autoware_auto_msgs_adapter_planning.param.yaml"/>

<node pkg="autoware_auto_msgs_adapter" exec="autoware_auto_msgs_adapter_exe" name="autoware_auto_msgs_adapter_control" output="screen">
<param from="$(var control_param_path)"/>
Expand Down

0 comments on commit 4e0503b

Please sign in to comment.