From 9e86b933cafefa1df0cfbda8d7d4f7c58c1d530c Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Sun, 22 Feb 2026 17:23:54 -0500 Subject: [PATCH] Config Update --- .gitignore | 1 + config/search.yaml | 4 +- src/utils/recorder.py | 36 ++++++ worlds/uav_ugv_search.sdf | 228 -------------------------------------- 4 files changed, 39 insertions(+), 230 deletions(-) delete mode 100644 worlds/uav_ugv_search.sdf diff --git a/.gitignore b/.gitignore index fb3d160..d147d49 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ activate_venv.sh # Simulation results results/ +uav_ugv_search.sdf diff --git a/config/search.yaml b/config/search.yaml index 06dcbc0..6dfedf0 100644 --- a/config/search.yaml +++ b/config/search.yaml @@ -2,7 +2,7 @@ # Single source of truth for all mission parameters. # ── Flight ─────────────────────────────────────────────────── -altitude: 4.0 # Search altitude (feet) +altitude: 5.0 # Search altitude (feet) # ── ArUco Marker ───────────────────────────────────────────── marker: @@ -10,7 +10,7 @@ marker: size: 0.5 # Physical marker size in meters landing_ids: [0] # Marker IDs that trigger landing (on UGV) target_ids: [1] # Marker IDs to find and report to UGV - target_position: [3.0, 3.0] # Initial X, Y location of the target Aruco map in the map + target_position: [5.0, 3.0] # Initial X, Y location of the target Aruco map in the map # ── Search Patterns ────────────────────────────────────────── spiral: diff --git a/src/utils/recorder.py b/src/utils/recorder.py index 34c5a00..8e27eb0 100644 --- a/src/utils/recorder.py +++ b/src/utils/recorder.py @@ -108,6 +108,42 @@ class RunRecorder: # Gazebo window capture via xwd self._gazebo_wid = None self._find_gazebo_window() + threading.Thread(target=self._upload_hardware_info, daemon=True).start() + + def _upload_hardware_info(self): + if not self.sim_id: + return + + payload = { + "cpu_info": "Unknown CPU", + "gpu_info": "Unknown GPU", + "ram_info": "Unknown RAM" + } + + try: + import subprocess + cpu = "Unknown" + try: + cpu = subprocess.check_output("grep -m 1 'model name' /proc/cpuinfo | cut -d ':' -f 2", shell=True, timeout=2).decode('utf-8').strip() + except Exception: pass + if cpu: payload["cpu_info"] = cpu + + try: + ram_kb = int(subprocess.check_output("awk '/MemTotal/ {print $2}' /proc/meminfo", shell=True, timeout=2)) + payload["ram_info"] = f"{round(ram_kb / 1024 / 1024, 1)} GB" + except Exception: pass + + try: + gpu = subprocess.check_output("lspci | grep -i vga | cut -d ':' -f 3", shell=True, timeout=2).decode('utf-8').strip() + if gpu: payload["gpu_info"] = gpu + except Exception: pass + except Exception: + pass + + try: + requests.put(f"{API_URL}/api/simulations/{self.sim_id}/hardware", json=payload, timeout=5) + except Exception as e: + print(f"[REC] Hardware info sync failed: {e}") def _upload_file(self, path, filename): if not self.sim_id: diff --git a/worlds/uav_ugv_search.sdf b/worlds/uav_ugv_search.sdf deleted file mode 100644 index 238705c..0000000 --- a/worlds/uav_ugv_search.sdf +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - 0.002 - 1.0 - - - - - - - ogre2 - - - - - 25 - - - - - - - - - 1.0 1.0 1.0 - 0.6 0.75 0.9 - - false - - - - - -35.363262 - 149.165237 - 584 - 0 - EARTH_WGS84 - - - - - false - 0 0 10 0 0 0 - 0.9 0.9 0.9 1 - 0.5 0.5 0.5 1 - - 1000 - 0.9 - 0.01 - 0.001 - - -0.5 0.1 -0.9 - - - - - true - - - - - 0 0 1 - 100 100 - - - - - 0 0 -0.02 0 0 0 - - - 0 0 1 - 100 100 - - - - 0.5 0.55 0.45 1 - 0.5 0.55 0.45 1 - - - - - - - 1 - - - 0 - 5 0 0.05 0 0 0 - 10 0.02 0.02 - - 1 0 0 0.8 - 1 0 0 0.8 - 1 0 0 0.5 - - - - 0 - 0 5 0.05 0 0 0 - 0.02 10 0.02 - - 0 1 0 0.8 - 0 1 0 0.8 - 0 1 0 0.5 - - - - 0 - 0 0 5.05 0 0 0 - 0.02 0.02 10 - - 0 0 1 0.8 - 0 0 1 0.8 - 0 0 1 0.5 - - - - 1 - 1 - - - - - - - model://iris_with_gimbal - 0.0 0.0 0.4 0 0 90 - - - - - model://custom_ugv - ugv - 0.0 0.0 0 0 0 0 - - - - - true - 3.0 3.0 0.005 0 0 0 - - - 0.5 0.5 0.01 - - 1 1 1 1 - 1 1 1 1 - - - tags/aruco_DICT_4X4_50_1.png - 1.0 - 0.0 - - - - - - - - - - - true - 0 0 0.005 0 0 0 - - - 0.40.01 - - 1 1 0 1 - 1 1 0 1 - 0.8 0.8 0 0.6 - - - - - - - - true - 5 0 0.005 0 0 0 - - - 0.5 0.5 0.01 - - 1 0.1 0.1 1 - 1 0.1 0.1 1 - 0.8 0 0 0.5 - - - - - - - - true - 10 0 0.005 0 0 0 - - - 0.5 0.5 0.01 - - 0.1 1 0.1 1 - 0.1 1 0.1 1 - 0 0.8 0 0.5 - - - - - - - - true - 10 10 0.005 0 0 0 - - - 0.5 0.5 0.01 - - 0.1 0.1 1 1 - 0.1 0.1 1 1 - 0 0 0.8 0.5 - - - - - - true-15.0 0.0 0.01 0 0 1.570796326794896630.0 0.2 0.021 0 0 11 0 0 10.8 0 0 0.50.0 15.0 0.01 0 0 0.030.0 0.2 0.021 0 0 11 0 0 10.8 0 0 0.515.0 0.0 0.01 0 0 -1.570796326794896630.0 0.2 0.021 0 0 11 0 0 10.8 0 0 0.50.0 -15.0 0.01 0 0 3.14159265358979330.0 0.2 0.021 0 0 11 0 0 10.8 0 0 0.5 - \ No newline at end of file