Commit Graph

1 Commits

Author SHA1 Message Date
Paul Huliganga ce120393af fix: track switching via unwrapped viewer.exit_scene() — automatic scene changes work
KEY FIX: env.unwrapped.viewer.exit_scene() sends exit_scene through the proper
established websocket connection. The previous raw socket approach failed because
DonkeyCar uses a specific TCP protocol framing.

Working flow:
  1. Connect to current scene using gym.make(current_env_id)
  2. env.unwrapped.viewer.exit_scene() — sends exit via websocket
  3. Wait 4s for sim to return to main menu
  4. gym.make(target_env_id) — sim now loads the correct scene (loading scene X confirmed)

This enables fully automated multi-track evaluation and training without user intervention.
Confirmed working: generated_track → generated_road switch verified.

Agent: pi/claude-sonnet
Tests: 53/53 passing
Tests-Added: 0
TypeScript: N/A
2026-04-14 10:04:15 -04:00