luxonis / depthai-ros

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

[BUG] Unable to use external calibration #351

Closed kaichie closed 10 months ago

kaichie commented 11 months ago

Describe the bug Unable to use external calibrated file by providing the path to i_external_calibration_path.

Minimal Reproducible Example Minimal reproducible branch with ros2 launch depthai_ros_driver camera.launch.py using the default generated calibration file by camera_calibration.

Expected behavior [ERROR 1689360746.952714966] [oak_container]: Component constructor threw an exception: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: 'i' (on_load_node() at ./src/component_manager.cpp:278)

Additional context It works with the calib_xxx.json file that is dumped by the example script

Question: For short term, is it possible to convert the calibrated rgb.yaml, left.yaml and right.yaml to the expected calib_xxx.json format?

Serafadam commented 11 months ago

Hi, camera.i_external_calibration_path works only with .json calibration files that are generated with Depthai calibration. To load ROS calibration (.yaml), you should use parameter for specific sensor, let's say left.i_calibration_file. As for converting between formats, it's on the roadmap, not sure on the exact ETA yet.

Serafadam commented 10 months ago

Closing due to inactivity, please reopen if there are still questions.