Skip to content

OAK Internal Sync & DepthAI HF-Net Support#1193

Merged
matlabbe merged 8 commits intointrolab:masterfrom
borongyuan:oak-internal-sync
Mar 27, 2024
Merged

OAK Internal Sync & DepthAI HF-Net Support#1193
matlabbe merged 8 commits intointrolab:masterfrom
borongyuan:oak-internal-sync

Conversation

@borongyuan
Copy link
Copy Markdown
Contributor

All messages except IMU are synchronized using the Sync node introduced in v2.24.0. LGTM, but I'll keep this PR as a draft until the depthai in ROS repo is updated to 2.24.0. In addition, they have not added doc for Sync node yet, only providing new examples. We can do more inspections and tests during this time.
The IR settings have also been changed to new methods in v2.24.0.

@borongyuan
Copy link
Copy Markdown
Contributor Author

Since I have recently received several new OAK cameras equipped with BNO086, I presume they have stopped producing the ones equipped with BMI270. According to the document and datasheet, the accelerometer and gyroscope of the BNO086 cannot be set to the same sample rate.

  • Accelerometer: 15Hz, 31Hz, 62Hz, 125Hz, 250Hz 500Hz
  • Gyroscope: 25Hz, 33Hz, 50Hz, 100Hz, 200Hz, 400Hz
  • Magnetometer: 100Hz

I tested different configs. Either

imu->enableIMUSensor({dai::IMUSensor::ACCELEROMETER_RAW, dai::IMUSensor::GYROSCOPE_RAW}, 100);

or

imu->enableIMUSensor(dai::IMUSensor::ACCELEROMETER_RAW, 125);
imu->enableIMUSensor(dai::IMUSensor::GYROSCOPE_RAW, 100);

will cause the IMU data to be output at 100Hz. Part of the accelerometer data will be discarded directly to reduce to 100 Hz without linear interpolation. In this configuration, the VIO's robustness is affected and may begin to drift during sudden stops. This problem can be greatly avoided by setting the IMU output rate to 200 Hz. This can be compatible with both BMI270 and BNO086 devices. But it may not be the optimal configuration for both types of devices. BMI270 is actually unable to stably reach an output of 200 Hz, generally only 160Hz~180Hz. If we only consider supporting BNO086, we can actually

imu->enableIMUSensor({dai::IMUSensor::ACCELEROMETER_RAW, dai::IMUSensor::GYROSCOPE_RAW, dai::IMUSensor::ROTATION_VECTOR}, 200);

In this way, we directly use the orientation output of BNO086 that fuses 9-axis data, without using Madgwick filter or complementary filter later.

@borongyuan
Copy link
Copy Markdown
Contributor Author

Set sync threshold to half of the frame interval. This avoids incorrect sync between different cameras.

@borongyuan borongyuan force-pushed the oak-internal-sync branch 2 times, most recently from f0e4e89 to deb39af Compare February 19, 2024 03:50
@borongyuan borongyuan changed the title OAK Internal Sync OAK Internal Sync & DepthAI HF-Net Support Mar 1, 2024
@borongyuan
Copy link
Copy Markdown
Contributor Author

The depthai-core in the ROS repository is still at 2.23.0. I will remind them.

@matlabbe
Copy link
Copy Markdown
Member

matlabbe commented Mar 3, 2024

Ah yeah I didn't verify if the ros package was released with 0.24 (just assumed it since it is almost 3 months ago old), I created a label to quickly know that we are waiting for dependency update.

@matlabbe
Copy link
Copy Markdown
Member

depthai 2.24 binaries are out:

@matlabbe matlabbe merged commit bfeb487 into introlab:master Mar 27, 2024
@borongyuan borongyuan deleted the oak-internal-sync branch March 28, 2024 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants