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

Boxes3DVisualizer does not account for rotations when computing bounding boxes #6973

Closed
kpreid opened this issue Jul 23, 2024 · 2 comments · Fixed by #7029
Closed

Boxes3DVisualizer does not account for rotations when computing bounding boxes #6973

kpreid opened this issue Jul 23, 2024 · 2 comments · Fixed by #7029
Assignees
Labels
🪳 bug Something isn't working heuristics Heuristics for placing views, fallback provider, etc. 📺 re_viewer affects re_viewer itself

Comments

@kpreid
Copy link
Collaborator

kpreid commented Jul 23, 2024

Describe the bug

The visualizer ignores the rotations component when computing the bounding box of the batch of boxes.

let centers = clamped_or(data.centers, &Position3D::ZERO);
let rotations = clamped_or(data.rotations, &Rotation3D::IDENTITY);
for (i, (half_size, &center, rotation, radius, &color)) in
itertools::izip!(data.half_sizes, centers, rotations, radii, &colors).enumerate()
{
obj_space_bounding_box.extend(half_size.box_min(center));
obj_space_bounding_box.extend(half_size.box_max(center));

To Reproduce

  1. Open an example with rotated boxes, such as cargo run --bin snippets -- box3d_batch
  2. Click on “Show bounding box”
  3. Observe the boxes escaping the box.

Screenshots

Rerun version
Commit 05853c6

@kpreid kpreid added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself 👀 needs triage This issue needs to be triaged by the Rerun team labels Jul 23, 2024
@teh-cmc teh-cmc added heuristics Heuristics for placing views, fallback provider, etc. and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Jul 24, 2024
@Wumpf Wumpf self-assigned this Jul 24, 2024
@Wumpf
Copy link
Member

Wumpf commented Jul 24, 2024

Good find!
Taking this over - rotation is going to be removed as part of #6831 but we then need to make sure that the new transform / out of tree transform is handling the bbox correctly

@kpreid
Copy link
Collaborator Author

kpreid commented Jul 24, 2024

I believe I fixed this bug as a drive-by in #6953 (since it was simpler than deliberately keeping the bug in place). Sorry for not mentioning that more precisely — but it sounds like you want to use this to track checking on the next implementation, so I won't just hit the close button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working heuristics Heuristics for placing views, fallback provider, etc. 📺 re_viewer affects re_viewer itself
Projects
None yet
3 participants