Skip to content

Commit bdb584a

Browse files
refactor(map_height_fitter): rework parameters (#6327)
* Create param.yaml and schema.json file for map_height_fitter. Revised README.md of map_height_fitter to match the current status. Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * Fixed typo Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> * style(pre-commit): autofix * Added double quot to map_loader_node Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> --------- Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent be5663c commit bdb584a

File tree

5 files changed

+58
-7
lines changed

5 files changed

+58
-7
lines changed

map/map_height_fitter/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ ament_auto_add_executable(node
1414
src/node.cpp
1515
)
1616

17-
ament_auto_package(INSTALL_TO_SHARE launch)
17+
ament_auto_package(
18+
INSTALL_TO_SHARE
19+
launch
20+
config)

map/map_height_fitter/README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ This library fits the given point with the ground of the point cloud map.
44
The map loading operation is switched by the parameter `enable_partial_load` of the node specified by `map_loader_name`.
55
The node using this library must use multi thread executor.
66

7-
| Interface | Local Name | Description |
8-
| ------------ | ------------------ | ---------------------------------------- |
9-
| Parameter | map_loader_name | The point cloud map loader name. |
10-
| Subscription | ~/pointcloud_map | The topic name to load the whole map |
11-
| Client | ~/partial_map_load | The service name to load the partial map |
7+
## Parameters
8+
9+
{{ json_to_markdown("map/map_height_fitter/schema/map_height_fitter.schema.json") }}
10+
11+
## Topic subscription
12+
13+
| Topic Name | Description |
14+
| ---------------- | -------------------------------------------------------------------------------------------- |
15+
| ~/pointcloud_map | The topic containing the whole pointcloud map (only used when `enable_partial_load = false`) |
16+
17+
## Service client
18+
19+
| Service Name | Description |
20+
| ------------------ | ----------------------------------- |
21+
| ~/partial_map_load | The service to load the partial map |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**:
2+
ros__parameters:
3+
map_loader_name: "/map/pointcloud_map_loader"

map/map_height_fitter/launch/map_height_fitter.launch.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<launch>
2+
<arg name="param_path" default="$(find-pkg-share map_height_fitter)/config/map_height_fitter.param.yaml"/>
3+
24
<group>
35
<push-ros-namespace namespace="map"/>
46
<node pkg="map_height_fitter" exec="node" name="map_height_fitter">
5-
<param name="map_loader_name" value="/map/pointcloud_map_loader"/>
7+
<param from="$(var param_path)"/>
68
<remap from="~/pointcloud_map" to="/map/pointcloud_map"/>
79
<remap from="~/partial_map_load" to="/map/get_partial_pointcloud_map"/>
810
</node>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for map_height_fitter",
4+
"type": "object",
5+
"definitions": {
6+
"map_height_fitter": {
7+
"type": "object",
8+
"properties": {
9+
"map_loader_name": {
10+
"type": "string",
11+
"description": "Node name of the map loader from which this map_height_fitter will retrieve its parameters",
12+
"default": "/map/pointcloud_map_loader"
13+
}
14+
},
15+
"required": ["map_loader_name"],
16+
"additionalProperties": false
17+
}
18+
},
19+
"properties": {
20+
"/**": {
21+
"type": "object",
22+
"properties": {
23+
"ros__parameters": {
24+
"$ref": "#/definitions/map_height_fitter"
25+
}
26+
},
27+
"required": ["ros__parameters"],
28+
"additionalProperties": false
29+
}
30+
},
31+
"required": ["/**"],
32+
"additionalProperties": false
33+
}

0 commit comments

Comments
 (0)