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

feat(autoware_traffic_light_multi_camera_fusion): Created Schema file and updated ReadME file for parameters setting #9994

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,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,56 @@
{
"$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
}
Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"perform_group_fusion": {
"type": "boolean",
"description": "Whether to perform Group Fusion.",
"default": false
}

This parameter is not used. So delete it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And could you delete perform_group_fusion in ***.param.yaml too?

},
"required": [
"camera_namespaces",
"message_lifespan",
"approximate_sync",
"perform_group_fusion"
],
Comment on lines +33 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"required": [
"camera_namespaces",
"message_lifespan",
"approximate_sync",
"perform_group_fusion"
],
"required": [
"camera_namespaces",
"message_lifespan",
"approximate_sync",
],

"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>{});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this->declare_parameter("camera_namespaces", std::vector<std::string>{});
this->declare_parameter<std::vector<std::string>>("camera_namespaces");

is_approximate_sync_ = this->declare_parameter<bool>("approximate_sync", false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is_approximate_sync_ = this->declare_parameter<bool>("approximate_sync", false);
is_approximate_sync_ = this->declare_parameter<bool>("approximate_sync");

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
Loading