Skip to content

Commit

Permalink
removal of set_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanw17 committed Jul 18, 2023
1 parent 19c7a4b commit 9660600
Showing 1 changed file with 0 additions and 10 deletions.
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)}"

0 comments on commit 9660600

Please sign in to comment.