Config Update
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -75,3 +75,4 @@ activate_venv.sh
|
||||
|
||||
# Simulation results
|
||||
results/
|
||||
uav_ugv_search.sdf
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<sdf version="1.9">
|
||||
<world name="uav_ugv_search">
|
||||
|
||||
|
||||
<physics name="2ms" type="ignore">
|
||||
<max_step_size>0.002</max_step_size>
|
||||
<real_time_factor>1.0</real_time_factor>
|
||||
</physics>
|
||||
|
||||
|
||||
<plugin filename="gz-sim-physics-system" name="gz::sim::systems::Physics">
|
||||
</plugin>
|
||||
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
|
||||
<render_engine>ogre2</render_engine>
|
||||
</plugin>
|
||||
<plugin filename="gz-sim-user-commands-system" name="gz::sim::systems::UserCommands">
|
||||
</plugin>
|
||||
<plugin filename="gz-sim-scene-broadcaster-system" name="gz::sim::systems::SceneBroadcaster">
|
||||
<state_hertz>25</state_hertz>
|
||||
</plugin>
|
||||
<plugin filename="gz-sim-imu-system" name="gz::sim::systems::Imu">
|
||||
</plugin>
|
||||
<plugin filename="gz-sim-navsat-system" name="gz::sim::systems::NavSat">
|
||||
</plugin>
|
||||
|
||||
|
||||
<scene>
|
||||
<ambient>1.0 1.0 1.0</ambient>
|
||||
<background>0.6 0.75 0.9</background>
|
||||
<sky />
|
||||
<shadows>false</shadows>
|
||||
</scene>
|
||||
|
||||
|
||||
<spherical_coordinates>
|
||||
<latitude_deg>-35.363262</latitude_deg>
|
||||
<longitude_deg>149.165237</longitude_deg>
|
||||
<elevation>584</elevation>
|
||||
<heading_deg>0</heading_deg>
|
||||
<surface_model>EARTH_WGS84</surface_model>
|
||||
</spherical_coordinates>
|
||||
|
||||
|
||||
<light type="directional" name="sun">
|
||||
<cast_shadows>false</cast_shadows>
|
||||
<pose>0 0 10 0 0 0</pose>
|
||||
<diffuse>0.9 0.9 0.9 1</diffuse>
|
||||
<specular>0.5 0.5 0.5 1</specular>
|
||||
<attenuation>
|
||||
<range>1000</range>
|
||||
<constant>0.9</constant>
|
||||
<linear>0.01</linear>
|
||||
<quadratic>0.001</quadratic>
|
||||
</attenuation>
|
||||
<direction>-0.5 0.1 -0.9</direction>
|
||||
</light>
|
||||
|
||||
|
||||
<model name="ground_plane">
|
||||
<static>true</static>
|
||||
<link name="link">
|
||||
<collision name="collision">
|
||||
<geometry>
|
||||
<plane>
|
||||
<normal>0 0 1</normal>
|
||||
<size>100 100</size>
|
||||
</plane>
|
||||
</geometry>
|
||||
</collision>
|
||||
<visual name="visual">
|
||||
<pose>0 0 -0.02 0 0 0</pose>
|
||||
<geometry>
|
||||
<plane>
|
||||
<normal>0 0 1</normal>
|
||||
<size>100 100</size>
|
||||
</plane>
|
||||
</geometry>
|
||||
<material>
|
||||
<ambient>0.5 0.55 0.45 1</ambient>
|
||||
<diffuse>0.5 0.55 0.45 1</diffuse>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
<model name="axes">
|
||||
<static>1</static>
|
||||
<link name="link">
|
||||
<visual name="r">
|
||||
<cast_shadows>0</cast_shadows>
|
||||
<pose>5 0 0.05 0 0 0</pose>
|
||||
<geometry><box><size>10 0.02 0.02</size></box></geometry>
|
||||
<material>
|
||||
<ambient>1 0 0 0.8</ambient>
|
||||
<diffuse>1 0 0 0.8</diffuse>
|
||||
<emissive>1 0 0 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
<visual name="g">
|
||||
<cast_shadows>0</cast_shadows>
|
||||
<pose>0 5 0.05 0 0 0</pose>
|
||||
<geometry><box><size>0.02 10 0.02</size></box></geometry>
|
||||
<material>
|
||||
<ambient>0 1 0 0.8</ambient>
|
||||
<diffuse>0 1 0 0.8</diffuse>
|
||||
<emissive>0 1 0 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
<visual name="b">
|
||||
<cast_shadows>0</cast_shadows>
|
||||
<pose>0 0 5.05 0 0 0</pose>
|
||||
<geometry><box><size>0.02 0.02 10</size></box></geometry>
|
||||
<material>
|
||||
<ambient>0 0 1 0.8</ambient>
|
||||
<diffuse>0 0 1 0.8</diffuse>
|
||||
<emissive>0 0 1 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
<sensor name="navsat_sensor" type="navsat">
|
||||
<always_on>1</always_on>
|
||||
<update_rate>1</update_rate>
|
||||
</sensor>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
|
||||
<include>
|
||||
<uri>model://iris_with_gimbal</uri>
|
||||
<pose degrees="true">0.0 0.0 0.4 0 0 90</pose>
|
||||
</include>
|
||||
|
||||
|
||||
<include>
|
||||
<uri>model://custom_ugv</uri>
|
||||
<name>ugv</name>
|
||||
<pose>0.0 0.0 0 0 0 0</pose>
|
||||
</include>
|
||||
|
||||
|
||||
<model name="target_tag_1">
|
||||
<static>true</static>
|
||||
<pose>3.0 3.0 0.005 0 0 0</pose>
|
||||
<link name="link">
|
||||
<visual name="v">
|
||||
<geometry><box><size>0.5 0.5 0.01</size></box></geometry>
|
||||
<material>
|
||||
<ambient>1 1 1 1</ambient>
|
||||
<diffuse>1 1 1 1</diffuse>
|
||||
<pbr>
|
||||
<metal>
|
||||
<albedo_map>tags/aruco_DICT_4X4_50_1.png</albedo_map>
|
||||
<roughness>1.0</roughness>
|
||||
<metalness>0.0</metalness>
|
||||
</metal>
|
||||
</pbr>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
|
||||
|
||||
<model name="origin_marker">
|
||||
<static>true</static>
|
||||
<pose>0 0 0.005 0 0 0</pose>
|
||||
<link name="link">
|
||||
<visual name="v">
|
||||
<geometry><cylinder><radius>0.4</radius><length>0.01</length></cylinder></geometry>
|
||||
<material>
|
||||
<ambient>1 1 0 1</ambient>
|
||||
<diffuse>1 1 0 1</diffuse>
|
||||
<emissive>0.8 0.8 0 0.6</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
|
||||
<model name="marker_red">
|
||||
<static>true</static>
|
||||
<pose>5 0 0.005 0 0 0</pose>
|
||||
<link name="link">
|
||||
<visual name="v">
|
||||
<geometry><box><size>0.5 0.5 0.01</size></box></geometry>
|
||||
<material>
|
||||
<ambient>1 0.1 0.1 1</ambient>
|
||||
<diffuse>1 0.1 0.1 1</diffuse>
|
||||
<emissive>0.8 0 0 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
|
||||
<model name="marker_green">
|
||||
<static>true</static>
|
||||
<pose>10 0 0.005 0 0 0</pose>
|
||||
<link name="link">
|
||||
<visual name="v">
|
||||
<geometry><box><size>0.5 0.5 0.01</size></box></geometry>
|
||||
<material>
|
||||
<ambient>0.1 1 0.1 1</ambient>
|
||||
<diffuse>0.1 1 0.1 1</diffuse>
|
||||
<emissive>0 0.8 0 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
|
||||
<model name="marker_blue">
|
||||
<static>true</static>
|
||||
<pose>10 10 0.005 0 0 0</pose>
|
||||
<link name="link">
|
||||
<visual name="v">
|
||||
<geometry><box><size>0.5 0.5 0.01</size></box></geometry>
|
||||
<material>
|
||||
<ambient>0.1 0.1 1 1</ambient>
|
||||
<diffuse>0.1 0.1 1 1</diffuse>
|
||||
<emissive>0 0 0.8 0.5</emissive>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
|
||||
<model name="geofence_visual"><static>true</static><link name="link"><visual name="edge_0"><pose>-15.0 0.0 0.01 0 0 1.5707963267948966</pose><geometry><box><size>30.0 0.2 0.02</size></box></geometry><material><ambient>1 0 0 1</ambient><diffuse>1 0 0 1</diffuse><emissive>0.8 0 0 0.5</emissive></material></visual><visual name="edge_1"><pose>0.0 15.0 0.01 0 0 0.0</pose><geometry><box><size>30.0 0.2 0.02</size></box></geometry><material><ambient>1 0 0 1</ambient><diffuse>1 0 0 1</diffuse><emissive>0.8 0 0 0.5</emissive></material></visual><visual name="edge_2"><pose>15.0 0.0 0.01 0 0 -1.5707963267948966</pose><geometry><box><size>30.0 0.2 0.02</size></box></geometry><material><ambient>1 0 0 1</ambient><diffuse>1 0 0 1</diffuse><emissive>0.8 0 0 0.5</emissive></material></visual><visual name="edge_3"><pose>0.0 -15.0 0.01 0 0 3.141592653589793</pose><geometry><box><size>30.0 0.2 0.02</size></box></geometry><material><ambient>1 0 0 1</ambient><diffuse>1 0 0 1</diffuse><emissive>0.8 0 0 0.5</emissive></material></visual></link></model></world>
|
||||
</sdf>
|
||||
Reference in New Issue
Block a user