Skip to content

Commit 6effe2c

Browse files
authored
refactor(autoware_planning_evaluator): devops node dojo (#8746)
Signed-off-by: odra <me@lrossetti.com>
1 parent b000f6e commit 6effe2c

File tree

6 files changed

+104
-12
lines changed

6 files changed

+104
-12
lines changed

evaluator/autoware_planning_evaluator/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ endif()
3131

3232
ament_auto_package(
3333
INSTALL_TO_SHARE
34-
param
3534
launch
35+
config
3636
)

evaluator/autoware_planning_evaluator/README.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,7 @@ to a file as specified by the `output_file` parameter.
6767
6868
## Parameters
6969
70-
| Name | Type | Description |
71-
| :-------------------------------- | :------- | :-------------------------------------------------------------------------- |
72-
| `output_file` | `string` | file used to write metrics |
73-
| `ego_frame` | `string` | frame used for the ego pose |
74-
| `selected_metrics` | List | metrics to measure and publish |
75-
| `trajectory.min_point_dist_m` | `double` | minimum distance between two successive points to use for angle calculation |
76-
| `trajectory.lookahead.max_dist_m` | `double` | maximum distance from ego along the trajectory to use for calculation |
77-
| `trajectory.lookahead.max_time_m` | `double` | maximum time ahead of ego along the trajectory to use for calculation |
78-
| `obstacle.dist_thr_m` | `double` | distance between ego and the obstacle below which a collision is considered |
70+
{{ json_to_markdown("evaluator/autoware_planning_evaluator/schema/autoware_planning_evaluator.schema.json") }}
7971
8072
## Assumptions / Known limits
8173

evaluator/autoware_planning_evaluator/launch/planning_evaluator.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!-- planning evaluator -->
1313
<group>
1414
<node name="planning_evaluator" exec="planning_evaluator" pkg="autoware_planning_evaluator">
15-
<param from="$(find-pkg-share autoware_planning_evaluator)/param/planning_evaluator.defaults.yaml"/>
15+
<param from="$(find-pkg-share autoware_planning_evaluator)/config/planning_evaluator.param.yaml"/>
1616
<remap from="~/input/odometry" to="$(var input/odometry)"/>
1717
<remap from="~/input/acceleration" to="$(var input/acceleration)"/>
1818
<remap from="~/input/trajectory" to="$(var input/trajectory)"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for Autoware Planning Evaluator Nodes",
4+
"type": "object",
5+
"definitions": {
6+
"autoware_planning_evaluator": {
7+
"type": "object",
8+
"properties": {
9+
"output_file": {
10+
"description": "output metrics file path",
11+
"type": "string",
12+
"default": ""
13+
},
14+
"ego_frame": {
15+
"description": "reference frame of ego",
16+
"type": "string",
17+
"default": "base_link"
18+
},
19+
"selected_metrics": {
20+
"description": "metrics to collect/record",
21+
"type": "array",
22+
"items": {
23+
"type": "string"
24+
},
25+
"default": [
26+
"curvature",
27+
"point_interval",
28+
"relative_angle",
29+
"length",
30+
"duration",
31+
"velocity",
32+
"acceleration",
33+
"jerk",
34+
"lateral_deviation",
35+
"yaw_deviation",
36+
"velocity_deviation",
37+
"stability",
38+
"stability_frechet",
39+
"obstacle_distance",
40+
"obstacle_ttc",
41+
"modified_goal_longitudinal_deviation",
42+
"modified_goal_lateral_deviation",
43+
"modified_goal_yaw_deviation"
44+
]
45+
},
46+
"trajectory": {
47+
"description": "trajectory object",
48+
"type": "object",
49+
"properties": {
50+
"min_point_dist_m": {
51+
"description": "minimum distance between two successive points to use for angle calculation",
52+
"type": "number",
53+
"default": 0.1
54+
},
55+
"lookahead": {
56+
"description": "lookahead object",
57+
"type": "object",
58+
"properties": {
59+
"max_dist_m": {
60+
"description": "maximum distance from ego along the trajectory to use for calculation",
61+
"type": "number",
62+
"default": 5.0
63+
},
64+
"max_time_s": {
65+
"description": "maximum time ahead of ego along the trajectory to use for calculation",
66+
"type": "number",
67+
"default": 3.0
68+
}
69+
}
70+
}
71+
}
72+
},
73+
"obstacle": {
74+
"description": "obstacle object",
75+
"type": "object",
76+
"properties": {
77+
"dist_thr_m": {
78+
"description": "distance between ego and the obstacle below which a collision is considered",
79+
"type": "number",
80+
"default": 1.0
81+
}
82+
}
83+
}
84+
},
85+
"required": ["ego_frame", "selected_metrics", "trajectory", "obstacle"]
86+
}
87+
},
88+
"properties": {
89+
"/**": {
90+
"type": "object",
91+
"properties": {
92+
"ros__parameters": {
93+
"$ref": "#/definitions/autoware_planning_evaluator"
94+
}
95+
},
96+
"required": ["ros__parameters"]
97+
}
98+
},
99+
"required": ["/**"]
100+
}

evaluator/autoware_planning_evaluator/test/test_planning_evaluator_node.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class EvalTest : public ::testing::Test
5353
const auto share_dir =
5454
ament_index_cpp::get_package_share_directory("autoware_planning_evaluator");
5555
options.arguments(
56-
{"--ros-args", "--params-file", share_dir + "/param/planning_evaluator.defaults.yaml"});
56+
{"--ros-args", "--params-file", share_dir + "/config/planning_evaluator.param.yaml"});
5757

5858
dummy_node = std::make_shared<rclcpp::Node>("planning_evaluator_test_node");
5959
eval_node = std::make_shared<EvalNode>(options);

0 commit comments

Comments
 (0)