Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Mismatch between chosen lane using TraCI and lane change state

Hello Jakob,

Thank you for your response. The exact method calls are the same as those provided in the actual code (in the zip file previously):

lcs = traci.vehicle.getLaneChangeState(vehID=vh, direction=int(action))[1]
couldChangeLane = traci.vehicle.couldChangeLane(vehID=vh, direction=direction, state=lcs)
lc_success = traci.vehicle.wantsAndCouldChangeLane(vehID=vh, direction=action, state=lcs)


The attached files ordered from ex0.png to ex5.png are some example screenshots of the issues. I will attach the my_observations.txt file that contains the exact call to couldChangeLane and wantsAndCouldChangeLane in the next email since the file size is too big. It will contain information about the entire run (more than just the screenshots).

Thank you.

Sincerely,
Hriday

On Tue, 17 May 2022 at 10:19, Hriday Sanghvi <sanghvih@xxxxxx> wrote:
Hello Jakob,

Thank you for your response. The exact method calls are the same as those provided in the actual code (in the zip file previously):

lcs = traci.vehicle.getLaneChangeState(vehID=vh, direction=int(action))[1]
couldChangeLane = traci.vehicle.couldChangeLane(vehID=vh, direction=direction, state=lcs)
lc_success = traci.vehicle.wantsAndCouldChangeLane(vehID=vh, direction=action, state=lcs)


The attached files ordered from ex0.png to ex5.png are some of the example screenshots of the issues. I have also attached a new my_observations.txt file that contains the exact call to couldChangeLane and wantsAndCouldChangeLane. It contains information about the entire run (more than just the screenshots).

Thank you.

Sincerely,
Hriday

On Tue, 17 May 2022 at 09:05, Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
- Please provide screenshots
- Please provide the exact method calls that computed the outputs
couldChangeLane TraCI: XXX
wantsAndCouldChangeLane TraCI: XXX

Am Sa., 14. Mai 2022 um 20:29 Uhr schrieb Hriday Sanghvi via sumo-user <sumo-user@xxxxxxxxxxx>:

Hello,

Please let me know if there is any additional information required? I could also make screenshots for the given conditions if needed.

Sincerely,
Hriday


On Thu, 12 May 2022 at 16:43, Hriday Sanghvi <sanghvih@xxxxxx> wrote:
Hello,

I am trying to detect when a lane change is "complete" or even an indication of its success reliably. For this, I am currently using wantsAndCouldLaneChange() and passing the lane change state of TraCI since I am explicitly controlling the vehicles using changeLaneRelative().

In the attached observations.txt file, you will find the output of every step of a simulation run. Some examples of mismatch between the TraCI command and the output of LaneChangeState (TraCI) in my_observations.txt are:

A. 
################ SIM STEP COUNT: 2 ################
AGENT f.0
CURRENT LANE: 1
ACTION SELECTED: move right
ACTION DIRECTION: -1
LANE CHANGE STATE SUMO: ['stay', 'sublane']
LANE CHANGE STATE TraCI: ['sublane']
couldChangeLane TraCI: True
wantsAndCouldChangeLane TraCI: False

wantsAndCouldChangeLane TraCI indicates False, which means the lane change isn't possible (or will not complete), but couldChangeLane clearly indicates that is True (And that it in fact CAN lane change as per my TraCI command to move from lane with index 1 in a direction -1, resulting in the lane 0).

- If there is a blocking vehicle, shouldn't the cooperative speed adjustments take care of the blocking vehicle? If not, then how do I compute that there is a blocking vehicle from the given information - so then I can proceed to do something about it?
 

B.
################ SIM STEP COUNT: 2 ################
AGENT f.1
CURRENT LANE: 0
ACTION SELECTED: stay
ACTION DIRECTION: 0
LANE CHANGE STATE TraCI: []
couldChangeLane TraCI: False
wantsAndCouldChangeLane TraCI: False

################ SIM STEP COUNT: 3 ################
AGENT f.1
CURRENT LANE: 0
ACTION SELECTED: stay
ACTION DIRECTION: 0
LANE CHANGE STATE TraCI: ['stay', 'TraCI', 'sublane']
couldChangeLane TraCI: True
wantsAndCouldChangeLane TraCI: False

A minor issue (but might indicate a larger misunderstanding on my part). Both steps 2 and 3 have agent f.1 selecting the action of staying. The wantsAndCouldChangeLane return value (False) is in line with what I have understood from a previous enquiry. However, why does the lane change state differ in both - one is empty, and the other one says something about sublane even though my lane change mode is 512 (sublane changes are disabled).

C.
################ SIM STEP COUNT: 4 ################
AGENT f.5
CURRENT LANE: 0
ACTION SELECTED: move left
ACTION DIRECTION: 1
LANE CHANGE STATE TraCI: []
couldChangeLane TraCI: False
wantsAndCouldChangeLane TraCI: False

Could not really determine the reason for not being able to move to that lane (similar to A)
- would the cooperative speed adjustments even be taken into account to determine if a lane change can be completed?
- how many seconds does it see into the future to determine if a lane change can be completed?

I have attached the minimal reproducing code, that can be run using
python sublanechange.py -nb 1 -bls 250 -blp 750 -bll 0 --fast (which will spawn a blockage of size 250m on lane with index 0 ending at the 750m mark, and run a simulation of 100 vehicles going through 1000 m length of road with two lanes). The scenario related information is found in scenario_sublane. There is also a helper script "simulate-sublane.sh" which can be run on a different terminal (for GUI) when you omit the "--fast" flag from the python command.

Please advise.

(Eclipse SUMO sumo Version 7d0fa177e)
Thank you.

Sincerely,
Hriday
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Attachment: ex3.png
Description: PNG image

Attachment: ex5.png
Description: PNG image

Attachment: ex2.png
Description: PNG image

Attachment: ex1.png
Description: PNG image

Attachment: ex4.png
Description: PNG image

Attachment: ex0.png
Description: PNG image


Back to the top