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

Also exclude samples with Inf or NaN distance #23

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

kawk
Copy link
Contributor

@kawk kawk commented Jan 3, 2025

After #18 the conversion of real world R2300 LaserScan to PointCloud sometimes fails, reporting malloc(): invalid size (unsorted). This update shall fix that.

@kawk
Copy link
Contributor Author

kawk commented Jan 3, 2025

The fix/nan-to-pointcloud is a quick fix but probably needs a bit more investigation as I'm not yet a point cloud expert. Now that invalid values always come as NaN or Inf, is range checking still needed? Does this check have to match some other implementation in TF code exactly?

@kawk
Copy link
Contributor Author

kawk commented Jan 3, 2025

@kawk
Copy link
Contributor Author

kawk commented Jan 6, 2025

The loop in PointcloudPublisher::project_laser checks validity of points subtly different than laser_geometry::projectLaser_, mishandling NaN and Inf. Instead of acting on a point if it is inside the allowed range, it skips points where either (range<range_min)=true or (range>=range_max)=true ... but neither of these would be "true" with range==NaN because comparison to NaN usually yields false.

@kawk
Copy link
Contributor Author

kawk commented Jan 6, 2025

This fixes #24 - please pull.

@JnsHndr JnsHndr merged commit a42cf78 into PepperlFuchs:main Jan 10, 2025
6 checks passed
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