Skip to content

Commit

Permalink
bugfix: specify coordiate_system when generating yaml for lift. (open…
Browse files Browse the repository at this point in the history
…-rmf#488)

Signed-off-by: Charly Wu <[email protected]>
Co-authored-by: Yadu <[email protected]>
Co-authored-by: Luca Della Vedova <[email protected]>
  • Loading branch information
3 people authored Mar 26, 2024
1 parent 88c069b commit a83d0e8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions rmf_building_map_tools/building_map/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,18 @@ def generate_sdf_world(self, options):
lift.generate_cabin(world, options)

charger_waypoints_ele = SubElement(
world,
'rmf_charger_waypoints',
{'name': 'charger_waypoints'})
world,
'rmf_charger_waypoints',
{'name': 'charger_waypoints'})

for level_name, level in self.levels.items():
for vertex in level.transformed_vertices:
if 'is_charger' in vertex.params:
SubElement(
charger_waypoints_ele,
'rmf_vertex',
{'name': vertex.name, 'x': str(vertex.x),
'y': str(vertex.y), 'level': level_name})
charger_waypoints_ele,
'rmf_vertex',
{'name': vertex.name, 'x': str(vertex.x),
'y': str(vertex.y), 'level': level_name})

if self.coordinate_system == CoordinateSystem.web_mercator:
(tx, ty) = self.global_transform.x, self.global_transform.y
Expand Down Expand Up @@ -726,7 +726,8 @@ def write_yaml_file(self, filename):

d['lifts'] = {}
for lift_name, lift in self.lifts.items():
d['lifts'][lift_name] = lift.to_yaml()
d['lifts'][lift_name] = lift.to_yaml(
self.coordinate_system)

yaml.dump(d, f)

Expand Down

0 comments on commit a83d0e8

Please sign in to comment.