Strange measure in orientation raw data

Hi,
I’m getting raw data from my ZED2i camera and I noticed something strange. When I turn it of 90° I correctly see this change in ZED Sensor Viewer tool, but when I plot raw data, on degrees-axis it says 0.7 instead of 90°. In radian it might be π/2 that’s about 1.7, so it’s not radiant measure.

The code I’m using to get these data is:

sensors_data = sl.SensorsData()
while True:
    if zed.get_sensors_data(sensors_data, sl.TIME_REFERENCE.CURRENT) == sl.ERROR_CODE.SUCCESS:
        imu_data = sensors_data.get_imu_data()
        if ts_handler.is_new(imu_data):
            imu_or = imu_data.get_pose().get_orientation().get()
            orX = imu_or[0]
            orY = imu_or[1]
            orZ = imu_or[2]

I can’t understand why 0.7 correspond to 90° and what kind of measure is this.

Thank you,
Paolo

image

Hi Paolo,
this plot had “degrees” on the vertical axis, so 0.7° seems more of an error offset than a 90° rotation.
How did you obtain it?

Best regards

Walter

Walter Lucetti
Senior Developer
SDK / Robotics / HW
Stereolabs Support

I modified the post adding some notes Strange measure in orientation raw data - Software / Python - Stereolabs Communityhttps://community.stereolabs.com/t/strange-measure-in-orientation-raw-data/2678.

I resolved the issue by using another function: get_euler_angles(radian=False).

Anyway, if you can explain me what “imu_or = imu_data.get_pose().get_orientation().get()” returns would be really useful for me.

Thank you,
Paolo


Da: Walter Lucetti (Stereolabs) support@stereolabs.com
Inviato: venerdì 26 maggio 2023 14:44
A: Paolo Ceroni - paolo.ceroni5@studio.unibo.it paolo.ceroni5@studio.unibo.it
Oggetto: Re: Strange measure in orientation raw data

Hi Paolo,
the getOrientation().get() returns the orientation in quaternion array format:
https://www.stereolabs.com/docs/api/classsl_1_1Orientation.html

Best regards

Walter

Walter Lucetti
Senior Developer
SDK / Robotics / HW
Stereolabs Support