Skip to content

Commit cf5bafb

Browse files
committed
slalom test logs
1 parent d294ca5 commit cf5bafb

16 files changed

Lines changed: 6223 additions & 216 deletions

GEMstack/onboard/planning/racing_planning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def waypoint_generate(vehicle_state, cones, cone_idx):
5555
target_heading = car_heading
5656

5757
# ===== Parameters =====
58-
u_turn_radius = 11.5 # Radius for U-turn
58+
u_turn_radius = 7 # Radius for U-turn
5959
offset = 2.0 # Offset for left/right pass
6060
lookahead_distance = 10.0 # Distance ahead for fixed point
6161
# ======================

GEMstack/onboard/planning/stanley.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,10 @@ def update(self, vehicle: VehicleState, trajectory: Trajectory):
360360
4) Send command to the vehicle
361361
"""
362362
# path to trajectory if racing enabled
363-
# if self.desired_speed_source in ['racing']: ## conditional needed for no racing
364-
# self.stanley.set_racing_path(trajectory)
365-
# else:
366-
# self.stanley.set_path(trajectory)
367-
self.stanley.set_path(trajectory)
363+
if self.desired_speed_source in ['racing']: ## conditional needed for no racing
364+
self.stanley.set_racing_path(trajectory)
365+
else:
366+
self.stanley.set_path(trajectory)
368367
accel, f_delta = self.stanley.compute(vehicle, self)
369368

370369
# If your low-level interface expects steering wheel angle:

GEMstack/onboard/planning/velocity_profile.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def limit_velocity_by_steering_rate(ds, velocity, wheelbase, max_steering_rate,
205205
# raise ValueError(max_steering_rate)
206206
max_steering_rate = steer2front(max_steering_rate)
207207
max_steering_rate = 1
208-
208+
209209

210210
# Limit velocity where steering rate exceeds max
211211
limited_velocity = np.copy(velocity)
@@ -387,11 +387,5 @@ def compute_velocity_profile(points, plot=True):
387387

388388
plot_speed_profile_gradient(fig, axs[1, 0], xs, ys, v_profile)
389389
plot_speed_profile_gradient(fig, axs[1, 1], xs, ys, v_profile2)
390-
391-
392390
plt.tight_layout()
393-
plt.show()
394-
395-
396-
397-
391+
plt.show()

GEMstack/state/trajectory.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,24 @@ def compute_headings(path : Path, smoothed = False) -> Path:
411411

412412
path.points = np.vstack((x_smooth, y_smooth)).T
413413

414+
# raise NotImplementedError("Smoothing not done yet")
415+
points = np.array(path.points)
416+
x = points[:, 0]
417+
y = points[:, 1]
418+
419+
dx = np.diff(x)
420+
dy = np.diff(y)
421+
ds = np.hypot(dx, dy)
422+
s = np.insert(np.cumsum(ds), 0, 0)
423+
424+
tck_x = splrep(s, x, s=0.5)
425+
tck_y = splrep(s, y, s=0.5)
426+
427+
s_fine = np.linspace(0, s[-1], 200)
428+
x_smooth = splev(s_fine, tck_x)
429+
y_smooth = splev(s_fine, tck_y)
430+
431+
path.points = np.vstack((x_smooth, y_smooth)).T
414432
if len(path.points) < 2:
415433
raise ValueError("Path must have at least 2 points")
416434
derivs = []

testing/racing_logs/slalom_test/StanleyTrajectoryTracker_debug.csv

Lines changed: 1010 additions & 0 deletions
Large diffs are not rendered by default.

testing/racing_logs/slalom_test/behavior.json

Lines changed: 1214 additions & 0 deletions
Large diffs are not rendered by default.
500 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
events:
2+
- description: Hardware fault override_active
3+
time: 1746658328.1433983
4+
vehicle_time: 1746658328.1433842
5+
- description: Ctrl+C pressed, switching to recovery mode
6+
time: 1746658330.244504
7+
vehicle_time: 1746658330.2434165
8+
- description: Mission execution ended
9+
time: 1746658330.2494235
10+
vehicle_time: 1746658330.2434165
11+
exit_reason: normal exit
12+
git_branch: racing_temp
13+
git_commit_id: 6e84854b3ec79015eff2824dec10d4ae45d62600
14+
pipelines:
15+
- name: drive
16+
time: 1746658299.0166996
17+
vehicle_time: 1746658298.9165509
18+
- name: recovery
19+
time: 1746658330.2455354
20+
vehicle_time: 1746658330.2434165
21+
start_time: 1746658298.9004052
22+
start_time_human_readable: '2025-05-07 17:51:38'

0 commit comments

Comments
 (0)