Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(probabilistic_occupancy_grid_map): rework parameters #7339

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 8 additions & 52 deletions perception/probabilistic_occupancy_grid_map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,14 @@ You may need to choose `scan_origin_frame` and `gridmap_origin_frame` which mean

![image_for_frame_parameter_visualization](./image/gridmap_frame_settings.drawio.svg)

### Each config parameters

Config parameters are managed in `config/*.yaml` and here shows its outline.

- Pointcloud based occupancy grid map

| Ros param name | Default value |
| -------------------------------------------- | ------------- |
| map_frame | "map" |
| base_link_frame | "base_link" |
| scan_origin_frame | "base_link" |
| gridmap_origin_frame | "base_link" |
| use_height_filter | true |
| enable_single_frame_mode | false |
| filter_obstacle_pointcloud_by_raw_pointcloud | false |
| map_length | 150.0 [m] |
| map_resolution | 0.5 [m] |
| use_projection | false |
| projection_dz_threshold | 0.01 |
| obstacle_separation_threshold | 1.0 |
| input_obstacle_pointcloud | true |
| input_obstacle_and_raw_pointcloud | true |

- Laserscan based occupancy grid map

| Ros param name | Default value |
| ------------------------ | ------------- |
| map_length | 150 [m] |
| map_width | 150 [m] |
| map_resolution | 0.5 [m] |
| use_height_filter | true |
| enable_single_frame_mode | false |
| map_frame | "map" |
| base_link_frame | "base_link" |
| scan_origin_frame | "base_link" |
| gridmap_origin_frame | "base_link" |

## Other parameters

Additional argument is shown below:

| Name | Default | Description |
| ----------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------- |
| `use_multithread` | `false` | whether to use multithread |
| `use_intra_process` | `false` | |
| `map_origin` | `` | parameter to override `map_origin_frame` which means grid map origin |
| `scan_origin` | `` | parameter to override `scan_origin_frame` which means scanning center |
| `output` | `occupancy_grid` | output name |
| `use_pointcloud_container` | `false` | |
| `container_name` | `occupancy_grid_map_container` | |
| `input_obstacle_pointcloud` | `false` | only for laserscan based method. If true, the node subscribe obstacle pointcloud |
| `input_obstacle_and_raw_pointcloud` | `true` | only for laserscan based method. If true, the node subscribe both obstacle and raw pointcloud |
### Parameters

{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/binary_bayes_filter_updater.schema.json") }}
{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/grid_map.schema.json") }}
{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/laserscan_based_occupancy_grid_map.schema.json") }}
{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/multi_lidar_pointcloud_based_occupancy_grid_map.schema.json") }}
{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/pointcloud_based_occupancy_grid_map.schema.json") }}
{{ json_to_markdown("perception/probabilistic_occupancy_grid_map/schema/synchronized_grid_map_fusion_node.schema.json") }}

### Downsample input pointcloud(Optional)

Expand Down
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": ["/**"]
}
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": ["/**"]
}
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": ["/**"]
}
Loading
Loading