# ZED SDK depth\_maximum\_distance works weird with REFERENCE\_FRAME::WORLD

**URL:** <https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710>\
**Category:** Software\
**Tags:** sdk\
**Created:** [September 10, 2026, 7:00pm UTC](https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710 "2026-09-10T19:00:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozone](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/o/e95f7d/32.png) [@Ozone](https://community.stereolabs.com/u/Ozone)\
**Post date:** [September 10, 2026, 7:00pm UTC](https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710/1 "2026-09-10T19:00:22Z")

</div>

Hi ZED Team,

If using REFERENCE\_FRAME::world to grab the point cloud with a depth\_maximum\_distance set to for example 100, when the camera travels 50 meters the max distance it will see along it’s travelling vector is 50 meters. I’m having an issue where the object the camera is mounted to is travelling 100s if meters so I get no points in my point cloud once the object travels far!

I don’t think this is intended behaviour, to me a depth maximum distance implies distance from the camera, NOT from the origin regardless of where the camera travels

---

<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 11, 2026, 8:12am UTC](https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710/2 "2026-09-11T08:12:40Z")

</div>

Hi @Ozone  
thank you for reporting this weird behavior.

I forwarded the details to the ZED SDK team to fix it with one of the next patch releases.

---

<div class="post-metadata">

**Author:** ![Ozone](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/o/e95f7d/32.png) [@Ozone](https://community.stereolabs.com/u/Ozone)\
**Post date:** [September 11, 2026, 1:24pm UTC](https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710/3 "2026-09-11T13:24:36Z")

</div>

Thanks for the quick response!

Could I also request that the team adds a “REFERENCE\_FRAME::GRAVITY\_ALIGNED” mode when grabbing the point cloud? As is when I use REFERENCE\_FRAME::WORLD, I need to retranslate all my points back to the origin and twist it to look a constant direction as my algorithms are tuned best around the origin. Though this currently doesn’t work due to the issue above.

I can use REFERENCE\_FRAME::Camera, then rotate my points to be gravity aligned myself. However this doesn’t work when the tracking is disabled or visual tracking is unable to track itself for whatever reason (This can be an issue for my application due to dust and other factors) and AFAIK I cannot directly grab the gravity vector from the sensor. I can see that the initial angle of the sensor is defaulted to be gravity aligned, but once it rotates that initial world rotation is no longer gravity aligned and it won’t update when the tracking isn’t working.

---

<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:** [October 27, 2026, 4:21pm UTC](https://community.stereolabs.com/t/zed-sdk-depth-maximum-distance-works-weird-with-reference-frame-world/11710/4 "2026-10-27T16:21:14Z")

</div>

Hi @Ozone,  
thank you for the suggestion; I added it to the list of feature requests for the ZED SDK team.

> [@Ozone](#):
>
> AFAIK I cannot directly grab the gravity vector from the sensor.

You can retrieve a gravity-aligned orientation directly from the camera IMU, independently of the Positional Tracking module, so it keeps working even when tracking is disabled or visual tracking is lost because of dust.  
After calling `getSensorsData`, the [`SensorsData::IMUData::pose`](https://www.stereolabs.com/docs/api/structsl_1_1SensorsData_1_1IMUData.html) field provides the orientation estimated by the internal accelerometer and gyroscope fusion; roll and pitch are referred to the gravity vector, so you can use this rotation to align the point cloud retrieved with `REFERENCE_FRAME::CAMERA`.  
If you prefer to estimate gravity yourself, the `linear_acceleration` field contains the calibrated accelerometer data, gravity included; note that this raw value is not available when using SVO or streaming input.

You can find more details in the [Sensors API documentation](https://docs.stereolabs.com/docs/development/zed-sdk/modules/sensors/using-the-api#getting-sensors-data); remember to use `TIME_REFERENCE::IMAGE` to get the IMU data synchronized with the point cloud.
