Skip to content

Commit

Permalink
Export lifts to nav graphs (#478)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey authored Oct 10, 2023
1 parent a7a4e43 commit b418069
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rmf_building_map_tools/building_map/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def generate_nav_graphs(self):
g = {}
g['building_name'] = self.name
g['levels'] = {}
g['lifts'] = {}

if self.coordinate_system == CoordinateSystem.web_mercator:
g['crs_name'] = self.global_transform.crs_name
Expand All @@ -372,6 +373,11 @@ def generate_nav_graphs(self):
g['levels'][level_name] = level_graph
if level_graph['lanes']:
empty = False
for lift_name, lift in self.lifts.items():
g['lifts'][lift_name] = {
'position': [lift.x, lift.y, lift.yaw],
'dims': [lift.width, lift.depth]
}
if not empty:
nav_graphs[f'{i}'] = g
return nav_graphs
Expand Down

0 comments on commit b418069

Please sign in to comment.