# Orientation lectures

**URL:** <https://community.stereolabs.com/t/orientation-lectures/10248>\
**Category:** Python\
**Tags:** depth\
**Created:** [October 29, 2025, 10:43am UTC](https://community.stereolabs.com/t/orientation-lectures/10248 "2025-10-29T10:43:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CristianViSa](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/c/85e7bf/32.png) [@CristianViSa](https://community.stereolabs.com/u/CristianViSa)\
**Post date:** [October 29, 2025, 10:43am UTC](https://community.stereolabs.com/t/orientation-lectures/10248/1 "2025-10-29T10:43:26Z")

</div>

Hi,

This is like the 3rd or 4th post I open about this topic, and still not finding the problem.

> [@Rotation angles for the point cloud](https://community.stereolabs.com/t/rotation-angles-for-the-point-cloud/4768/6):
>
> The default coordinate frame in the SDK is COORDINATE\_SYSTEM\_IMAGE, which corresponds to a right-handed-y-down coordinate frame. As ZED\_Sensor\_Viewer displays the coordinates in IMAGE, this corresponds with the difference in signs that you are experiencing.

> [@Error in Tracking State](https://community.stereolabs.com/t/error-in-tracking-state/9346/23):
>
> Hi @CristianViSa ZED\_Depth\_Viewer uses the raw IMU sensor data to orient the point cloud in the viewer correctly. You can retrieve it with this method [getSensorsData()](https://www.stereolabs.com/docs/api/classsl_1_1Camera.html#af67fb040d2dd3bd65baada2cb743abe9), without enabling the positional tracking. Please let us know if this helps your use case.

> [@Slope in downhills](https://community.stereolabs.com/t/slope-in-downhills/6372/7):
>
> Hi @CristianViSa, I see that you set the set\_gravity\_as\_origin to false in your sample, have you tried with it set to true? As the floor plane estimation may change for each camera startup, having the gravity as origin may return a more robust world rotation and give you a better slope angle.

I am trying to measue slopes with a ZED 2i, to do that i mount that on a e-scooter with a FIXED POSITION (which is facing the floor in 20º, the imu lectures are X:-20º Y:0 Z:0 while measuring them on a flat surface).  
So, to properly obtain values in the point cloud I need to correct this initial inclination. Also, we have the IMU lectures at every frame, but i just notice they are just a nonsense, with your last update i can see the Zed Sensor Viewer SVO playback and i just notice this.

I recorded a video at a known slope. What I did was measure the slope, walk around the block, and return to the exact starting point. And i just dont understand this measurements.

At t=0 in this point i obtain this values:

X=167 Y=148 Z=.25º

 ![imagen](https://community.stereolabs.com/uploads/default/original/2X/a/ae9a30370e6717c3da211c87660e93d8f25fecc3.jpeg)

Then at t=1 i obtain these ones:

 ![imagen](https://community.stereolabs.com/uploads/default/original/2X/2/2948ae69a65ebdfdc733a14135579ff4ae504d9f.jpeg)

X=144 Y=130 Z=-47,8

I can undestand the difference in Y and Z axis, but the X AXIS? How is this possible? There is a difference of 23º in THE SAME EXACT POSITION.

This is the first problem, how can the values be so different in the same position at different times?

The second question is, i am using this python code to extract to laz that “oriented” pointclouds.

[main.py](https://community.stereolabs.com/uploads/short-url/gB603naZ8NDFdySTlH6BKXajGcg.py) (10.7 KB)

At frame 1312 (t=0 previously mentioned) i obtain this values

 ![image (32)](https://community.stereolabs.com/uploads/default/original/2X/2/23a28b4127c79c7d44393a9aeddd00c7d6923ef8.png)

At frame 2515 (t=1 previously mentioned) i obtained this others

 ![image (33)](https://community.stereolabs.com/uploads/default/original/2X/0/0d9b228f4ff6cca1a9e6fff8c635556600c3b8d4.png)

Note a 8cm difference in the height. know that the points may not be exactly the same, that the cloud has a possible error and so on, but at such short distances (1 to 3 metres) and in something so clear, it seems to me that the difference in height is too great, which also means a difference of 3% more slope. I think there is something strange here.

Here is a OneDrive with the frames isolated on different svo2 and even their laz files.

[Stereolabs](https://inmaproco-my.sharepoint.com/:f:/g/personal/cvs_decodeingenieria_com/Eq5G_cDQ6wpBkEYOtJrbSi4BQURn4BCKab5CzoN8FL-LGw?e=Dz14cB)

What am i doing wrong? How is this possible?

See also the euler angles at those frames, they are so differente

Frame 1312 CAMERA euler (deg)=(-8.605,2.378,-5.893)

Frame 2515 CAMERA euler (deg)=(-2.179,1.123,-2.304)

---

<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:** [November 5, 2025, 3:27pm UTC](https://community.stereolabs.com/t/orientation-lectures/10248/2 "2025-11-05T15:27:36Z")

</div>

Hi @CristianViSa

There seems to be an issue with your comprehension of the Euler angle.  
In the `getEulerAgles()` function, we apply the Y, Z, X rotation in this order.  
With these high values on the other axis, you cannot compare the X angles difference alone because you apply the other axis before the X.

On the two images you linked, it is not the “THE SAME EXACT POSITION”. There is a big yaw difference, and the tilt looks like it changed a bit.  
Your conclusion is wrong because of the way the Euler angles apply.

> [@CristianViSa](#):
>
> I can undestand the difference in Y and Z axis, but the X AXIS? How is this possible? There is a difference of 23º in THE SAME EXACT POSITION.

It’s not the same frame.

We tried to apply “your angles” to a placeholder gravity in the image frame. There is no component linked to an X tilt; the two other axes are too different.

A better way to compare the angles could be to convert them to quaternions.
