stereolabs/zed-sdk

`Camera.getSensorsData` returns invalid data in `SensorsData`

sgorsh opened this issue · 3 comments

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

I tested SDK tutorial 7, and I get invalid data from the sensors.
On this line:

if (ts.isNew(sensors_data.imu)) {

sensors_data looks like this:
image

Barometer timestamp looks OK (current timestamp starts with 0x17D46), other timestamps and numbers looks invalid. Booleans are also incorrect (> 1).

Sensors are working OK in ZED Sensor Viewer.

Steps to Reproduce

  1. Run tutorial example 7: https://github.com/stereolabs/zed-sdk/tree/master/tutorials/tutorial%207%20-%20sensor%20data/cpp
  2. Use Windows 10, VS 2022 and latest SDK 4.1.2
  3. Check returned data in SensorsData

Expected Result

Correct data and timestamps returned by getSensorsData

Actual Result

Incorrect data and timestamps returned by getSensorsData

ZED Camera model

ZED2i

Environment

OS: Windows 10 22H2
Visual Studio 2022 17.9.2, target: x64 debug
CMake 3.29.3
CUDA: v12.1
ZED SDK: v4.1.2

Anything else?

Might be related to #567

I suspect offsets or struct padding inside SensorsData in Camera.hpp are incorrect or getSensorsData writes to invalid offsets. If whole struct is dumped, I can see 3 valid timestamps inside:

00007FF72826F701
>17D461C831AD56C8<
BD3BBC7247BDFE86
00007FF741296AA5
0000025C05D21030
0000000000000004
00007FF72812EB01
>17D461C8332B49B0<
3FE80000BFA00000
BEF4A60EBEE00000
3EC553BB3F451360
00000000425205B0
4121D31A3F7C1089
00000086696FE701
>17D461C833A55250<
BCDC301D3F7FE84B
369260003A84EC00
3F7FE6823CDC1EA9
BA1EB86A3BF51AF6
BBF41FACBA9F38EA
37CAF8003F7FFE23
0000000000000000
3F80000000000000
0000000000000000
0000000000000000
B0A351DC3377B30C
B0A351DCAECE79DC
B0063842337AE753
B0063843AECE79DE
00007FF7337885BD
0000000000000000
0000000000000000
BB833DC0BEEF18E7
BE610EE73E93E78D
BD942889C11CEF45
3D7A0000BF3B8000
BE4695AD3EABE000
3E4695ADC11A6A9B
00000000361D9204
0000000000000000
0000000036073880
0000000000000000
00000000360AD5C1
0000000000000000
0000000000000000

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days

Any update about this?

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days