# Get 3D Coordinate from Depth Zed Ros2 Wrapper

**URL:** <https://community.stereolabs.com/t/get-3d-coordinate-from-depth-zed-ros2-wrapper/7101>\
**Category:** Python\
**Tags:** linux, python, ros, depth\
**Created:** [September 23, 2024, 8:30am UTC](https://community.stereolabs.com/t/get-3d-coordinate-from-depth-zed-ros2-wrapper/7101 "2024-09-23T08:30:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajrillah](https://community.stereolabs.com/user_avatar/community.stereolabs.com/ajrillah/32/3542_2.png) [@ajrillah](https://community.stereolabs.com/u/ajrillah)\
**Post date:** [September 23, 2024, 8:30am UTC](https://community.stereolabs.com/t/get-3d-coordinate-from-depth-zed-ros2-wrapper/7101/1 "2024-09-23T08:30:39Z")

</div>

I have a problem finding the position of a 3D object. I’ve tried taking an image from topic ~/left/image\_rect\_color, then detecting the object using yolov8 and looking for the center point of the bbox. then once I know the pixel coordinates, I take the depth in topic ~/depth/depth\_registered, based on those coordinates and get the position of the 3d object. however I don’t get accurate 3d coordinates. I tried to display the pointcloud in rviz from the zed ros2 wrapper and display the 3d object detection results but the object position does not match the pointcloud.

Do I need to calibrate or something? My current code just takes a picture of the topic, then does detection, gets pixel coordinates, and looks for the 3D position using topic depth.

did I miss something? do I need to process the right and left images first and then find the pixel coordinates? or something else?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [September 23, 2024, 9:08am UTC](https://community.stereolabs.com/t/get-3d-coordinate-from-depth-zed-ros2-wrapper/7101/2 "2024-09-23T09:08:20Z")

</div>

Hi @ajrillah  
Welcome to the [Stereolabs](https://www.stereolabs.com/) community

The information stored on [this support page](https://support.stereolabs.com/hc/en-us/articles/4554115218711-How-can-I-convert-3D-world-coordinates-to-2D-image-coordinates-and-viceversa) can help you.
