luxonis / depthai-ros-examples

MIT License
41 stars 45 forks source link

[yolov4_publisher.launch] Depth image size and camera info don't match #18

Closed h-wata closed 2 years ago

h-wata commented 2 years ago

Thanks for the great product.

When I run yolov4_publisher.launch and try to see DepthCloud in rviz, I get the following error.

Message
Error updating depth cloud: Depth image size and camera info don't match: 640 x 400 vs 1280 x 720(binning: 1 x 1, ROI size: 1280 x 720)

image

Hardware: OAK-D

If you modify the following part to THE_720_P instead of THE_400_P, DepthCloud will be output without problems.

https://github.com/luxonis/depthai-ros-examples/blob/e9f2fd604f0cee291e30152be57fc7283f6f12c8/depthai_examples/ros1_src/yolov4_spatial_publisher.cpp#L54-L56

image

May I send a PR?

themarpe commented 2 years ago

Hi @h-wata Thanks for noticing this - yes please do. @saching13 might chime in as to how best handle different models in examples (arg to example maybe?)