Skip to content

Handle empty ROS2 camera frame_id without panicking#12719

Open
Woodii1998 wants to merge 1 commit intorerun-io:mainfrom
Woodii1998:fix/tf
Open

Handle empty ROS2 camera frame_id without panicking#12719
Woodii1998 wants to merge 1 commit intorerun-io:mainfrom
Woodii1998:fix/tf

Conversation

@Woodii1998
Copy link
Copy Markdown
Contributor

@Woodii1998 Woodii1998 commented Apr 2, 2026

Related

Closes #12718

What

Empty header.frame_id in ROS2 camera messages caused a TransformForest panic due to self-referential pinhole topology. At the MCAP parser level, empty frame IDs now trigger a graceful downgrade: CameraInfo import is skipped entirely, while Image and CompressedImage fall back to plain 2D import without spatial metadata. As a defense-in-depth measure, TransformForest now also ignores self-referential pinhole projections instead of panicking.

@MichaelGrupp
Copy link
Copy Markdown
Member

MichaelGrupp commented Apr 2, 2026

I think this should be handled on re_tf level instead of MCAP workarounds. An empty string can also come from elsewhere (ping @Wumpf: let me know if you agree). I'm a bit surprised that we are panicking, need to reproduce this myself (next week). Last time I looked into empty frame IDs was for 0e66bc0

@oxkitsune
Copy link
Copy Markdown
Member

Related: There's #12663 that also solves this on the TF level

@Woodii1998
Copy link
Copy Markdown
Contributor Author

I think this should be handled on re_tf level instead of MCAP workarounds. An empty string can also come from elsewhere (ping @Wumpf: let me know if you agree). I'm a bit surprised that we are panicking, need to reproduce this myself (next week). Last time I looked into empty frame IDs was for 0e66bc0

I agree with handling this in re_tf so that empty frame ids can never panic the transform system, regardless of the source.

But I think #12663 goes a bit too far: it does not just make the system robust, it reinterprets empty frame ids as implicit/entity-derived frames. That changes the meaning of the data.

For example, if a camera topic has frame_id = "", I would rather treat that as missing spatial metadata and degrade it to plain 2D import. Under #12663, it instead starts behaving like a valid implicit frame, which hides the fact that the original frame metadata was missing.

So my preference would be:

re_tf handles robustness globally;
importers keep schema-specific fallback behavior where missing frame metadata has a well-defined meaning.

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.

MCAP: empty ROS2 camera frame_id causes TransformForest panic instead of falling back to 2D image import

3 participants