Thank you for the response.

To give a little more context, this experiment is simply for me to
understand more on how sumo's intersection model works (i.e what
constitutes the intersection area and how the vehicles behave by comparing
it to sumo's publication on the matter by doctoring when the ego vehicle
enters). With that said, the motion and position I put the ego vehicle in
is merely arbitrary because from my previous understanding I had thought
that it had 'entered' the intersection area. I tried setting startPos of
both vehE and vehW to 20 to try and make extra sure that the ego vehicle
enters the intersection first and the same result is obtained, but
according to you the main road vehicle stops pass the stop line because it
has entered the intersection first and in that case I have several
questions:

-Which of the vehicles in the current scenario enter the intersection
first?

-If I understand you correctly, vehW from the main road entered first which
means my ego vehicle has not entered the intersection and if so what
specific condition needs to be satisfied for a vehicle to be considered to
have entered an intersection area? For example is it sufficient for only
the front bumper position to be in the junction's internal lane edge or
does the whole vehicle need to be inside?

-If it was like my previous understanding where I thought my ego vehicle
entered first, then is this the expected behaviour? How come vehE stops at
the correct position because even with the slight deviations in speed, it
seemed to have entered the intersection at around the same time as vehW?

Again thank you very much in advance

On Wed, Mar 3, 2021 at 9:58 PM Jakob Erdmann <[email protected]> wrote:

