Query About Extracting GPS Location of Detected Objects Using ZED 2i and ZED Box

Hi Team,

I have been working on extracting the GPS location of detected objects using a ZED 2i camera, a ZED Box (Orin™ NX 16GB) with GPS, and a GNSS Multiband Antenna. While the ZED Box is yet to be delivered, I have started exploring the documentation to understand how to meet my requirements.

Here’s my doubt:
I understand that I can retrieve the distance between the camera and detected objects using the ZED camera. I also have the GPS location of the camera (from the ZED Box). My goal is to calculate the GPS location of the detected objects. To achieve this, which angle (in radians) should I consider? Specifically, should I account for a particular direction (e.g., North, South, or some angle in a 360-degree range)?

Since my setup involves mounting the camera on a moving vehicle, I also need to determine the best method for this calculation. Would you recommend using the point cloud or depth data for finding the distance?

Looking forward to your advice.

Best regards,
Karthik A

Hi @karthikreddy157,

I would recommend you take a look at our documentation and samples related to the integration of GNSS in the ZED SDK, in order to retrieve the global GNSS position of a camera with external GNSS input from the ZED Box.

Once you have ingested the GNSS data in the ZED SDK, please see this forum post that covers what you wish to accomplish: How to get GPS coordinates (WGS84) of detected object - #8 by mattrouss

Hi @mattrouss,

Thank you for your reply.

As you suggested, I went through the documentation, and based on my understanding, I modified the custom detector code to achieve the GPS location of detected objects. However, the output is not as expected. Could you please review the code and let me know what might be causing the issue?

detector.py (11.4 KB)
Looking forward to your guidance.

Best regards,
Karthik.A

Here’s a revised version of your query with improved grammar and clarity:


Hi @mattrouss,

Thank you for your reply.

As you suggested, I went through the documentation, and based on my understanding, I modified the custom detector code to achieve the GPS location of detected objects. However, the output is not as expected. Could you please review the code and let me know what might be causing the issue?

detector.py (11.4 KB)
Looking forward to your guidance.

Best regards,
Karthik.A

[Discourse post]

Hi @karthikreddy157,

You are missing the call to fusion.process() which is the method that performs the camera VIO and GNSS fusion: zed-sdk/global localization/playback/python/playback.py at master · stereolabs/zed-sdk · GitHub