Skip to content

Commit

Permalink
POC fix for legacy lifts
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <[email protected]>
  • Loading branch information
luca-della-vedova committed May 15, 2023
1 parent f796e44 commit 9172f86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rmf_site_format/src/legacy/lift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ 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;
let d = self.depth as f32 / 2.0;
let w = self.width as f32 / 2.0;
let d = self.width as f32 / 2.0;
let w = self.depth as f32 / 2.0;
let theta = self.yaw as f32;
let rotate = |x, y| {
(
Expand Down Expand Up @@ -95,8 +95,8 @@ impl Lift {

let dx = door.x as f32;
let dy = door.y as f32;
let half_width = self.width as f32 / 2.0;
let half_depth = self.depth as f32 / 2.0;
let half_width = self.depth as f32 / 2.0;
let half_depth = self.width as f32 / 2.0;

let cabin_face = if dx.abs() < 1e-3 {
// Very small x value means the door must be on the left or right face
Expand Down Expand Up @@ -208,8 +208,8 @@ impl Lift {
}
}

let width = self.width as f32;
let depth = self.depth as f32;
let width = self.depth as f32;
let depth = self.width as f32;
let cabin = RectangularLiftCabin {
width,
depth,
Expand Down

0 comments on commit 9172f86

Please sign in to comment.