-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(probabilistic_occupancy_grid_map): rework parameters (#7339)
* refactor(probabilistic_occupancy_grid_map): rework parameters Signed-off-by: Boyang <[email protected]> * style(pre-commit): autofix * Solved the CI's complainment Signed-off-by: Boyang <[email protected]> --------- Signed-off-by: Boyang <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9256892
commit 247e5c7
Showing
8 changed files
with
701 additions
and
52 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
File renamed without changes.
61 changes: 61 additions & 0 deletions
61
perception/probabilistic_occupancy_grid_map/schema/binary_bayes_filter_updater.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,61 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Binary Bayes Filter Updater", | ||
"type": "object", | ||
"definitions": { | ||
"binary_bayes_filter_updater": { | ||
"type": "object", | ||
"properties": { | ||
"probability_matrix": { | ||
"type": "object", | ||
"properties": { | ||
"occupied_to_occupied": { | ||
"type": "number", | ||
"description": "Probability of transitioning from occupied to occupied state.", | ||
"default": 0.95 | ||
}, | ||
"occupied_to_free": { | ||
"type": "number", | ||
"description": "Probability of transitioning from occupied to free state.", | ||
"default": 0.05 | ||
}, | ||
"free_to_occupied": { | ||
"type": "number", | ||
"description": "Probability of transitioning from free to occupied state.", | ||
"default": 0.2 | ||
}, | ||
"free_to_free": { | ||
"type": "number", | ||
"description": "Probability of transitioning from free to free state.", | ||
"default": 0.8 | ||
} | ||
}, | ||
"required": [ | ||
"occupied_to_occupied", | ||
"occupied_to_free", | ||
"free_to_occupied", | ||
"free_to_free" | ||
] | ||
}, | ||
"v_ratio": { | ||
"type": "number", | ||
"description": "Ratio of the variance used in the filter.", | ||
"default": 0.1 | ||
} | ||
}, | ||
"required": ["probability_matrix", "v_ratio"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/binary_bayes_filter_updater" | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
76 changes: 76 additions & 0 deletions
76
perception/probabilistic_occupancy_grid_map/schema/grid_map.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,76 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Grid Map", | ||
"type": "object", | ||
"definitions": { | ||
"visualization_params": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"description": "The type of grid map visualization.", | ||
"default": "occupancy_grid" | ||
}, | ||
"params": { | ||
"type": "object", | ||
"properties": { | ||
"layer": { | ||
"type": "string", | ||
"description": "The layer of the grid map visualization.", | ||
"default": "filled_free_to_farthest" | ||
}, | ||
"data_min": { | ||
"type": "number", | ||
"description": "The minimum data value for the visualization.", | ||
"default": 0.0 | ||
}, | ||
"data_max": { | ||
"type": "number", | ||
"description": "The maximum data value for the visualization.", | ||
"default": 100.0 | ||
} | ||
}, | ||
"required": ["layer", "data_min", "data_max"] | ||
} | ||
}, | ||
"required": ["type", "params"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"type": "object", | ||
"properties": { | ||
"grid_map_topic": { | ||
"type": "string", | ||
"description": "The topic name for the grid map.", | ||
"default": "/perception/occupancy_grid_map/occupancy_grid_map_node/debug/grid_map" | ||
}, | ||
"grid_map_visualizations": { | ||
"type": "array", | ||
"description": "List of grid map visualizations.", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"default": ["grid_1st_step", "grid_2nd_step", "grid_3rd_step"] | ||
}, | ||
"grid_1st_step": { "$ref": "#/definitions/visualization_params" }, | ||
"grid_2nd_step": { "$ref": "#/definitions/visualization_params" }, | ||
"grid_3rd_step": { "$ref": "#/definitions/visualization_params" } | ||
}, | ||
"required": [ | ||
"grid_map_topic", | ||
"grid_map_visualizations", | ||
"grid_1st_step", | ||
"grid_2nd_step", | ||
"grid_3rd_step" | ||
] | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
94 changes: 94 additions & 0 deletions
94
...on/probabilistic_occupancy_grid_map/schema/laserscan_based_occupancy_grid_map.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,94 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for Laserscan Based Occupancy Grid Map", | ||
"type": "object", | ||
"definitions": { | ||
"height_filter_params": { | ||
"type": "object", | ||
"properties": { | ||
"use_height_filter": { | ||
"type": "boolean", | ||
"description": "Flag to use height filter.", | ||
"default": true | ||
}, | ||
"min_height": { | ||
"type": "number", | ||
"description": "Minimum height for the height filter.", | ||
"default": -1.0 | ||
}, | ||
"max_height": { | ||
"type": "number", | ||
"description": "Maximum height for the height filter.", | ||
"default": 2.0 | ||
} | ||
}, | ||
"required": ["use_height_filter", "min_height", "max_height"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"type": "object", | ||
"properties": { | ||
"map_frame": { | ||
"type": "string", | ||
"description": "The frame ID of the map.", | ||
"default": "map" | ||
}, | ||
"base_link_frame": { | ||
"type": "string", | ||
"description": "The frame ID of the base link.", | ||
"default": "base_link" | ||
}, | ||
"gridmap_origin_frame": { | ||
"type": "string", | ||
"description": "The frame ID of the grid map origin.", | ||
"default": "base_link" | ||
}, | ||
"scan_origin_frame": { | ||
"type": "string", | ||
"description": "The frame ID of the scan origin.", | ||
"default": "base_link" | ||
}, | ||
"height_filter": { "$ref": "#/definitions/height_filter_params" }, | ||
"enable_single_frame_mode": { | ||
"type": "boolean", | ||
"description": "Flag to enable single frame mode.", | ||
"default": false | ||
}, | ||
"map_length": { | ||
"type": "number", | ||
"description": "The length of the map.", | ||
"default": 150.0 | ||
}, | ||
"map_width": { | ||
"type": "number", | ||
"description": "The width of the map.", | ||
"default": 150.0 | ||
}, | ||
"map_resolution": { | ||
"type": "number", | ||
"description": "The resolution of the map.", | ||
"default": 0.5 | ||
} | ||
}, | ||
"required": [ | ||
"map_frame", | ||
"base_link_frame", | ||
"gridmap_origin_frame", | ||
"scan_origin_frame", | ||
"height_filter", | ||
"enable_single_frame_mode", | ||
"map_length", | ||
"map_width", | ||
"map_resolution" | ||
] | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
Oops, something went wrong.