Describe the bug
In a TeraSim simulation, vehicles occasionally pass through or overlap with the leading vehicle in the same lane, resulting in physically unrealistic behavior.
This issue occurs when adversarial vehicles are used. In our investigation, it appears that might be related to the use of:
traci.vehicle.setSpeedMode(veh, 0)
which disables SUMO’s built-in safety checks. While this seems necessary for enabling adversarial behaviors (e.g., ignoring traffic rules), it also allows vehicles to ignore collision avoidance logic, leading to situations where vehicles overlap or pass through other vehicles.
To better understand the behavior, we ran the same scenario in two configurations:
- TeraSim simulation
- SUMO-only simulation using the same SUMO network and configuration files
The overlapping behavior only occurs in the TeraSim run. In the SUMO-only run, vehicles maintain proper spacing and no overlapping occurs.
We would like to confirm whether this behavior is expected when setSpeedMode(veh, 0) is used, or if there is a recommended approach to allow adversarial behavior while still preventing unrealistic vehicle overlap.
To Reproduce
- Download the scenario from google drive.
- Copy downloaded scenario to TeraSim
generated_experiments folder
- Move
boston_seaport_small.yaml to configs/simulation
Expected behavior
Vehicles may exhibit adversarial behavior (e.g., ignoring traffic lights or performing unsafe maneuvers), but they should not physically overlap or pass through other vehicles in the same lane or when it tries to lane change.
Ideally, adversarial vehicles should still maintain minimal physical constraints such as collision avoidance or minimum gap distance.
Screenshots
Google Drive
Environment (please complete the following information):
- OS: Ubuntu 22.04
- Python Version: 3.10
- SUMO Version: 1.26.0
- TeraSim Version: develop branch version
Describe the bug
In a TeraSim simulation, vehicles occasionally pass through or overlap with the leading vehicle in the same lane, resulting in physically unrealistic behavior.
This issue occurs when adversarial vehicles are used. In our investigation, it appears that might be related to the use of:
traci.vehicle.setSpeedMode(veh, 0)which disables SUMO’s built-in safety checks. While this seems necessary for enabling adversarial behaviors (e.g., ignoring traffic rules), it also allows vehicles to ignore collision avoidance logic, leading to situations where vehicles overlap or pass through other vehicles.
To better understand the behavior, we ran the same scenario in two configurations:
The overlapping behavior only occurs in the TeraSim run. In the SUMO-only run, vehicles maintain proper spacing and no overlapping occurs.
We would like to confirm whether this behavior is expected when setSpeedMode(veh, 0) is used, or if there is a recommended approach to allow adversarial behavior while still preventing unrealistic vehicle overlap.
To Reproduce
generated_experimentsfolderboston_seaport_small.yamltoconfigs/simulationExpected behavior
Vehicles may exhibit adversarial behavior (e.g., ignoring traffic lights or performing unsafe maneuvers), but they should not physically overlap or pass through other vehicles in the same lane or when it tries to lane change.
Ideally, adversarial vehicles should still maintain minimal physical constraints such as collision avoidance or minimum gap distance.
Screenshots
Google Drive
Environment (please complete the following information):