Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-dev] Retrieving the type of Junction
  • From: Adrien Dubedat <adrien.dubedat@xxxxxxx>
  • Date: Wed, 10 Nov 2021 18:03:27 +0000
  • Accept-language: fr-FR, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cae.com; dmarc=pass action=none header.from=cae.com; dkim=pass header.d=cae.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=70TnesS+Glxmq144kPnbrOf4qGfY2KWgNMVE0Lp0OtI=; b=MJ+kmCV1/9ZT/6etUBG1qsCFs2sI9h8OO5dTWaiq1O0GGRCczud2kbONacJjfEGmTZFiApaFDIJgEKwqX3/MWUEQLwwtIVDJbgCwkJ3bO3YIj31pA+DTjCoO6SeQnetIhjYp1Q5jUGJOkxDCJOGpM6hFH5GUcMfQstt/B+smuHB81lYrKnGvZh2tkIfYfCIONVcrJiIflff4E+JqHfeBiBgq0fQN2ejBYdwU0VV8RP4rDQiEAXaiEcYIn3MlE21VxHA4m+gCzkBA/zllHDcCs3/hexceT2E9n48+MDepjiPOxJ+VV5uRjDg2xyK1wccHyg0riQoMjlNU5RtgZS6Wug==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JrKmccxo+QdAlfcfT8d90lmG0rc3lvAP34d1VtIz9MZp5xO/aRSaPHBPraK2T2crMXAADxh40mEDIOEkXLRRNjs2wo4bek8s9UbW8n0Oy69BOF+HIqpq7nEIKxZ+fnT/3vLTbEfdQV1tdLmHnYPr/2jt5f4sLGvv0GPz2MYqvCRhPaY0a/7Uo3nzy7Mj6wV50GWuy8mfCvz9mGCDNzCTbEd+jhz7hu6yPUiAcfka3BjrAA/sPzq33VWrozCOKm7dU8SvBnrF2nlAiGO+0FBIUH4l+ZJv8DBVVoaiqUuoEzwzCZwMwg0mDtWd4FURTfbmlmcd1lGHEOqGIfEBE2Jmaw==
  • Delivered-to: sumo-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-dev/>
  • List-help: <mailto:sumo-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-dev>, <mailto:sumo-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-dev>, <mailto:sumo-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AdfPQ4m3YfuNrhChQyylfx+WTG2BFgAD6ViAAGIePfAACQVvgAAr87FAABnf5AABD1D/cA==
  • Thread-topic: [sumo-dev] Retrieving the type of Junction

Hi Jakob,

 

I’m now using a SUMO scenario that has pedestrians crosswalks.

 

I’ve been able to extract a new JSON file in which I list the junction ID, the lanes ID and the links ID.

The object I retrieve when calling getControlledLinks is a vector of TraCILink, on which I iterate to retrieve the elements “fromLane”, “toLane” and “viaLane”.

 

From what I see, the crosswalks seem to be only listed in the “toLane” elements.

 

Can I base myself only on “toLane” IDs then to map out the crosswalks of each junction ?

 

Attached is the JSON file I extracted.

 

Thank you for your help,

Adrien

 

De : sumo-dev <sumo-dev-bounces@xxxxxxxxxxx> De la part de Jakob Erdmann
Envoyé : Friday, November 5, 2021 3:31 AM
À : sumo developer discussions <sumo-dev@xxxxxxxxxxx>
Objet : Re: [sumo-dev] Retrieving the type of Junction

 

I'm guessing that your network doesn't have any crosswalks. See https://sumo.dlr.de/docs/Simulation/Pedestrians.html for how to get them.

This is what a pedestrian-enabled network should look like: https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html

 

Am Do., 4. Nov. 2021 um 21:25 Uhr schrieb Adrien Dubedat <adrien.dubedat@xxxxxxx>:

This a simple JSON file I created while running SUMO.

In there, I write the traffic light ID and then the controlled lanes ID in that traffic light.

However, I don’t see the format you were mentioning in your previous email.

 

I also tried to go through the list of controlled links but it’s the same format.

See the second file attached.

 

I’m guessing this is because the naming convention in the osm.net.xml file might not be correct ?

 

This is how a junction is defined in the osm.net.xml file:

 

<junction id="10018180" type="dead_end" x="9550.31" y="6845.42" incLanes="260842179_0" intLanes="" shape="9549.40,6845.01 9551.22,6845.82"/>

 

