Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcement: ouster sdk 0.10.0 breaking changes! #564

Open
twslankard opened this issue Oct 30, 2023 · 2 comments
Open

Announcement: ouster sdk 0.10.0 breaking changes! #564

twslankard opened this issue Oct 30, 2023 · 2 comments
Assignees

Comments

@twslankard
Copy link
Collaborator

twslankard commented Oct 30, 2023

We're ready to release 0.10.0! Please see the PR that contains an updated CHANGELOG.

Best Regards,
Tom

Staff Engineer
Ouster Inc.

@twslankard twslankard pinned this issue Oct 30, 2023
@twslankard twslankard self-assigned this Nov 1, 2023
@KamilJeziorski-TomTom
Copy link

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?

@matt-attack
Copy link

matt-attack commented Nov 9, 2024

Hi,

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:

#pragma pack(1)
struct Pixel {
  uint32_t range;
  uint8_t reflectivity;
  uint8_t padding;
  uint16_t signal;
  uint16_t nir;// aka ambient
  uint16_t padding2;
};

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

No branches or pull requests

3 participants