diff --git a/sensing/image_transport_decompressor/README.md b/sensing/image_transport_decompressor/README.md index 1a2b18f91c17a..97e0178eb00d6 100644 --- a/sensing/image_transport_decompressor/README.md +++ b/sensing/image_transport_decompressor/README.md @@ -22,6 +22,8 @@ The `image_transport_decompressor` is a node that decompresses images. ## Parameters +{{ json_to_markdown("sensing/image_transport_decompressor/schema/image_transport_decompressor.schema.json") }} + ## Assumptions / Known limits ## (Optional) Error detection and handling diff --git a/sensing/image_transport_decompressor/config/image_transport_decompressor.param.yaml b/sensing/image_transport_decompressor/config/image_transport_decompressor.param.yaml new file mode 100644 index 0000000000000..05b0f0b64a09a --- /dev/null +++ b/sensing/image_transport_decompressor/config/image_transport_decompressor.param.yaml @@ -0,0 +1,3 @@ +/**: + ros__parameters: + encoding: default diff --git a/sensing/image_transport_decompressor/launch/image_transport_decompressor.launch.xml b/sensing/image_transport_decompressor/launch/image_transport_decompressor.launch.xml index f608d504733bf..61296531f17f2 100644 --- a/sensing/image_transport_decompressor/launch/image_transport_decompressor.launch.xml +++ b/sensing/image_transport_decompressor/launch/image_transport_decompressor.launch.xml @@ -1,9 +1,11 @@ + + diff --git a/sensing/image_transport_decompressor/schema/image_transport_decompressor.schema.json b/sensing/image_transport_decompressor/schema/image_transport_decompressor.schema.json new file mode 100644 index 0000000000000..fdbe1bcd721dd --- /dev/null +++ b/sensing/image_transport_decompressor/schema/image_transport_decompressor.schema.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for Image Transport Decompressor", + "type": "object", + "definitions": { + "image_transport_decompressor": { + "type": "object", + "properties": { + "encoding": { + "type": "string", + "description": "The image encoding to use for the decompressed image", + "default": "default" + } + }, + "required": ["encoding"] + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/image_transport_decompressor" + } + }, + "required": ["ros__parameters"] + } + }, + "required": ["/**"] +} diff --git a/sensing/image_transport_decompressor/src/image_transport_decompressor.cpp b/sensing/image_transport_decompressor/src/image_transport_decompressor.cpp index 4244facf7af12..ffc1e5865c856 100644 --- a/sensing/image_transport_decompressor/src/image_transport_decompressor.cpp +++ b/sensing/image_transport_decompressor/src/image_transport_decompressor.cpp @@ -69,7 +69,7 @@ namespace image_preprocessor { ImageTransportDecompressor::ImageTransportDecompressor(const rclcpp::NodeOptions & node_options) : rclcpp::Node("image_transport_decompressor", node_options), - encoding_(declare_parameter("encoding", "default")) + encoding_(declare_parameter("encoding")) { compressed_image_sub_ = create_subscription( "~/input/compressed_image", rclcpp::SensorDataQoS(),