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

Fix heuristic object properties being broken in some cases / fix DepthMeter being ignored sometimes #4679

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jan 4, 2024

What

The way we updated properties for auto-property values made it pretty much random (not literally, but feels as-if) when and when not we'd see updated EditableAutoValue::Auto values!

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself labels Jan 4, 2024
@Wumpf Wumpf changed the title Fix heuristic object properites being broken in some cases Fix heuristic object properties being broken in some cases Jan 4, 2024
@Wumpf Wumpf changed the title Fix heuristic object properties being broken in some cases Fix heuristic object properties being broken in some cases / fix DepthMeter being ignored sometimes Jan 4, 2024
@@ -186,7 +186,7 @@ fn update_depth_cloud_property_heuristics(
properties.backproject_radius_scale = EditableAutoValue::Auto(1.0);
}

entity_properties.update(ent_path.clone(), properties);
entity_properties.overwrite_properties(ent_path.clone(), properties);
Copy link
Member

Choose a reason for hiding this comment

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

This seems like the opposite of what we want. If an entity has both a depth heuristic and a pinhole heuristic, only one of these is going to end up being applied.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think that's true. Each time we first retrieve properties via entity_properties.get which will have the updated value. None of the things we set here overwrite each other directly

Copy link
Member

Choose a reason for hiding this comment

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

Ahh -- I needed to expand to see the context that this is a read-edit-write loop and not just a blind update. Still feels fragile, but as I've mentioned, hopefully this is all going away soon enough when we split properties into their own components.

@@ -186,7 +186,7 @@ fn update_depth_cloud_property_heuristics(
properties.backproject_radius_scale = EditableAutoValue::Auto(1.0);
}

entity_properties.update(ent_path.clone(), properties);
entity_properties.overwrite_properties(ent_path.clone(), properties);
Copy link
Member

Choose a reason for hiding this comment

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

Ahh -- I needed to expand to see the context that this is a read-edit-write loop and not just a blind update. Still feels fragile, but as I've mentioned, hopefully this is all going away soon enough when we split properties into their own components.

@Wumpf Wumpf merged commit 000a0ea into main Jan 5, 2024
40 of 46 checks passed
@Wumpf Wumpf deleted the andreas/fix-auto-heuristics-not-applied branch January 5, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working include in changelog 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DepthImage backprojection doesn't set up correctly if the same entity is used for camera and image
2 participants