@@ -27,7 +27,6 @@ def run(self,callback):
2727 logging .getLogger ("roslaunch" ).setLevel (logging .CRITICAL )
2828
2929 # expand variables in configuration paths
30- self ._set_environment ()
3130 launch_file = os .path .expandvars (self .launch_file )
3231
3332 if (ACCELERATION_ENABLED ):
@@ -55,13 +54,4 @@ def terminate(self):
5554 cmd = kill_cmd + 'gzserver'
5655 subprocess .call (cmd , shell = True , stdout = subprocess .PIPE , bufsize = 1024 , universal_newlines = True )
5756 cmd = kill_cmd + 'spawn_model.launch.py'
58- subprocess .call (cmd , shell = True , stdout = subprocess .PIPE , bufsize = 1024 , universal_newlines = True )
59-
60- def _set_environment (self ):
61- resource_folders = [os .path .expandvars (path ) for path in self .resource_folders ]
62- model_folders = [os .path .expandvars (path ) for path in self .model_folders ]
63- plugin_folders = [os .path .expandvars (path ) for path in self .plugin_folders ]
64-
65- os .environ ["GAZEBO_RESOURCE_PATH" ] = f"{ os .environ .get ('GAZEBO_RESOURCE_PATH' , '' )} :{ ':' .join (resource_folders )} "
66- os .environ ["GAZEBO_MODEL_PATH" ] = f"{ os .environ .get ('GAZEBO_MODEL_PATH' , '' )} :{ ':' .join (model_folders )} "
67- os .environ ["GAZEBO_PLUGIN_PATH" ] = f"{ os .environ .get ('GAZEBO_PLUGIN_PATH' , '' )} :{ ':' .join (plugin_folders )} "
57+ subprocess .call (cmd , shell = True , stdout = subprocess .PIPE , bufsize = 1024 , universal_newlines = True )
0 commit comments