Skip to content

feat: Add an option to use still output in RGB node - #783

Merged
asahtik merged 6 commits into
luxonis:jazzyfrom
bjsowa:feat/add-still-output
Aug 31, 2026
Merged

feat: Add an option to use still output in RGB node#783
asahtik merged 6 commits into
luxonis:jazzyfrom
bjsowa:feat/add-still-output

Conversation

@bjsowa

@bjsowa bjsowa commented Apr 20, 2026

Copy link
Copy Markdown

Overview

Author: Błażej Sowa

Adds optional support for publishing the ColorCamera “still” output from the RGB node

Changes

ROS distro: jazzy
List of changes:

  • Introduced i_enable_still plus i_still_width / i_still_height parameters for the ColorCamera node.
  • Added a new XLink output + publisher for the still stream.
  • Added a std_srvs/srv/Trigger service to request a still capture via CameraControl.

Testing

Hardware used: Oak-1-MAX, Oak-1-Lite-W, Oak-D-Pro-W
Depthai library version: 2.31.1

@bjsowa

bjsowa commented Jun 3, 2026

Copy link
Copy Markdown
Author

@moratom friendly ping

@bjsowa

bjsowa commented Jul 8, 2026

Copy link
Copy Markdown
Author

@asahtik Is this branch still maintained?

@asahtik

asahtik commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Hi @bjsowa, this branch was merged with humble into develop-old and will no longer be maintained.

@bjsowa

bjsowa commented Jul 17, 2026

Copy link
Copy Markdown
Author

Hi @bjsowa, this branch was merged with humble into develop-old and will no longer be maintained.

develop-old uses depthai v3, this branch targeted depthai v2. Is there no plan to continue maintenance of depthai v2 based ROS packages?

@asahtik

asahtik commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Sorry, my bad. There's no plan to continue active development of v2 based packages, although I will still review PRs. Currently I have a bit of a backlog, but I'm planning on taking care of this and other PRs in early August.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds optional support in the RGB (ColorCamera) node to publish the DepthAI still stream and trigger still captures via a ROS 2 service, extending the existing RGB/preview outputs with a higher-resolution still pathway.

Changes:

  • Adds i_enable_still plus i_still_width / i_still_height parameters and configures ColorCamera::setStillSize().
  • Creates a new XLink output + ImagePublisher for the still stream and publishes it under a /still/image_raw suffix.
  • Adds a std_srvs/srv/Trigger service to request still capture via CameraControl.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
depthai_ros_driver/src/param_handlers/sensor_param_handler.cpp Declares still-related parameters and configures setStillSize().
depthai_ros_driver/src/dai_nodes/sensors/rgb.cpp Adds still XLink output/publisher setup and a Trigger service to request still capture.
depthai_ros_driver/include/depthai_ros_driver/dai_nodes/sensors/rgb.hpp Declares still publisher/service members and callback.
depthai_ros_driver/CMakeLists.txt Adds std_srvs to sensor node dependencies for the new service.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +179 to +181
int stillWidth = declareAndLogParam<int>("i_still_width", width);
int stillHeight = declareAndLogParam<int>("i_still_height", height);
colorCam->setStillSize(stillWidth, stillHeight);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, still should use the sensor size by default

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Still resolution cannot be larger than isp output resolution (which is held in width and height variables at this point in code). Running the driver with default parameters out with this modification results in:

what():  ColorCamera(0) - 'still' width or height (1920, 1080) bigger than maximum at current sensor resolution (1280, 720)

Comment on lines +128 to +132
utils::ImgConverterConfig convConfig;
convConfig.tfPrefix = tfPrefix;
convConfig.getBaseDeviceTimestamp = ph->getParam<bool>("i_get_base_device_timestamp");
convConfig.updateROSBaseTimeOnRosMsg = ph->getParam<bool>("i_update_ros_base_time_on_ros_msg");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The encoding option has only effect when i_low_bandwidth is enabled which I purposefully omitted for still output. For raw frames, Image converter always outputs it in BGR color order.

Comment on lines +140 to +144
pubConfig.width = ph->getParam<int>("i_still_width");
pubConfig.height = ph->getParam<int>("i_still_height");
pubConfig.maxQSize = ph->getParam<int>("i_max_q_size");
pubConfig.topicSuffix = "/still/image_raw";
pubConfig.flipImage = ph->getParam<bool>("i_flip_published_image");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm not sure about that. Adding this option would make it so that enabling compression for video output would also enable lossy compression for still output which is often not wanted.

@bjsowa
bjsowa requested a review from asahtik August 14, 2026 10:26
@asahtik
asahtik merged commit 680ba20 into luxonis:jazzy Aug 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants