Vehicle Stops Inside Bicycle Lane Despite setStop and jmCrossingGap – Collision Risk in Junction

Hello,

I'm working with a SUMO simulation involving a junction where vehicles and bicycles travel in their respective lanes. A conflict arises when a right-turning vehicle and a straight-moving bicycle approach the junction simultaneously, creating a potential collision scenario.

To manage this, I initially allowed the collision to occur for testing purposes and then implemented a solution using TraCI to slow down the vehicle and allow the bicycle to pass first. However, I encountered an issue:

Even when using traci.vehicle.setStop() to halt the vehicle just after the stop line (and before entering the bicycle lane), the vehicle still stops inside the bicycle crossing area. This results in collision warnings, as shown in the screenshot below:

Image

What I’ve Tried:

  • traci.vehicle.setStop(): Used with precise positions just after the stop line, but the vehicle consistently stops within the bicycle lane.

  • jmCrossingGap parameter in the .rou.xml file: Attempted to use this to enforce a safer gap, but it did not affect the vehicle's stopping behavior or prevent the vehicle from entering the bike lane.

Expected Behavior is that the vehicle should stop before entering the bicycle lane, leaving enough room for the bicycle to cross safely without triggering a collision warning.

Could you help identify why the setStop() command might not be respecting the position limit? Is there a better way to enforce that vehicles stop before the bicycle lane begins (e.g., inside the junction polygon but outside the crossing)?

Thank you!