Thank you for your help,

Adrien

 

De : sumo-dev <sumo-dev-bounces@xxxxxxxxxxx> De la part de Jakob Erdmann
Envoyé : Wednesday, November 3, 2021 6:11 PM
À : sumo developer discussions <sumo-dev@xxxxxxxxxxx>
Objet : Re: [sumo-dev] Retrieving the type of Junction

 

You can use traci.trafficlight.getControlledLanes and getControlledLinks

Lanes with ids of the form :<JUNCTIONID>_w<index>_0 are walkingareas

Lanes with ids of the form :<JUNCTIONID>_c<index>_0 are crossings

 

The index in the result lists corresponds to the index in the phase state.

 

regards,

Jakob

 

 

Am Mi., 3. Nov. 2021 um 20:10 Uhr schrieb Adrien Dubedat <adrien.dubedat@xxxxxxx>:

Hi Jakob,

 

Thank you for your reply, I only just see it now because your emails were considered as spams by my company’s IT department …

 

It looks like I’ve been able to extract those controlled junctions, perfect.

 

I have another question. I’m interested in retrieving the state of the traffic lights associated to pedestrian crosswalks.

In the documentation, it says that the crosswalks’ states are at the end of “state” string when calling “getRedYellowGreenState()”.

Is there a way to know where do the pedestrian crosswalks start in that string ? Or is there a way to identify those crosswalks ?

 

Thank you,

Adrien

 

De : sumo-dev <sumo-dev-bounces@xxxxxxxxxxx> De la part de Jakob Erdmann
Envoyé : Monday, November 1, 2021 3:04 PM
À : sumo developer discussions <sumo-dev@xxxxxxxxxxx>
Objet : Re: [sumo-dev] Retrieving the type of Junction

 

ATTENTION : Ce courriel provient de l’extérieur de l’organisation. Ne cliquez pas sur les liens ni sur les pièces jointes à moins que vous reconnaissiez l’expéditeur et que vous sachiez que le contenu est sûr.
CAUTION : This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

The junction type is currently not accessible via the TraCI API.  (for static network analysis, the python library sumolib is recommended: https://sumo.dlr.de/docs/Tools/Sumolib.html)

 

If you only need to identify traffic light junctions, you can use the functions in TrafficLight.h to retrieve this information:

- all traffic light controllers with getIDList

- all junction ids controller by a given controller with getControlledJunctions

 

regards,

Jakob

 

Am Mo., 1. Nov. 2021 um 18:16 Uhr schrieb Adrien Dubedat <adrien.dubedat@xxxxxxx>:

Hi,

 

I’m trying to retrieve the type of a Junction, I’m using the C++ library.

 

In an osm.net.xml file which lists all junctions, I see there are some different node types (https://sumo.dlr.de/docs/Networks/PlainXML.html#node_types) :

 

<junction id="101335548" type="traffic_light" x="9587.74" y="5049.51" incLanes="-770022998#1_0 480644124#1_0 690226256#9_0 -11661029#1_0" intLanes=":101335548_0_0 :101335548_1_0 :101335548_16_0 :101335548_17_0 :101335548_4_0 :101335548_5_0 :101335548_18_0 :101335548_19_0 :101335548_8_0 :101335548_9_0 :101335548_20_0 :101335548_21_0 :101335548_12_0 :101335548_13_0 :101335548_22_0 :101335548_23_0" shape="9587.30,5041.43 9593.31,5043.64 9592.97,5045.85 9593.23,5046.73 9593.79,5047.47 9594.63,5048.06 9595.77,5048.51 9593.99,5054.65 9591.44,5054.42 9590.39,5054.75 9589.50,5055.38 9588.76,5056.31 9588.18,5057.54 9582.17,5055.32 9582.52,5053.10 9582.26,5052.21 9581.71,5051.46 9580.87,5050.85 9579.74,5050.39 9581.63,5044.27 9584.11,5044.53 9585.13,5044.20 9586.00,5043.58 9586.72,5042.65">

 

I looked in the C++ classes / headers, mostly in “Junction” class, and I didn’t find anything related to that type, while we can get the Position or the Shape for example.

 

Does anyone have an idea on how to get this data ?

 

Thank you,

Adrien

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

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

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

Attachment: controlled_junctions_pedestrians.json
Description: controlled_junctions_pedestrians.json


Back to the top