Bug in ZedCamera package code

I’m using Isaac SDK 2020.2.2.

Line 185-186 in sdk/packages/zed/ZedCamera.cpp:

// This should be set for ZedImuReader to read the Zed-M and ZED 2 IMU data
params.sensors_required = !get_enable_imu();

I think the !get_enabled_imu() here should be changed to get_enabled_imu() (without the not operator).

Currently, if I want to set the sensors_required to false, I need to set enable_imu to true in my config file, which is semantically incorrect.

You may be right. From StereoLabs’s documentation on InitParameters, it seems that sensors_required true means IMU data must be available (causes failure otherwise) and false means IMU data is “try to use” the IMU. It does not read here clearly for sure.

bool sensors_required

Force the motion sensors opening of the ZED 2 / ZED-M to open the camera.
default : false.
If set to false, the SDK will try to open and use the IMU (second USB device on USB2.0) and will open the camera successfully even if the sensors failed to open.
This can be used for example when using a USB3.0 only extension cable (some fiber extension for example).
This parameter only impacts the LIVE mode.
If set to true, the camera will fail to open if the sensors cannot be opened. This parameter should be used when the IMU data must be available, such as Object Detection module or when the gravity is needed.

@hemals Yeah, so I think sensors_required should be set to false by default. (The issue in line 186 causes sensors_required to be true by default in zed_camera sample app) I’m wondering if this issue will be fixed in the next release?

We’re looking to have this cleared up in the next release with a direct passthrough codelet parameter called sensors_required rather than trying to infer this from the enable_imu parameter.

1 Like

OK. Thanks a lot!