Skip to content

Commit

Permalink
refactor(control_performance_analysis): rework parameters (autowarefo…
Browse files Browse the repository at this point in the history
…undation#4730)

* refactor the configuration files of the node control_performance_analysis according to the new ROS node config guideline.
Rename controller_performance_analysis.launch.xml->control_performance_analysis.launch.xml
update the parameter information in the README.md

Signed-off-by: yuntianyi-chen <[email protected]>

* style(pre-commit): autofix

* Update the type of a parameter in schema file.

Signed-off-by: yuntianyi-chen <[email protected]>

* revert copyright info

Signed-off-by: yuntianyi-chen <[email protected]>

---------

Signed-off-by: yuntianyi-chen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
yuntianyi-chen and pre-commit-ci[bot] authored Sep 21, 2023
1 parent 057c2d5 commit e942c2d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Control Performance Analysis Node",
"type": "object",
"definitions": {
"control_performance_analysis": {
"type": "object",
"properties": {
"curvature_interval_length": {
"type": "number",
"default": 5.0,
"description": "Used for estimating current curvature."
},
"prevent_zero_division_value": {
"type": "number",
"default": 0.001,
"description": "Value to avoid zero division.."
},
"odom_interval": {
"type": "integer",
"default": 0,
"description": "Interval between odom messages, increase it for smoother curve."
},
"acceptable_max_distance_to_waypoint": {
"type": "number",
"default": 2.0,
"description": "Maximum distance between trajectory point and vehicle [m]."
},
"acceptable_max_yaw_difference_rad": {
"type": "number",
"default": 0.95,
"description": "Maximum yaw difference between trajectory point and vehicle [rad]."
},
"low_pass_filter_gain": {
"type": "number",
"default": 1.0472,
"description": "Low pass filter gain."
}
},
"required": [
"curvature_interval_length",
"prevent_zero_division_value",
"odom_interval",
"acceptable_max_distance_to_waypoint",
"acceptable_max_yaw_difference_rad",
"low_pass_filter_gain"
]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/control_performance_analysis"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ControlPerformanceAnalysisNode::ControlPerformanceAnalysisNode(
// Node Parameters.
param_.curvature_interval_length_ = declare_parameter<double>("curvature_interval_length");
param_.prevent_zero_division_value_ = declare_parameter<double>("prevent_zero_division_value");
param_.odom_interval_ = declare_parameter<int>("odom_interval");
param_.odom_interval_ = declare_parameter<int64_t>("odom_interval");
param_.acceptable_max_distance_to_waypoint_ =
declare_parameter<double>("acceptable_max_distance_to_waypoint");
param_.acceptable_max_yaw_difference_rad_ =
Expand Down

0 comments on commit e942c2d

Please sign in to comment.