From 38ec6a83e5d91b47f5276c57bc9a2d92f7fef2ce Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Mon, 20 Jan 2025 14:40:04 +0800 Subject: [PATCH] Support robot types with organization namespaces (#521) Signed-off-by: Luca Della Vedova --- rmf_building_map_tools/building_map/level.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rmf_building_map_tools/building_map/level.py b/rmf_building_map_tools/building_map/level.py index 71b00b6a..d76f7144 100644 --- a/rmf_building_map_tools/building_map/level.py +++ b/rmf_building_map_tools/building_map/level.py @@ -287,6 +287,12 @@ def generate_robot_at_vertex_idx(self, vertex_idx, world_ele): robot_name = vertex.params['spawn_robot_name'].value print(f'spawning robot name {robot_name} of type {robot_type}') + # remove Open-RMF namespace, if present + if '/' in robot_type: + segments = robot_type.split('/') + if segments[0].lower() == 'open-rmf': + robot_type = "/".join(segments[1:]) + yaw = 0 # find the first vertex connected by a lane to this vertex for lane in self.lanes: