From 72aef372a68bafb8be5a8074b4d01642c8958a36 Mon Sep 17 00:00:00 2001 From: rakadu1 Date: Tue, 7 Apr 2026 12:11:59 +0530 Subject: [PATCH] feat(radar): Iteration 14a Gaussian Vertical Antenna Damping Implemented Gaussian vertical-gain damping (-2.77 constant) to address the 'Super-Reflector' tree density problem. - [ConfigureRadar] Defined total vertical_beamwidth for AWRL1432 (30.0) and Radarbook (60.0). - [Sceneset] Added G_vertical damping math in get_loss_3 to suppress high-elevation energy. - [Sceneset] Retained debug logs (G_vertical average/min/max) for Iteration 14b calibration. Hiccups: - Resolved environment activation (carla312) in verification shell. - Corrected test_shenron.py command syntax. --- .../ConfigureRadar.py | 6 ++++++ .../shenron/Sceneset.py | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/ConfigureRadar.py b/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/ConfigureRadar.py index 5665543..21d75d2 100644 --- a/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/ConfigureRadar.py +++ b/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/ConfigureRadar.py @@ -34,6 +34,8 @@ class radar(): self.idle = 0 ## Idle time self.chirpT = self.N_sample / self.samp_rate ## Time of chirp self.chirp_rep = 12*27e-6 + self.vertical_beamwidth = 30.0 # Total beamwidth (±15°) + Ts = 1 / self.samp_rate self.t = np.arange(0, self.chirpT, Ts) @@ -68,6 +70,8 @@ class radar(): self.chirpT = self.N_sample / self.samp_rate ## Time of chirp self.chirp_rep = 0.75e-3 self.idle = self.chirp_rep - self.chirpT## Idle time + self.vertical_beamwidth = 60.0 # Total beamwidth (±30°) + Ts = 1 / self.samp_rate self.t = np.arange(0, self.chirpT, Ts) @@ -101,6 +105,8 @@ class radar(): self.chirpT = self.N_sample / self.samp_rate ## Time of chirp self.chirp_rep = 36.4e-6 self.idle = self.chirp_rep - self.chirpT ## Idle time + self.vertical_beamwidth = 30.0 # Total beamwidth (±15°) + Ts = 1 / self.samp_rate self.t = np.arange(0, self.chirpT, Ts) diff --git a/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/shenron/Sceneset.py b/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/shenron/Sceneset.py index 4ca8f33..1164cba 100644 --- a/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/shenron/Sceneset.py +++ b/scripts/ISOLATE/e2e_agent_sem_lidar2shenron_package/shenron/Sceneset.py @@ -409,7 +409,20 @@ def get_loss_3(points, rho, elev_angle, angles, radar, use_spec = True, use_diff spec_angle_thresh = 5.0*np.pi/180 # Increased from 2.0 to 5.0 for stability on turns - P_incident = np.power(rho,2) * np.sin(elev_angle) * voxel_phi * voxel_theta * (1/np.power(rho,tx_dist_loss_exponent)) * K_sq + # --- Iteration 14a: Vertical Antenna Gain (Gaussian Damping) --- + # Determine elevation in degrees relative to boresight (horizontal). + # elev_angle is currently radians from Z-axis (90 deg = horizontal). + phi_deg = np.rad2deg(np.abs(np.pi/2 - elev_angle)) + + # Gaussian Damping: G_elev = exp(-2.77 * (phi / beta)^2) + # beta is the total beamwidth (e.g., 30 deg for +-15 deg FOV). + G_vertical = np.exp(-2.77 * np.power(phi_deg / radar.vertical_beamwidth, 2)) + + # DEBUG: Confirm damping is active + if len(G_vertical) > 0: + print(f"[DEBUG 14a] G_vertical mean: {np.mean(G_vertical):.4f}, min: {np.min(G_vertical):.4f}, max: {np.max(G_vertical):.4f}") + + P_incident = np.power(rho,2) * np.sin(elev_angle) * voxel_phi * voxel_theta * (1/np.power(rho,tx_dist_loss_exponent)) * K_sq * G_vertical material = np.array(points[:,4]) material = np.asarray(material, dtype = 'int')