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

chore(autoware_traffic_light_multi_camera_fusion): created Schema file and updated ReadME file for parameters setting #9994

Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -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
Expand Up @@ -3,4 +3,4 @@
camera_namespaces: ["camera6", "camera7"]
message_lifespan: 0.09
approximate_sync: false
perform_group_fusion: true

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$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
}
},
"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 @@ -148,9 +148,9 @@ MultiCameraFusion::MultiCameraFusion(const rclcpp::NodeOptions & node_options)
using std::placeholders::_3;

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);
this->declare_parameter<std::vector<std::string>>("camera_namespaces");
is_approximate_sync_ = this->declare_parameter<bool>("approximate_sync", );
MasatoSaeki marked this conversation as resolved.
Show resolved Hide resolved
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