Add level fiducials to reference drawing features #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug fix
Fixed bug
This PR fixes map alignment when importing legacy projects that include a list of features / constraints but no fiducials, a typical case is a building with only one level (hence no fiducials) but one or more robot maps (hence the sets of constraints and features).
Fix applied
Previously, no level anchors were spawned so the optimization ran during map alignment would also transform the reference drawing and find an average of all the drawings. With this PR, level anchors are spawned and added to the fiducials in the position where the reference drawing is. The result is that the reference drawing will be "sticky" and stay in its original position with only the imported robot layers being translated.
I had to increase the scope of the reference drawing site id which required wrapping it in an
Option
to handle the "no reference drawing" case. This added a few (safe) boilerplate unwraps.Before this PR:
Screencast.from.2023-08-17.10-54-01.webm
After this PR:
Screencast.from.2023-08-17.12-41-16.webm