Skip to content

Commit

Permalink
refactor(detection_by_tracker): rework parameters (#4989)
Browse files Browse the repository at this point in the history
* refactor the configuration files of the node detection_by_tracker_node according to the new ROS node config guideline.

update the parameter information in the README.md

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

* style(pre-commit): autofix

* revert copyright info

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

* style(pre-commit): autofix

* update config file

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>
Co-authored-by: Satoshi OTA <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent e68ddf2 commit 9444f0c
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 10 deletions.
3 changes: 2 additions & 1 deletion perception/detection_by_tracker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ rclcpp_components_register_node(detection_by_tracker_node
EXECUTABLE detection_by_tracker
)

ament_auto_package(INSTALL_TO_SHARE
ament_auto_package(
INSTALL_TO_SHARE
launch
config
)
11 changes: 11 additions & 0 deletions perception/detection_by_tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ Simply looking at the overlap between the unknown object and the tracker does no

## Parameters

| Name | Type | Description | Default value |
| --------------------------------- | ------ | --------------------------------------------------------------------- | ------------- |
| `tracker_ignore_label.UNKNOWN` | `bool` | If true, the node will ignore the tracker if its label is unknown. | `true` |
| `tracker_ignore_label.CAR` | `bool` | If true, the node will ignore the tracker if its label is CAR. | `false` |
| `tracker_ignore_label.PEDESTRIAN` | `bool` | If true, the node will ignore the tracker if its label is pedestrian. | `false` |
| `tracker_ignore_label.BICYCLE` | `bool` | If true, the node will ignore the tracker if its label is bicycle. | `false` |
| `tracker_ignore_label.MOTORCYCLE` | `bool` | If true, the node will ignore the tracker if its label is MOTORCYCLE. | `false` |
| `tracker_ignore_label.BUS` | `bool` | If true, the node will ignore the tracker if its label is bus. | `false` |
| `tracker_ignore_label.TRUCK` | `bool` | If true, the node will ignore the tracker if its label is truck. | `false` |
| `tracker_ignore_label.TRAILER` | `bool` | If true, the node will ignore the tracker if its label is TRAILER. | `false` |

## Assumptions / Known limits

## (Optional) Error detection and handling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**:
ros__parameters:
tracker_ignore_label:
UNKNOWN : true
CAR : false
TRUCK : false
BUS : false
TRAILER : false
MOTORCYCLE : false
BICYCLE : false
PEDESTRIAN : false
tracker_ignore_label.UNKNOWN : true
tracker_ignore_label.CAR : false
tracker_ignore_label.TRUCK : false
tracker_ignore_label.BUS : false
tracker_ignore_label.TRAILER : false
tracker_ignore_label.MOTORCYCLE : false
tracker_ignore_label.BICYCLE : false
tracker_ignore_label.PEDESTRIAN : false
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for Detection By Tracker Node",
"type": "object",
"definitions": {
"detection_by_tracker": {
"type": "object",
"properties": {
"tracker_ignore_label.UNKNOWN": {
"type": "boolean",
"default": true,
"description": "If true, the node will ignore the tracker if its label is unknown."
},
"tracker_ignore_label.CAR": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is CAR."
},
"tracker_ignore_label.PEDESTRIAN": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is pedestrian."
},
"tracker_ignore_label.BICYCLE": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is bicycle."
},
"tracker_ignore_label.MOTORCYCLE": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is motorcycle."
},
"tracker_ignore_label.BUS": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is bus."
},
"tracker_ignore_label.TRUCK": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is truck."
},
"tracker_ignore_label.TRAILER": {
"type": "boolean",
"default": false,
"description": "If true, the node will ignore the tracker if its label is TRAILER."
}
},
"required": [
"tracker_ignore_label.UNKNOWN",
"tracker_ignore_label.CAR",
"tracker_ignore_label.PEDESTRIAN",
"tracker_ignore_label.BICYCLE",
"tracker_ignore_label.MOTORCYCLE",
"tracker_ignore_label.BUS",
"tracker_ignore_label.TRUCK",
"tracker_ignore_label.TRAILER"
]
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/detection_by_tracker"
}
},
"required": ["ros__parameters"]
}
},
"required": ["/**"]
}

0 comments on commit 9444f0c

Please sign in to comment.