You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to adopt code which was originally written based on ouster sdk 0.9.0 for latest 0.13.0.
The code looks as follows:
for (int i = 0; i < sensorInfo.format.columns_per_packet; i++) {
auto col_buf = packetFormat->nth_col(i, reinterpret_cast<const unsigned char*>(buffer));
for (unsigned int u = 0; u < sensorInfo.format.pixels_per_column; u++) {
auto r = packetFormat->px_range(packetFormat->nth_px(u, col_buf));
auto reflectivity = packetFormat->px_reflectivity(packetFormat->nth_px(u, col_buf));
auto nir = packetFormat->px_ambient(packetFormat->nth_px(u, col_buf));
auto signal = packetFormat->px_signal(packetFormat->nth_px(u, col_buf));
<....>
}
}
SDK 0.10.0 introduces braking change by removing px_* accessors, and I'm struggling to find a repplacement to access channes per pixel. Can you please suggest a solution?
There's really no direct replacement. The APIs have largely moved to using the ScanBatcher and using LidarScans instead to access that data scan by scan rather than accessing it packet by packet.
If you are working with a specific packet format, it would be quite straightforward to decode that pixel manually given the pointer to it from packetFormat->nth_px(u, col_buf). For instance a pixel in the RNG19_RFL8_SIG16_NIR16 format is represented by this struct:
We're ready to release 0.10.0! Please see the PR that contains an updated CHANGELOG.
Best Regards,
Tom
Staff Engineer
Ouster Inc.
The text was updated successfully, but these errors were encountered: