Skip to content

Commit

Permalink
refactor(autoware_planning_evaluator): devops node dojo (autowarefoun…
Browse files Browse the repository at this point in the history
…dation#8746)

Signed-off-by: odra <me@lrossetti.com>
  • Loading branch information
odra committed Sep 13, 2024
1 parent b000f6e commit 6effe2c
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 12 deletions.
2 changes: 1 addition & 1 deletion evaluator/autoware_planning_evaluator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ endif()

ament_auto_package(
INSTALL_TO_SHARE
param
launch
config
)
10 changes: 1 addition & 9 deletions evaluator/autoware_planning_evaluator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,7 @@ to a file as specified by the `output_file` parameter.
## Parameters
| Name | Type | Description |
| :-------------------------------- | :------- | :-------------------------------------------------------------------------- |
| `output_file` | `string` | file used to write metrics |
| `ego_frame` | `string` | frame used for the ego pose |
| `selected_metrics` | List | metrics to measure and publish |
| `trajectory.min_point_dist_m` | `double` | minimum distance between two successive points to use for angle calculation |
| `trajectory.lookahead.max_dist_m` | `double` | maximum distance from ego along the trajectory to use for calculation |
| `trajectory.lookahead.max_time_m` | `double` | maximum time ahead of ego along the trajectory to use for calculation |
| `obstacle.dist_thr_m` | `double` | distance between ego and the obstacle below which a collision is considered |
{{ json_to_markdown("evaluator/autoware_planning_evaluator/schema/autoware_planning_evaluator.schema.json") }}
## Assumptions / Known limits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- planning evaluator -->
<group>
<node name="planning_evaluator" exec="planning_evaluator" pkg="autoware_planning_evaluator">
<param from="$(find-pkg-share autoware_planning_evaluator)/param/planning_evaluator.defaults.yaml"/>
<param from="$(find-pkg-share autoware_planning_evaluator)/config/planning_evaluator.param.yaml"/>
<remap from="~/input/odometry" to="$(var input/odometry)"/>
<remap from="~/input/acceleration" to="$(var input/acceleration)"/>
<remap from="~/input/trajectory" to="$(var input/trajectory)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Autoware Planning Evaluator Nodes",
"type": "object",
"definitions": {
"autoware_planning_evaluator": {
"type": "object",
"properties": {
"output_file": {
"description": "output metrics file path",
"type": "string",
"default": ""
},
"ego_frame": {
"description": "reference frame of ego",
"type": "string",
"default": "base_link"
},
"selected_metrics": {
"description": "metrics to collect/record",
"type": "array",
"items": {
"type": "string"
},
"default": [
"curvature",
"point_interval",
"relative_angle",
"length",
"duration",
"velocity",
"acceleration",
"jerk",
"lateral_deviation",
"yaw_deviation",
"velocity_deviation",
"stability",
"stability_frechet",
"obstacle_distance",
"obstacle_ttc",
"modified_goal_longitudinal_deviation",
"modified_goal_lateral_deviation",
"modified_goal_yaw_deviation"
]
},
"trajectory": {
"description": "trajectory object",
"type": "object",
"properties": {
"min_point_dist_m": {
"description": "minimum distance between two successive points to use for angle calculation",
"type": "number",
"default": 0.1
},
"lookahead": {
"description": "lookahead object",
"type": "object",
"properties": {
"max_dist_m": {
"description": "maximum distance from ego along the trajectory to use for calculation",
"type": "number",
"default": 5.0
},
"max_time_s": {
"description": "maximum time ahead of ego along the trajectory to use for calculation",
"type": "number",
"default": 3.0
}
}
}
}
},
"obstacle": {
"description": "obstacle object",
"type": "object",
"properties": {
"dist_thr_m": {
"description": "distance between ego and the obstacle below which a collision is considered",
"type": "number",
"default": 1.0
}
}
}
},
"required": ["ego_frame", "selected_metrics", "trajectory", "obstacle"]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/autoware_planning_evaluator"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class EvalTest : public ::testing::Test
const auto share_dir =
ament_index_cpp::get_package_share_directory("autoware_planning_evaluator");
options.arguments(
{"--ros-args", "--params-file", share_dir + "/param/planning_evaluator.defaults.yaml"});
{"--ros-args", "--params-file", share_dir + "/config/planning_evaluator.param.yaml"});

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

0 comments on commit 6effe2c

Please sign in to comment.