forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ndt_scan_matcher): rework parameters (autowarefoundation#6229)
* refactor(ndt_scan_matcher): rework parameters Signed-off-by: Yamato Ando <[email protected]> * delete tmp file Signed-off-by: Yamato Ando <[email protected]> * style(pre-commit): autofix --------- Signed-off-by: Yamato Ando <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
Showing
12 changed files
with
390 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
localization/ndt_scan_matcher/schema/ndt_scan_matcher.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"type": "object", | ||
"properties": { | ||
"frame": { "$ref": "sub/frame.json#/definitions/frame" }, | ||
"ndt": { "$ref": "sub/ndt.json#/definitions/ndt" }, | ||
"regularization": { "$ref": "ndt_regularization.json#/definitions/ndt/regularization" }, | ||
"initial_pose_estimation": { | ||
"$ref": "sub/initial_pose_estimation.json#/definitions/initial_pose_estimation" | ||
}, | ||
"validation": { "$ref": "sub/validation.json#/definitions/validation" }, | ||
"score_estimation": { | ||
"$ref": "sub/score_estimation.json#/definitions/score_estimation" | ||
}, | ||
"covariance": { "$ref": "sub/covariance.json#/definitions/covariance" }, | ||
"dynamic_map_loading": { | ||
"$ref": "sub/dynamic_map_loading.json#/definitions/dynamic_map_loading" | ||
} | ||
}, | ||
"required": [ | ||
"frame", | ||
"ndt", | ||
"initial_pose_estimation", | ||
"validation", | ||
"score_estimation", | ||
"covariance", | ||
"dynamic_map_loading" | ||
], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["ros__parameters"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["/**"], | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"covariance": { | ||
"type": "object", | ||
"properties": { | ||
"output_pose_covariance": { | ||
"type": "array", | ||
"description": "The covariance of output pose. Note that this covariance matrix is empirically derived.", | ||
"default": [ | ||
0.0225, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0225, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0225, 0.0, | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.000625, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.000625, 0.0, 0.0, | ||
0.0, 0.0, 0.0, 0.0, 0.000625 | ||
] | ||
}, | ||
"covariance_estimation": { | ||
"$ref": "covariance_covariance_estimation.json#/definitions/covariance_estimation" | ||
} | ||
}, | ||
"required": ["output_pose_covariance", "covariance_estimation"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
localization/ndt_scan_matcher/schema/sub/covariance_covariance_estimation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"covariance_estimation": { | ||
"type": "object", | ||
"properties": { | ||
"enable": { | ||
"type": "boolean", | ||
"description": "2D Real-time covariance estimation with multiple searches (output_pose_covariance is the minimum value).", | ||
"default": false | ||
}, | ||
"initial_pose_offset_model_x": { | ||
"type": "array", | ||
"description": "Offset arrangement in covariance estimation [m]. initial_pose_offset_model_x & initial_pose_offset_model_y must have the same number of elements.", | ||
"default": [0.0, 0.0, 0.5, -0.5, 1.0, -1.0] | ||
}, | ||
"initial_pose_offset_model_y": { | ||
"type": "array", | ||
"description": "Offset arrangement in covariance estimation [m]. initial_pose_offset_model_x & initial_pose_offset_model_y must have the same number of elements.", | ||
"default": [0.5, -0.5, 0.0, 0.0, 0.0, 0.0] | ||
} | ||
}, | ||
"required": ["enable", "initial_pose_offset_model_x", "initial_pose_offset_model_y"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
localization/ndt_scan_matcher/schema/sub/dynamic_map_loading.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"dynamic_map_loading": { | ||
"type": "object", | ||
"properties": { | ||
"update_distance": { | ||
"type": "number", | ||
"description": "Dynamic map loading distance.", | ||
"default": 20.0, | ||
"minimum": 0.0 | ||
}, | ||
"map_radius": { | ||
"type": "number", | ||
"description": "Dynamic map loading loading radius.", | ||
"default": 150.0, | ||
"minimum": 0.0 | ||
}, | ||
"lidar_radius": { | ||
"type": "number", | ||
"description": "Radius of input LiDAR range (used for diagnostics of dynamic map loading).", | ||
"default": 100.0, | ||
"minimum": 0.0 | ||
} | ||
}, | ||
"required": ["update_distance", "map_radius", "lidar_radius"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"frame": { | ||
"type": "object", | ||
"properties": { | ||
"base_frame": { | ||
"type": "string", | ||
"description": "Vehicle reference frame.", | ||
"default": "base_link" | ||
}, | ||
"ndt_base_frame": { | ||
"type": "string", | ||
"description": "NDT reference frame.", | ||
"default": "ndt_base_link" | ||
}, | ||
"map_frame": { | ||
"type": "string", | ||
"description": "Map frame.", | ||
"default": "map" | ||
} | ||
}, | ||
"required": ["base_frame", "ndt_base_frame", "map_frame"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
localization/ndt_scan_matcher/schema/sub/initial_pose_estimation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"initial_pose_estimation": { | ||
"type": "object", | ||
"properties": { | ||
"particles_num": { | ||
"type": "number", | ||
"description": "The number of particles to estimate initial pose.", | ||
"default": 200, | ||
"minimum": 1 | ||
}, | ||
"n_startup_trials": { | ||
"type": "number", | ||
"description": "The number of initial random trials in the TPE (Tree-Structured Parzen Estimator). This value should be equal to or less than 'initial_estimate_particles_num' and more than 0. If it is equal to 'initial_estimate_particles_num', the search will be the same as a full random search.", | ||
"default": 20, | ||
"minimum": 1 | ||
} | ||
}, | ||
"required": ["particles_num", "n_startup_trials"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"ndt": { | ||
"type": "object", | ||
"properties": { | ||
"trans_epsilon": { | ||
"type": "number", | ||
"description": "The maximum difference between two consecutive transformations in order to consider convergence.", | ||
"default": 0.01, | ||
"minimum": 0.0 | ||
}, | ||
"step_size": { | ||
"type": "number", | ||
"description": "The newton line search maximum step length.", | ||
"default": 0.1, | ||
"minimum": 0.0 | ||
}, | ||
"resolution": { | ||
"type": "number", | ||
"description": "The ND voxel grid resolution.", | ||
"default": 2.0, | ||
"minimum": 0.0 | ||
}, | ||
"max_iterations": { | ||
"type": "number", | ||
"description": "The number of iterations required to calculate alignment.", | ||
"default": 30, | ||
"minimum": 1 | ||
}, | ||
"num_threads": { | ||
"type": "number", | ||
"description": "Number of threads used for parallel computing.", | ||
"default": 4, | ||
"minimum": 1 | ||
}, | ||
"regularization": { | ||
"$ref": "ndt_regularization.json#/definitions/regularization" | ||
} | ||
}, | ||
"required": [ | ||
"trans_epsilon", | ||
"step_size", | ||
"resolution", | ||
"max_iterations", | ||
"num_threads", | ||
"regularization" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
localization/ndt_scan_matcher/schema/sub/ndt_regularization.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Ndt Scan Matcher Node", | ||
"definitions": { | ||
"regularization": { | ||
"type": "object", | ||
"properties": { | ||
"enable": { | ||
"type": "boolean", | ||
"description": "Regularization switch.", | ||
"default": false | ||
}, | ||
"scale_factor": { | ||
"type": "number", | ||
"description": "Regularization scale factor.", | ||
"default": 0.01, | ||
"minimum": 0.0 | ||
} | ||
}, | ||
"required": ["enable", "scale_factor"], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
Oops, something went wrong.