Skip to content

Commit

Permalink
Add notes about lift axis changes
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey committed Jul 26, 2023
1 parent 9172f86 commit 7ce3774
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions rmf_site_format/src/legacy/lift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ impl Lift {
// TODO(MXG): Rewrite this with glam now that we've accepted it as a dependency
let x = self.x as f32;
let y = self.y as f32;
// NOTE: Coordinate axes changed between the legacy format and the
// new format. Width used to be along the local x axis, and depth
// used to be along the local y axis, but now that is flipped to
// better align with the robotics convention of the local x axis
// being forward/backward while the local y axis is the lateral
// direction (side-to-side).
let d = self.width as f32 / 2.0;
let w = self.depth as f32 / 2.0;
let theta = self.yaw as f32;
Expand Down Expand Up @@ -95,6 +101,12 @@ impl Lift {

let dx = door.x as f32;
let dy = door.y as f32;
// NOTE: Coordinate axes changed between the legacy format and the
// new format. Width used to be along the local x axis, and depth
// used to be along the local y axis, but now that is flipped to
// better align with the robotics convention of the local x axis
// being forward/backward while the local y axis is the lateral
// direction (side-to-side).
let half_width = self.depth as f32 / 2.0;
let half_depth = self.width as f32 / 2.0;

Expand Down Expand Up @@ -208,6 +220,12 @@ impl Lift {
}
}

// NOTE: Coordinate axes changed between the legacy format and the
// new format. Width used to be along the local x axis, and depth
// used to be along the local y axis, but now that is flipped to
// better align with the robotics convention of the local x axis
// being forward/backward while the local y axis is the lateral
// direction (side-to-side).
let width = self.depth as f32;
let depth = self.width as f32;
let cabin = RectangularLiftCabin {
Expand Down

0 comments on commit 7ce3774

Please sign in to comment.