@@ -30,22 +30,29 @@ def launch_setup(context):
3030 # =========================
3131 # ROBOT DESCRIPTION (URDF)
3232 # =========================
33- xacro_file = os .path .join (
34- package_dir ,
35- "models" ,
36- "vacuum_cleaner" ,
37- "vacuum_cleaner.urdf.xacro" ,
38- )
39-
40- robot_description_content = xacro .process_file (
41- xacro_file ,
42- mappings = {
43- "camera" : "true" if sensor == "camera" else "false" ,
44- "laser" : "true" if sensor == "laser" else "false" ,
45- },
46- ).toxml ()
33+ if sensor == "camera" :
34+ xacro_file = os .path .join (
35+ package_dir ,
36+ "models" ,
37+ "vacuum_cleaner" ,
38+ "vacuum_cleaner.urdf.xacro" ,
39+ )
4740
48- robot_description = {"robot_description" : robot_description_content }
41+ robot_description_content = xacro .process_file (
42+ xacro_file ,
43+ mappings = {
44+ "camera" : "true" if sensor == "camera" else "false" ,
45+ "laser" : "true" if sensor == "laser" else "false" ,
46+ },
47+ ).toxml ()
48+
49+ robot_description = {"robot_description" : robot_description_content }
50+
51+ else :
52+ ## Temporary SDF load to fix bumpers
53+ sdf_file = os .path .join (package_dir , 'models' , 'vacuum_cleaner' , 'vacuum_cleaner.sdf' )
54+ with open (sdf_file , 'r' ) as infp :
55+ robot_description_content = infp .read ()
4956
5057 robot_state_publisher_node = Node (
5158 package = "robot_state_publisher" ,
0 commit comments