Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions manager/manager/launcher/launcher_ros2_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def run(self,callback):
logging.getLogger("roslaunch").setLevel(logging.CRITICAL)

# expand variables in configuration paths
self._set_environment()
launch_file = os.path.expandvars(self.launch_file)

if (ACCELERATION_ENABLED):
Expand Down Expand Up @@ -56,12 +55,3 @@ def terminate(self):
subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, bufsize=1024, universal_newlines=True)
cmd = kill_cmd + 'spawn_model.launch.py'
subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, bufsize=1024, universal_newlines=True)

def _set_environment(self):
resource_folders = [os.path.expandvars(path) for path in self.resource_folders]
model_folders = [os.path.expandvars(path) for path in self.model_folders]
plugin_folders = [os.path.expandvars(path) for path in self.plugin_folders]

os.environ["GAZEBO_RESOURCE_PATH"] = f"{os.environ.get('GAZEBO_RESOURCE_PATH', '')}:{':'.join(resource_folders)}"
os.environ["GAZEBO_MODEL_PATH"] = f"{os.environ.get('GAZEBO_MODEL_PATH', '')}:{':'.join(model_folders)}"
os.environ["GAZEBO_PLUGIN_PATH"] = f"{os.environ.get('GAZEBO_PLUGIN_PATH', '')}:{':'.join(plugin_folders)}"