> In the default intersection model, a vehicle from a side road will either
> stop before the stop line or pass it and the continue driving across the
> intersection.
> Consequently, vehicles from the main road will yield to the side-road
> vehicle if it entered the intersection first (by passing the stop line).
>
> Currently, the best workaround for letting your ego vehicle stop at that
> location without impacting main road flow is by changing the junction shape
> to move the stop line forward. (i.e. setting it's 'radius' attribute to
> 2.5).
>
> regards,
> Jakob
>
> Am Mi., 3. März 2021 um 12:54 Uhr schrieb A Raman <[email protected]>:
>
>> Thank you for the help so far. Please find attached the traci log file
>> from my script. The problem still exist when I run without --random and
>> with the traffic definition file previously attached
>>
>> On Wed, Mar 3, 2021 at 6:32 PM Jakob Erdmann <[email protected]>
>> wrote:
>>
>>> Your traci script is importing the wrong traci (from anaconda) which
>>> does not support tracing.
>>> See
>>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_the_traci_library_being_loaded
>>>
>>> Am Mi., 3. März 2021 um 10:28 Uhr schrieb A Raman <[email protected]
>>> >:
>>>
>>>> The phenomena persists even with the given route file and without the
>>>> use of --random.
>>>> I tried to get the log file by adding traceFile=<filepath> argument to
>>>> traci.start but I got this error when running my python script:
>>>> TypeError: start() got an unexpected keyword argument 'traceFile'
>>>>
>>>> There could be issues to how I installed sumo so I check with my sumo
>>>> imports in my python script which are:
>>>>
>>>> if 'SUMO_HOME' in os.environ:
>>>>     tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
>>>>     sys.path.append(tools)
>>>> else:
>>>>     sys.exit("please declare environment variable 'SUMO_HOME'")
>>>>
>>>> # sys.path.append('/home/abi/Desktop/hdd/sumo/sumo/tools')
>>>>
>>>> from sumolib import checkBinary  # noqa
>>>> import traci
>>>>
>>>> looking at the output of print(traci.__file__) after the import leads me 
>>>> to my anaconda environment at 
>>>> /anaconda3/envs/envname/lib/python3.7/site-packages/traci/__init__.py 
>>>> where the definition for start is:
>>>>
>>>>  def start(cmd, port=None, numRetries=10, label="default"):
>>>>     """
>>>>     Start a sumo server using cmd, establish a connection to it and
>>>>     store it under the given label. This method is not thread-safe.
>>>>     """
>>>>     if port is None:
>>>>         port = sumolib.miscutils.getFreeSocketPort()
>>>>     sumoProcess = subprocess.Popen(cmd + ["--remote-port", str(port)])
>>>>     _connections[label] = connect(port, numRetries, "localhost", 
>>>> sumoProcess)
>>>>     switch(label)
>>>>     return getVersion()
>>>>
>>>> However digging deeper, I found a start definition in main.py at my 
>>>> '/usr/share/sumo/tools/traci' folder which contains the traceFile 
>>>> argument. So I would like to know if the correct traci is imported here
>>>>
>>>> Thank you
>>>>
>>>>
>>>>
>>>> On Wed, Mar 3, 2021 at 4:15 PM Jakob Erdmann <[email protected]>
>>>> wrote:
>>>>
>>>>> Unfortunately, these items are insufficient to replicate the situation
>>>>> from your screenshot (it shows 4 vehicles wheres the route file only
>>>>> defines 3 vehicles).
>>>>> Also, the use of option "--random" precludes exact reproducibility.
>>>>> - can you provide the complete traci script or alterantively, a log of
>>>>> the issued traci commands? (
>>>>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#generating_a_log_of_all_traci_commands
>>>>> )
>>>>> - can you provide a --seed value that shows the situation (or
>>>>> reproduce it without the use of --random)?
>>>>>
>>>>> Am Mi., 3. März 2021 um 02:19 Uhr schrieb A Raman <
>>>>> [email protected]>:
>>>>>
>>>>>> Thank you for the response,
>>>>>>
>>>>>> You can find the traffic definition file attached. I did use traci
>>>>>> for my tests and traci.start() is run with the configuration:
>>>>>>
>>>>>> traci.start([
>>>>>> self._sumo_bin,
>>>>>> '-n', self._net,
>>>>>> '-r', self._route,
>>>>>> '--step-length', '0.1',
>>>>>> '--no-warnings', 'true',
>>>>>> '--collision.action', 'warn',
>>>>>> '--collision.check-junctions', 'true',
>>>>>> '--max-depart-delay', '0.2',
>>>>>> '--random', 'true'
>>>>>> ])
>>>>>>
>>>>>>
>>>>>> with the attached files as self._net and self._route
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 3, 2021 at 2:57 AM Jakob Erdmann <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Please attach the traffic definition (.rou.xml) and post all options
>>>>>>> used to run sumo (or attach the .sumocfg).
>>>>>>> Did you use traci in your test?
>>>>>>>
>>>>>>> Am Di., 2. März 2021 um 13:10 Uhr schrieb A Raman <
>>>>>>> [email protected]>:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I found that, while testing intersection behaviours in SUMO in my
>>>>>>>> network, the yellow vehicles in the west-side lane always stop in the
>>>>>>>> intersection area and not at the end of the lane edge. In my attached
>>>>>>>> image, the east-side lane vehicle seems to stop correctly at the edge 
>>>>>>>> of
>>>>>>>> the lane at position (8, 2) while the west-side lane vehicles always 
>>>>>>>> stop
>>>>>>>> at around (~-4, -2). I tested this by manually entering the blue 
>>>>>>>> vehicle
>>>>>>>> into the intersection area and initializing the incoming yellow 
>>>>>>>> vehicles at
>>>>>>>> different times to have ample braking distance once the blue vehicle
>>>>>>>> enters.
>>>>>>>>
>>>>>>>> It doesn't seem like any of the documented reasons for this to
>>>>>>>> happen is the cause so I would like to know what exactly do I need to
>>>>>>>> change so that the bottom lane vehicle stops at the proper position. 
>>>>>>>> I've
>>>>>>>> tried changing the stop offset properties for the lane in the network 
>>>>>>>> file
>>>>>>>> which does not affect things. The current vehicle type configuration 
>>>>>>>> is at
>>>>>>>> default and you can also find my network file attached.
>>>>>>>>
>>>>>>>> Thank you very much in advance
>>>>>>>> _______________________________________________
>>>>>>>> sumo-user mailing list
>>>>>>>> [email protected]
>>>>>>>> To unsubscribe from this list, visit
>>>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> sumo-user mailing list
>>>>>>> [email protected]
>>>>>>> To unsubscribe from this list, visit
>>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>>
>>>>>> _______________________________________________
>>>>>> sumo-user mailing list
>>>>>> [email protected]
>>>>>> To unsubscribe from this list, visit
>>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>>
>>>>> _______________________________________________
>>>>> sumo-user mailing list
>>>>> [email protected]
>>>>> To unsubscribe from this list, visit
>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to