Skip to content

Traffic handover: Vehicle destination changed and is managed by multiple traffic providers #2011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Adaickalavan opened this issue May 3, 2023 · 1 comment · Fixed by #2014
Labels
bug Something isn't working

Comments

@Adaickalavan
Copy link
Member

Adaickalavan commented May 3, 2023

Steps to reproduce the bug

Steps to reproduce.

$ 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.

Version

version: 1.1.0
branch: traffic-handover

System info

No response

@Adaickalavan Adaickalavan added the bug Something isn't working label May 3, 2023
@Gamenot
Copy link
Collaborator

Gamenot commented May 3, 2023

From what I can note from the handover,

  • 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants