Skip to content

Commit

Permalink
feat(autoware_traffic_light_multi_camera_fusion): Created Schema file…
Browse files Browse the repository at this point in the history
… and updated ReadME file for parameters setting

Signed-off-by: vish0012 <[email protected]>
  • Loading branch information
vish0012 committed Jan 21, 2025
1 parent b107ac7 commit 2f91cac
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ You don't need to configure these topics manually. Just provide the `camera_name

## Node parameters

| Parameter | Type | Description |
| ---------------------- | --------------- | ------------------------------------------------ |
| `camera_namespaces` | vector\<string> | Camera Namespaces to be fused |
| `message_lifespan` | double | The maximum timestamp span to be fused |
| `approximate_sync` | bool | Whether work in Approximate Synchronization Mode |
| `perform_group_fusion` | bool | Whether perform Group Fusion |
{{ json_to_markdown("perception/autoware_traffic_light_multi_camera_fusion/schema/traffic_light_multi_camera_fusion.schema.json") }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "autoware_traffic_light_multi_camera_fusion parameter",
"type": "object",
"definitions": {
"autoware_traffic_light_multi_camera_fusion": {
"type": "object",
"properties": {
"camera_namespaces": {
"type": "array",
"description": "Camera namespaces to be fused.",
"items": {
"type": "string"
},
"default": []
},
"message_lifespan": {
"type": "number",
"description": "The maximum timestamp span to be fused.",
"default": 0.0
},
"approximate_sync": {
"type": "boolean",
"description": "Whether to work in Approximate Synchronization Mode.",
"default": false
},
"perform_group_fusion": {
"type": "boolean",
"description": "Whether to perform Group Fusion.",
"default": false
}
},
"required": [
"camera_namespaces",
"message_lifespan",
"approximate_sync",
"perform_group_fusion"
],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/autoware_traffic_light_multi_camera_fusion"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}

Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ MultiCameraFusion::MultiCameraFusion(const rclcpp::NodeOptions & node_options)
std::vector<std::string> camera_namespaces =
this->declare_parameter("camera_namespaces", std::vector<std::string>{});
is_approximate_sync_ = this->declare_parameter<bool>("approximate_sync", false);
message_lifespan_ = this->declare_parameter<double>("message_lifespan", 0.09);
message_lifespan_ = this->declare_parameter<double>("message_lifespan");
for (const std::string & camera_ns : camera_namespaces) {
std::string signal_topic = camera_ns + "/classification/traffic_signals";
std::string roi_topic = camera_ns + "/detection/rois";
Expand Down

0 comments on commit 2f91cac

Please sign in to comment.