From 751831ba88e48aa8751afa8e69ed4729c6d7aebd Mon Sep 17 00:00:00 2001 From: frederik Date: Mon, 11 Dec 2023 13:41:01 +0100 Subject: [PATCH] removes the need for a tmp folder Signed-off-by: frederik --- simulation-gazebo | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/simulation-gazebo b/simulation-gazebo index 9307a4a..b12e245 100644 --- a/simulation-gazebo +++ b/simulation-gazebo @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -import platform import argparse import subprocess import os @@ -14,12 +13,6 @@ def run(cmd): return process_handle def main(): - is_windows = platform.system() == 'Windows' - - if is_windows: - print('Windows is not supported at this time.') - exit(1) - parser = argparse.ArgumentParser(description='Gazebo simulation') parser.add_argument('--world', help='World to run in Gazebo', required=False, default="default") @@ -88,14 +81,10 @@ def main(): except: print(f'Warning: Could not unzip model files at {args.model_store}/resources.zip. Check model file format.') - os.system(f'mkdir {args.model_store}/tmp') - os.system(f'mv {args.model_store}/PX4-gazebo-models-main/models {args.model_store}/tmp/') - os.system(f'mv {args.model_store}/PX4-gazebo-models-main/worlds {args.model_store}/tmp/') - os.system(f'rm -rf {args.model_store}/PX4-gazebo-models-main/') + os.system(f'mv {args.model_store}/PX4-gazebo-models-main/models {args.model_store}/models') + os.system(f'mv {args.model_store}/PX4-gazebo-models-main/worlds {args.model_store}/worlds') os.system(f'rm {args.model_store}/resources.zip') - os.system(f'mv {args.model_store}/tmp/models {args.model_store}/models') - os.system(f'mv {args.model_store}/tmp/worlds {args.model_store}/worlds') - os.system(f'rm -rf {args.model_store}/tmp') + os.system(f'rm -rf {args.model_store}/PX4-gazebo-models-main/') # Launch gazebo simulation print('> Launching gazebo simulation...')