Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Confused about "Lane change state"

Hello,

I have a bunch of questions on the lane change state (using SL2015 lane change model) that are all related to what I am trying to accomplish.

When I issue a TraCI command of changeLane to a vehicle as:
FREE_LANE = 1
traci.vehicle.changeLane(vehID=vh, laneIndex=FREE_LANE, duration=1)
print('Vehicle {} will try to move to FREE lane'.format(vh))

lc_left_state = traci.vehicle.getLaneChangeStatePretty(vehID=vh, direction=+1)

print('Lane change to the left (SL2015): {}'.format(lc_left_state[0]))
print('Lane change to the left (TraCI): {}'.format(lc_left_state[1]))
print('COULD CHANGE LANE? {}'.format(traci.vehicle.couldChangeLane(vehID=vh, direction=+1)))
print('WANTS AND COULD CHANGE LANE? {}'.format(traci.vehicle.wantsAndCouldChangeLane(vehID=vh, direction=+1)))

The output for that step would look like this:
1. Vehicle f.2 will try to move to FREE lane
2. Lane change to the left (SL2015): ['left', 'TraCI', 'urgent', 'blocked by left follower', 'overlapping']
3. Lane change to the left (TraCI): ['left', 'TraCI', 'urgent', 'blocked by left follower', 'overlapping']
4. COULD CHANGE LANE? False
5. WANTS AND COULD CHANGE LANE? False

As I understand it, right after I issue the lane change command,
output 2 and 3 - from traci.vehicle.getLaneChangeStatePretty outputs two different lists of string constants - The first list is the "lane change state" as computed by the lane change model (2) and the second list is computed after incorporating the TraCI requests (3) and this is what will ACTUALLY happen?

traci.vehicle.wantsAndCouldChangeLane - At what point does this request output True? Does the "want to change lane" come from what SUMO would have done, or what actually happens with the TraCI override?

Also on this page ( https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html#lane_change_mode_0xb6 ), it is mentioned that "To disable all autonomous changing but still handle safety checks in the simulation, either one of the modes 256 (collision avoidance) or 512 (collision avoidance and safety-gap enforcement) may be used.". Is the "autonomous changing" here referring to TraCI commands that change the lane or to the internally computed lane changes by SUMO's lane change model (SL2015)?

Thank you.

Sincerely,
Hriday

Back to the top