$ git checkout traffic-handover
# Retrieve the following scenario and place it here
# <path>/SMARTS/driving-smarts-2.competition-scenarios/t3/training/merge_exit_sumo_t_agents_1
$ cd <path>/SMARTS
$ python3.8 -m venv ./.venv
$ source ./.venv/bin/activate
$ pip install --upgrade pip
$ pip install -e .[camera_obs,argoverse]
$ scl zoo install examples/rl/platoon/inference
$ scl benchmark run driving_smarts_2023_3 examples.rl.platoon.inference:contrib-agent-v0 --auto-install
Press any key to step through the simulation. At each step, the traffic providers managing the lead vehicle "Leader-007" is printed. Additionally the destination road of the lead vehicle from the traffic provider is also printed.
High Level Description
After stepping the environment for a number of steps, TraCI error occurs resulting in the lead vehicle being handed over from SumoTrafficSimulation to LocalTraffic provider.
Issue-1: In all remaining steps within that episode, both SumoTrafficSimulation and LocalTrafficProvider appear to be managing "Leader-007".
Issue-2: The destination road of "Leader-007" appears to have changed from E4 under SumoTrafficSimulation control to E2.224.85 when controlled by LocalTrafficProvider.
Error logs and screenshots
Below is a sample terminal output when running the above example.
Leader-007 found in the following traffic providers: ['SumoTrafficSimulation']
Leader-007 in SumoTrafficSimulation has destination E4.
Press any key to proceed to next step .........
Leader-007 found in the following traffic providers: ['SumoTrafficSimulation']
Leader-007 in SumoTrafficSimulation has destination E4.
Press any key to proceed to next step .........
ERROR:SumoTrafficSimulation:TraCI has disconnected with: `connection closed by SUMO`. Please check the logging file `/home/kyber/.smarts/_sumo_run_logs/sumo-87a05c6a`.
WARNING:SumoTrafficSimulation:attempting to transfer SUMO vehicles to other providers...
Leader-007 found in the following traffic providers: ['SumoTrafficSimulation', 'LocalTrafficProvider']
Leader-007 in LocalTrafficProvider has destination E2.224.85.
Press any key to proceed to next step .........
Leader-007 found in the following traffic providers: ['SumoTrafficSimulation', 'LocalTrafficProvider']
Leader-007 in LocalTrafficProvider has destination E2.224.85.
Press any key to proceed to next step .........
Impact (If known)
Vehicle destination is changed upon traffic handover. Hence, the vehicle's total route distance which was computed beforehand at the start of the episode becomes inaccurate.
Issue 1) is an easy fix which just needs a check if the provider is still connected.
Issue 2) is the result of SUMO being disconnected. Route needs to be called through traci.vehicle.getRoute(v_id). I could ensure this by caching the routes of the sumo vehicles...
Steps to reproduce the bug
Steps to reproduce.
Press any key to step through the simulation. At each step, the traffic providers managing the lead vehicle "Leader-007" is printed. Additionally the destination road of the lead vehicle from the traffic provider is also printed.
High Level Description
After stepping the environment for a number of steps, TraCI error occurs resulting in the lead vehicle being handed over from SumoTrafficSimulation to LocalTraffic provider.
Issue-1: In all remaining steps within that episode, both SumoTrafficSimulation and LocalTrafficProvider appear to be managing "Leader-007".
Issue-2: The destination road of "Leader-007" appears to have changed from E4 under SumoTrafficSimulation control to E2.224.85 when controlled by LocalTrafficProvider.
Error logs and screenshots
Below is a sample terminal output when running the above example.
Impact (If known)
Vehicle destination is changed upon traffic handover. Hence, the vehicle's total route distance which was computed beforehand at the start of the episode becomes inaccurate.
Version
version: 1.1.0 branch: traffic-handover
System info
No response