Skip to content

Conversation

grtlr
Copy link
Contributor

@grtlr grtlr commented Sep 12, 2025

What

This extracts additional values that are associated with points in the PointCloud2 ROS2 messages. The fields will be added to the Points3d archetype as partially tagged.

Screenshot

image

Test

We can use autoware_all_sensors.mcap to test.

@grtlr grtlr added feat-mcap Everything related to the MCAP loader enhancement New feature or request labels Sep 12, 2025
Copy link

github-actions bot commented Sep 12, 2025

Web viewer built successfully.

Result Commit Link Manifest
09a115b https://rerun.io/viewer/pr/11193 +nightly +main

Note: This comment is updated whenever you push a commit.

@grtlr grtlr requested a review from oxkitsune September 12, 2025 09:48
@grtlr grtlr marked this pull request as ready for review September 12, 2025 09:48
@grtlr grtlr force-pushed the grtlr/point-cloud2-intensity branch 2 times, most recently from 3906144 to 039b4f4 Compare September 12, 2025 09:51
@grtlr grtlr added the exclude from changelog PRs with this won't show up in CHANGELOG.md label Sep 12, 2025
@grtlr grtlr changed the title Extract fields from ROS2 PointCloud2 messages for Points3D Extract extra fields from ROS2 PointCloud2 messages Sep 12, 2025
Copy link
Member

@oxkitsune oxkitsune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@grtlr
Copy link
Contributor Author

grtlr commented Sep 12, 2025

Thank you @oxkitsune and @emilk for the feedback.

I've addressed your comments if you want to take another look.

Comment on lines 128 to 131
match value {
// Not part of the MCAP spec
// // https://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/PointField.html
PointFieldDatatype::Unknown => unreachable!(),
Copy link
Member

@emilk emilk Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still sounds like you can create an MCAP file (that is not spec compliant) that can crash the Rerun viewer.

For instance: a new MCAP spec is released with a PointFieldDatatype::Int128, and the old parser will map that to Unknown and Rerun crashes. NOT GOOD.

Instead: return an error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loader runs in a separate thread that is specific to that MCAP file.

But overall I agree, we can't know in which context the loader will be running. I will add the error mechanism.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loader runs in a separate thread that is specific to that MCAP file

We compile with panic=abort, so a panic on any thread shuts down the whole process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL! I've made the required changes PR.

@grtlr grtlr force-pushed the grtlr/point-cloud2-intensity branch from 76ec0e0 to 7e4d534 Compare September 15, 2025 09:35
@grtlr grtlr requested a review from emilk September 15, 2025 09:36
grtlr and others added 5 commits September 15, 2025 15:27
almost working

more cleanup

merge race and lint
…ud_2.rs

Co-authored-by: Gijs de Jong <14833076+oxkitsune@users.noreply.github.com>
@grtlr grtlr force-pushed the grtlr/point-cloud2-intensity branch from 7e4d534 to ee40d84 Compare September 15, 2025 13:28
@grtlr grtlr merged commit 4c85450 into main Sep 15, 2025
39 of 40 checks passed
@grtlr grtlr deleted the grtlr/point-cloud2-intensity branch September 15, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exclude from changelog PRs with this won't show up in CHANGELOG.md feat-mcap Everything related to the MCAP loader
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants