luxonis / depthai-ros

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

How to set OAK-1 fixed focus. #431

Closed rahulsharma11 closed 8 months ago

rahulsharma11 commented 8 months ago

Hi.

Any suggestion on how to set the fixed focus in OAK-1 camera ? I want to use this camera for my drone so i need fixed focus. I tried following methods but no success: inside depthai_ros_driver/src/param_handlers/sensor_param_handler.cpp Line 140: size_t focus = declareAndLogParam("r_focus", 130, getRangedIntDescriptor(0, 255)); if(declareAndLogParam("r_set_man_focus", true)) { colorCam->initialControl.setManualFocus(focus); }

Any help? Thanks.

Serafadam commented 8 months ago

Hi, you can set fixed focus using parameters, either in yaml file or by using dynamic reconfigure as shown in the Readme

rahulsharma11 commented 8 months ago

Thanks @Serafadam