Skip to content
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

Lane change from Traci is not executed when a route is set #12944

Closed
mpfist-no opened this issue Mar 29, 2023 · 3 comments
Closed

Lane change from Traci is not executed when a route is set #12944

mpfist-no opened this issue Mar 29, 2023 · 3 comments

Comments

@mpfist-no
Copy link

This issue may be related to my recently resolved issue #12810.

In my scenario, a lane change that I request via TraCI is not executed when I explicitly set a route that contains more than only the current edge (see the attached example).
Also, it doesn't matter if the second lane change goes to the right or to the left.

Minimum working example: lanechange-route-bug.zip

SUMO-version: current main branch & 1.15.0

operating system: Windows 10

@namdre
Copy link
Contributor

namdre commented Mar 31, 2023

fixed in 5827251

@namdre namdre closed this as completed Mar 31, 2023
@mpfist-no
Copy link
Author

Thanks @namdre for the quick fix.

I've been playing around with this situation a bit more and one more question has come up: I modified the example from the initial issue report to do a right lane change instead of a left lane change (as second lane change). Also, I manually re-set the route just before the second lane change:

step = 0
    while step < 1000:
        traci.simulationStep()
        traci.vehicle.setLaneChangeMode(VEHICLE_ID, 0b00_01_00_00_00_00)
        # Remove the next statement to make the second lane change work
        # traci.vehicle.setRoute(VEHICLE_ID, ["-9#1", "-9#2"])
        if step == 20:
            traci.vehicle.changeLaneRelative(VEHICLE_ID, 1, 10)
            traci.vehicle.highlight(VEHICLE_ID, alphaMax=255, duration=0.1)
        if step == 60:
            traci.vehicle.changeLaneRelative(VEHICLE_ID, -1, 10)
            traci.vehicle.setRoute(VEHICLE_ID, ["-9#1", "-9#2"])
            traci.vehicle.highlight(VEHICLE_ID, alphaMax=255, duration=0.1)
        step += 1

image

With the current main branch I see that the vehicle signals for the second lane change, but does not execute it. I assume it is because the next edge of the route is not reachable from the lane where I want it to change to. Is this correct?

If so, is there are way to enforce a lane change no matter what the route is?

@namdre
Copy link
Contributor

namdre commented Apr 11, 2023

the failed change was due to #13007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants