Skip to content

Commit

Permalink
Fix fiducial and location transforms
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
  • Loading branch information
mxgrey committed Aug 10, 2023
1 parent aa44f41 commit 3bd5657
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions rmf_site_editor/src/interaction/popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ pub fn add_popups(
) {
for e in &new_poppers {
commands.entity(e).insert(Popup {
regular: LOCATION_LAYER_HEIGHT,
hovered: LOCATION_LAYER_HEIGHT + HOVERED_LANE_OFFSET,
selected: LOCATION_LAYER_HEIGHT + SELECTED_LANE_OFFSET,
regular: 0.,
hovered: HOVERED_LANE_OFFSET,
selected: SELECTED_LANE_OFFSET,
});
}
}
Expand Down
8 changes: 6 additions & 2 deletions rmf_site_editor/src/site/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,19 @@ impl FromWorld for SiteAssets {
let location_mesh = meshes.add(
Mesh::from(
make_icon_halo(1.1 * LANE_WIDTH / 2.0, 0.01, 6)
.transform_by(Affine3A::from_translation(0.00125 * Vec3::Z)),
.transform_by(Affine3A::from_translation(
(0.00125 + LOCATION_LAYER_HEIGHT) * Vec3::Z)
),
)
.with_generated_outline_normals()
.unwrap(),
);
let fiducial_mesh = meshes.add(
Mesh::from(
make_icon_halo(1.1 * LANE_WIDTH / 2.0, 0.01, 4)
.transform_by(Affine3A::from_translation(0.00125 * Vec3::Z)),
.transform_by(Affine3A::from_translation(
(0.00125 + LOCATION_LAYER_HEIGHT) * Vec3::Z)
),
)
.with_generated_outline_normals()
.unwrap(),
Expand Down
3 changes: 1 addition & 2 deletions rmf_site_editor/src/site/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ pub fn add_location_visuals(

let position = anchors
.point_in_parent_frame_of(point.0, Category::Location, e)
.unwrap()
+ LOCATION_LAYER_HEIGHT * Vec3::Z;
.unwrap();
// TODO(MXG): Put icons on the different visual squares based on the location tags
commands
.entity(e)
Expand Down

0 comments on commit 3bd5657

Please sign in to comment.