luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

get and set DisparityToDepthUseSpecTranslation #397

Closed BriceRenaudeau closed 9 months ago

BriceRenaudeau commented 10 months ago

Overview

This PR exposes this parameter (DisparityToDepthUseSpecTranslation) in the available parameters.

Issue

To get the best depth result we need to use the distance between lenses computed from the calibration. But for now, this parameter isn't available for ROS nodes.

Changes

ROS distro: Humble List of changes: add declare and set param in stereo_param_handler.cpp

if(declareAndLogParam<bool>("i_set_disparity_to_depth_use_spec_translation", false)) {
        stereo->setDisparityToDepthUseSpecTranslation(true);
    }

Testing

Hardware used: OAK-D Pro Wide Depthai library version:

Serafadam commented 10 months ago

Hi, thanks for the PR, do you have some comparisons with this parameter set on/off?

doisyg commented 9 months ago

This would be super useful and as recommended @CenekAlbl