Re: [sumo-dev] Retrieving the type of Junction
Great, thank you very much, you've been very helpful Jakob ! Have a good day and a good weekend, Adrien De : sumo-dev De la part de Jakob Erdmann Envoyé : Thursday, November 11, 2021 5:20 PM À : sumo developer discussions Objet : Re: [sumo-dev] Retrieving the type of Junction Q1: yes. The length always corresponds to the length of the state string for that junction. Q2: yes. Am Do., 11. Nov. 2021 um 22:43 Uhr schrieb Adrien Dubedat mailto:adrien.dube...@cae.com>>: Thank you very much again for your time Jakob ! I have probably what should be my last 2 questions about this subject. For example, with this junction ID "108103" : { "crosswalks_lanes_id": [ "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", ":108103_w1_0", ":108103_w2_0", ":108103_w3_0", ":108103_w0_0" ], "crosswalks_link_fromLane": [ "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", ":108103_w1_0", ":108103_w2_0", ":108103_w3_0", ":108103_w0_0" ], "crosswalks_link_toLane": [ "102950257#6_1", "-320718063#11_1", "-102950257#5_1", "4259614#0_1", "4259614#0_1", "102950257#6_1", "-320718063#11_1", "-102950257#5_1", "-102950257#5_1", "4259614#0_1", "102950257#6_1", "-320718063#11_1", "-320718063#11_1", "-102950257#5_1", "4259614#0_1", "102950257#6_1", ":108103_c0_0", ":108103_c1_0", ":108103_c2_0", ":108103_c3_0" ], "crosswalks_link_viaLane": [ ":108103_0_0", ":108103_1_0", ":108103_2_0", ":108103_3_0", ":108103_4_0", ":108103_5_0", ":108103_6_0", ":108103_7_0", ":108103_8_0", ":108103_9_0", ":108103_10_0", ":108103_11_0", ":108103_12_0", ":108103_13_0", ":108103_14_0", ":108103_15_0", "", "", "", "" ], "junction_id": "108103" } It looks like that junction has a total (cars + pedestrians) of 20 lanes. Q1 - it seems the number of lanes (20) is the same for "crosswalks_lanes_id", "crosswalks_link_fromLane", "crosswalks_link_toLane" and "crosswalks_link_viaLane", the only difference being that some are empty strings for that last "category". Does that mean it's the same for all junctions ? Q2 - I retrieved the traffic light state for that junction and it gave me "gGgggGgg" at some time, then "gGgggGggGrGr" later on. If I refer to your previous emails, should I understand that : * The state of crossing ":108103_c0_0" is the one I highlighted in yellow ? * The state of crossing ":108103_c1_0" is the one I highlighted in green ? * The state of crossing ":108103_c2_0" is the one I highlighted in blue ? * The state of crossing ":108103_c3_0" is the one I highlighted in pu
Re: [sumo-dev] Retrieving the type of Junction
Q1: yes. The length always corresponds to the length of the state string for that junction. Q2: yes. Am Do., 11. Nov. 2021 um 22:43 Uhr schrieb Adrien Dubedat < adrien.dube...@cae.com>: > Thank you very much again for your time Jakob ! > > > > I have probably what should be my last 2 questions about this subject. > > > > For example, with this junction ID “108103” : > > > > { > > "crosswalks_lanes_id": [ > > "-4259614#1_1", > > "-4259614#1_1", > > "-4259614#1_1", > > "-4259614#1_1", > > "102950257#4_1", > > "102950257#4_1", > > "102950257#4_1", > > "102950257#4_1", > > "320718063#10_1", > > "320718063#10_1", > > "320718063#10_1", > > "320718063#10_1", > > "-102950257#7_1", > > "-102950257#7_1", > > "-102950257#7_1", > > "-102950257#7_1", > > ":108103_w1_0", > > ":108103_w2_0", > > ":108103_w3_0", > >":108103_w0_0" > > ], > > "crosswalks_link_fromLane": [ > > "-4259614#1_1", > > "-4259614#1_1", > > "-4259614#1_1", > > "-4259614#1_1", > > "102950257#4_1", > > "102950257#4_1", > > "102950257#4_1", > > "102950257#4_1", > > "320718063#10_1", > > "320718063#10_1", > > "320718063#10_1", > > "320718063#10_1", > > "-102950257#7_1", > > "-102950257#7_1", > > "-102950257#7_1", > > "-102950257#7_1", > > ":108103_w1_0", > > ":108103_w2_0", > > ":108103_w3_0", > > ":108103_w0_0" > > ], > > "crosswalks_link_toLane": [ > > "102950257#6_1", > > "-320718063#11_1", > > "-102950257#5_1", > > "4259614#0_1", > > "4259614#0_1", > > "102950257#6_1", > > "-320718063#11_1", > > "-102950257#5_1", > > "-102950257#5_1", > > "4259614#0_1", > > "102950257#6_1", > > "-320718063#11_1", > > "-320718063#11_1", > > "-102950257#5_1", > > "4259614#0_1", > > "102950257#6_1", > > ":108103_c0_0", > > ":108103_c1_0", > > ":108103_c2_0", > > ":108103_c3_0" > > ], > > "crosswalks_link_viaLane": [ > > ":108103_0_0", > > ":108103_1_0", > > ":108103_2_0", > > ":108103_3_0", > > ":108103_4_0", > > ":108103_5_0", > > ":108103_6_0", > > ":108103_7_0", > > ":108103_8_0", > > ":108103_9_0", > > ":108103_10_0", > > ":108103_11_0", > > ":108103_12_0", > > ":108103_13_0", > > ":108103_14_0", > > ":108103_15_0", > > "", > > "", > > "", > > "" > > ], > > "junction_id": "108103" > > } > > > > It looks like that junction has a total (cars + pedestrians) of 20 lanes. > > > > Q1 – it seems the number of lanes (20) is the same for > "crosswalks_lanes_id", "crosswalks_link_fromLane", "crosswalks_link_toLane" > and "crosswalks_link_viaLane", the only differe
Re: [sumo-dev] Retrieving the type of Junction
Thank you very much again for your time Jakob ! I have probably what should be my last 2 questions about this subject. For example, with this junction ID "108103" : { "crosswalks_lanes_id": [ "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", ":108103_w1_0", ":108103_w2_0", ":108103_w3_0", ":108103_w0_0" ], "crosswalks_link_fromLane": [ "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "-4259614#1_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "102950257#4_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "320718063#10_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", "-102950257#7_1", ":108103_w1_0", ":108103_w2_0", ":108103_w3_0", ":108103_w0_0" ], "crosswalks_link_toLane": [ "102950257#6_1", "-320718063#11_1", "-102950257#5_1", "4259614#0_1", "4259614#0_1", "102950257#6_1", "-320718063#11_1", "-102950257#5_1", "-102950257#5_1", "4259614#0_1", "102950257#6_1", "-320718063#11_1", "-320718063#11_1", "-102950257#5_1", "4259614#0_1", "102950257#6_1", ":108103_c0_0", ":108103_c1_0", ":108103_c2_0", ":108103_c3_0" ], "crosswalks_link_viaLane": [ ":108103_0_0", ":108103_1_0", ":108103_2_0", ":108103_3_0", ":108103_4_0", ":108103_5_0", ":108103_6_0", ":108103_7_0", ":108103_8_0", ":108103_9_0", ":108103_10_0", ":108103_11_0", ":108103_12_0", ":108103_13_0", ":108103_14_0", ":108103_15_0", "", "", "", "" ], "junction_id": "108103" } It looks like that junction has a total (cars + pedestrians) of 20 lanes. Q1 - it seems the number of lanes (20) is the same for "crosswalks_lanes_id", "crosswalks_link_fromLane", "crosswalks_link_toLane" and "crosswalks_link_viaLane", the only difference being that some are empty strings for that last "category". Does that mean it's the same for all junctions ? Q2 - I retrieved the traffic light state for that junction and it gave me "gGgggGgg" at some time, then "gGgggGggGrGr" later on. If I refer to your previous emails, should I understand that : * The state of crossing ":108103_c0_0" is the one I highlighted in yellow ? * The state of crossing ":108103_c1_0" is the one I highlighted in green ? * The state of crossing ":108103_c2_0" is the one I highlighted in blue ? * The state of crossing ":108103_c3_0" is the one I highlighted in purple ? Regards, Adrien De : sumo-dev De la part de Jakob Erdmann Envoyé : Thursday, November 11, 2021 3:48 AM À : sumo developer discussions Objet : Re: [sumo-dev] Retrieving the type of Junction In all "default" networks generated by netconvert, you only need to consider the state of the connection that targets a crossing. For this you must locate the index of the crossing within the list returned by trafficlight.getControlledLinks. (crossings will be
Re: [sumo-dev] Retrieving the type of Junction
In all "default" networks generated by netconvert, you only need to consider the state of the connection that targets a crossing. For this you must locate the index of the crossing within the list returned by trafficlight.getControlledLinks. (crossings will be at the end of the list). This index corresponds to the index within the 'state' string of the current phase and the state code (G/r) will describe both sides of the crossing. Caveat: It is possible two control both sides of a pedestrian crossing with different signal states. Contrary to my previous message, this will lead to controlled links of the form where the crossings is the fromLane: [[('EC_0', 'CW_0', ':C_0_0')], [('EC_1', 'CW_1', ':C_0_1')], [('WC_0', 'CE_0', ':C_2_0')], [('WC_1', 'CE_1', ':C_2_1')], [(':C_w2_0', ':C_c1_0', '')], *[(':C_c1_0', ':C_w0_0', '')]*, [(':C_w1_0', ':C_c2_0', '')], *[(':C_c2_0', ':C_w2_0', '')]*] However, you should not encounter this unless you explicitly define these special crossings by assigning their 'linkIndex2' attribute ( https://sumo.dlr.de/docs/Networks/PlainXML.html#pedestrian_crossings) regards, Jakob Am Mi., 10. Nov. 2021 um 21:33 Uhr schrieb Adrien Dubedat < adrien.dube...@cae.com>: > If I want to retrieve the signal state of each pedestrians crosswalk > light, do I need to focus on anything else than the state of the > _c_0 > IDs ? > > > > For example, for this junction : > > > > { > > "crosswalks_lanes_id": [ > > "230506730#1_0", > > ":4350193651_w1_0" > > ], > > "crosswalks_link_fromLane": [ > > "230506730#1_0", > > ":4350193651_w1_0" > > ], > > "crosswalks_link_toLane": [ > > "332620704#2_0", > > ":4350193651_c0_0" > > ], > > "crosswalks_link_viaLane": [ > > ":4350193651_0_0", > > "" > > ], > > "junction_id": "4350193651" > > } > > > > Do I only need to get the state of “:4350193651_c0_0” to get the state of > that crosswalk light ? > > > > Regards, > > Adrien > > > > *De :* sumo-dev *De la part de* Jakob > Erdmann > *Envoyé :* Wednesday, November 10, 2021 2:22 PM > *À :* sumo developer discussions > *Objet :* Re: [sumo-dev] Retrieving the type of Junction > > > > Yes. The crossings will only show up as "toLane" IDs (even though both > sides are controlled by a traffic light and can even have different signal > states). > > > > Am Mi., 10. Nov. 2021 um 19:04 Uhr schrieb Adrien Dubedat < > adrien.dube...@cae.com>: > > 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 *De la part de* Jakob > Erdmann > *Envoyé :* Friday, November 5, 2021 3:31 AM > *À :* sumo developer discussions > *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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cb2f3de2f51e041d2076008d9a47f6f24%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637721690937200874%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=dm%2BNIJIaYpFY7Wq%2BnXpPoJDFfHQL8ZOAJ32522mTnUM%3D=0> > for how to get them. > > This is what a pedestrian-enabled network should look like: > https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTutorials%2FTraCIPedCrossing.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cb2f3de2f51e041d2076008d9a47f6f24%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637721690937210823%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
Re: [sumo-dev] Retrieving the type of Junction
If I want to retrieve the signal state of each pedestrians crosswalk light, do I need to focus on anything else than the state of the _c_0 IDs ? For example, for this junction : { "crosswalks_lanes_id": [ "230506730#1_0", ":4350193651_w1_0" ], "crosswalks_link_fromLane": [ "230506730#1_0", ":4350193651_w1_0" ], "crosswalks_link_toLane": [ "332620704#2_0", ":4350193651_c0_0" ], "crosswalks_link_viaLane": [ ":4350193651_0_0", "" ], "junction_id": "4350193651" } Do I only need to get the state of ":4350193651_c0_0" to get the state of that crosswalk light ? Regards, Adrien De : sumo-dev De la part de Jakob Erdmann Envoyé : Wednesday, November 10, 2021 2:22 PM À : sumo developer discussions Objet : Re: [sumo-dev] Retrieving the type of Junction Yes. The crossings will only show up as "toLane" IDs (even though both sides are controlled by a traffic light and can even have different signal states). Am Mi., 10. Nov. 2021 um 19:04 Uhr schrieb Adrien Dubedat mailto:adrien.dube...@cae.com>>: 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 mailto:sumo-dev-boun...@eclipse.org>> De la part de Jakob Erdmann Envoyé : Friday, November 5, 2021 3:31 AM À : sumo developer discussions mailto:sumo-dev@eclipse.org>> 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<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cb2f3de2f51e041d2076008d9a47f6f24%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637721690937200874%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=dm%2BNIJIaYpFY7Wq%2BnXpPoJDFfHQL8ZOAJ32522mTnUM%3D=0> for how to get them. This is what a pedestrian-enabled network should look like: https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTutorials%2FTraCIPedCrossing.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cb2f3de2f51e041d2076008d9a47f6f24%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637721690937210823%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=Y6FLqDdMCwlGUdjgB6HRgF3pfxCWGSKIhxcB50NR%2Fj8%3D=0> Am Do., 4. Nov. 2021 um 21:25 Uhr schrieb Adrien Dubedat mailto:adrien.dube...@cae.com>>: 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: Thank you for your help, Adrien De : sumo-dev mailto:sumo-dev-boun...@eclipse.org>> De la part de Jakob Erdmann Envoyé : Wednesday, November 3, 2021 6:11 PM À : sumo developer discussions mailto:sumo-dev@eclipse.org>> Objet : Re: [sumo-dev] Retrieving the type of Junction You can use traci.trafficlight.getControlledLanes and getControlledLinks Lanes with ids of the form :_w_0 are walkingareas Lanes with ids of the form :_c_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 mailto:adrien.dube...@cae.com>>: 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
Re: [sumo-dev] Retrieving the type of Junction
Yes. The crossings will only show up as "toLane" IDs (even though both sides are controlled by a traffic light and can even have different signal states). Am Mi., 10. Nov. 2021 um 19:04 Uhr schrieb Adrien Dubedat < adrien.dube...@cae.com>: > 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 *De la part de* Jakob > Erdmann > *Envoyé :* Friday, November 5, 2021 3:31 AM > *À :* sumo developer discussions > *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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cfb69b1852d8f498e460108d9a02e3f5c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637716943952737780%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=PBDYle2plhW4UvbUjvSuksStWuaou4emRToMly5FCpY%3D=0> > for how to get them. > > This is what a pedestrian-enabled network should look like: > https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTutorials%2FTraCIPedCrossing.html=04%7C01%7Cadrien.dubedat%40cae.com%7Cfb69b1852d8f498e460108d9a02e3f5c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637716943952747734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=%2FXNIHh5cHY19c3JDjM0MwaFCsmdoyY2L%2Fjk%2FQc4%2FnaM%3D=0> > > > > Am Do., 4. Nov. 2021 um 21:25 Uhr schrieb Adrien Dubedat < > adrien.dube...@cae.com>: > > 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: > > > > incLanes="260842179_0" intLanes="" shape="9549.40,6845.01 9551.22,6845.82"/> > > > > Thank you for your help, > > Adrien > > > > *De :* sumo-dev *De la part de* Jakob > Erdmann > *Envoyé :* Wednesday, November 3, 2021 6:11 PM > *À :* sumo developer discussions > *Objet :* Re: [sumo-dev] Retrieving the type of Junction > > > > You can use traci.trafficlight.getControlledLanes and getControlledLinks > > Lanes with ids of the form :_w_0 are walkingareas > > Lanes with ids of the form :_c_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.dube...@cae.com>: > > 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 *De la part de* Jakob > Erdmann > *Envoyé :* Monday, November 1, 2021 3:04 PM > *À :* sumo developer discussions > *Objet :* Re: [sumo-dev] Retrieving the type of Junction > > > > *ATTENTION
Re: [sumo-dev] Retrieving the type of Junction
Thank you Jakob for your time. Based on your answer#1 below, I create my scenario with count 0 while checking the box "pedestrians". Sumo run the generated scenario without any errors. But when we run sumo with adding external pedestrians sumo crash with the following error: terminate called after throwing an instance of 'tcpip::SocketException' what(): tcpip::Socket::recvAndCheck @ recv: peer shutdown FYI, We use the following Sumo's APis to add Update and remove external pedestrians: externalPersonID = 99 ADD: libsumo::TraCIRoadPosition wEdge = Simulation::convertRoad(iLong, iLat, true, "pedestrian"); double wPosition = iEdge.pos - 0.01; Person::add(externalPersonID, wEdge.edgeID , wPosition, libsumo::DEPARTFLAG_NOW); Person::appendWalkingStage(externalPersonID, { wEdge.edgeID }, wPosition, -1, -1, ""); UPDATE: libsumo::TraCIPosition wCartesianPos = Simulation::convertGeo(iLong, iLat, true); double wAngle = libsumo::INVALID_DOUBLE_VALUE; int wkeepRoute = 1; double wMatchThreshold = 100; Person::moveToXY(externalPersonID, , { wEdge.edgeID }, wCartesianPos.x, wCartesianPos.y, wAngle, wKeepRoute, wMatchThreshold); Person::setSpeed(externalPersonID, 0.0); REMOVE : while (1 < Person::getRemainingStages(externalPersonID)) { Person::removeStage(externalPersonID, 1); } Person::removeStage(externalPersonID, 0); } Before every step() we add a new pedestrian and we update the existing ones and remove pedestrians when a decision is made (outside sumo). Then after Simulation::Step() is called. The mentioned error is generated at the second call of Simulation::step(). Would you please advice. NB: that code works well with scenarios where the checkbox "pedestrians" is not checked. Regards, Mell From: Jakob Erdmann Sent: Sunday, November 7, 2021 4:56 AM To: Melhem Tawk Subject: Re: [sumo-dev] Retrieving the type of Junction 1. The easiest way to get crosswalks into your scenario is the set the checkbox "pedestrians" in the traffic tab of osmWebWizard and set the 'count' field to 0. This will set the appropriate netconvert options for adding sidewalks and crossings to the network without adding any pedestrians to the simulation. 2. Simulation::load reloads the whole network. If you call Simulaton::loadState only the state is reset and the network is kept. However, this only makes a difference when having lots of short simulations (rather than 2 hour simulations as in your case). regards, Jakob Am Fr., 5. Nov. 2021 um 19:30 Uhr schrieb Melhem Tawk mailto:melhem.t...@cae.com>>: Dear Jakob, Thank you for you answer mentioning than there are no crosswalks in our scenario. Attached is the screen shot of files list of our scenario generated via OSMWebWizad script. By the way we have vehicles in the scenarios but the pedestrians are inserted remotely from external simulator during the simulation using the following as you told me in a previous email: *** Hello, - the easiest way to couple with a pedestrian simulator is to remote-control each person using the traci function person.moveToXY (after adding it with person.add and person.appendWalkingStage) - if your original network data (probably OSM) does not contain sidewalk information, there are various ways to add sidwalks. See https://sumo.dlr.de/docs/Simulation/Pedestrians.html#building_a_network_for_pedestrian_simulation<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html%23building_a_network_for_pedestrian_simulation=04%7C01%7Cmelhem.tawk%40cae.com%7C97a7e1acaed24df0146c08d9a1d4e65e%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637718758061916931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=KzG%2FhCnVlekN37jCuXCjWFpw4NpibdsG%2BYryLvSeoxc%3D=0> - you can obtain permission data using traci.lane.getAllowed regards, Jakob ** First, Based on what we have could you please explain to us how we can generate the cross walks. By the way we despite that there are no crosswlaks in our scenario, we can see in sumo the pedestrian coming from external simulator on crosswalk. Second Point, we are using the c++ api to start sumo Simulation::Start({"sumo", "-c", "osm.sumocfg", "--load-state" , "statetakenat750SimulationTimename", "--step-length", "0.5"}). This will run for 7200 simulation time then we use Simulation::Load(({"sumo", "-c", "osm.sumocfg", "--load-state" , "statename", "--load-state.offset", "7200") to reload the simulation without restaring the full scenario. Do you think this the best way to reload the simulation in an efficient way or there is another way ? Plea
Re: [sumo-dev] Retrieving the type of Junction
Dear Jakob, Thank you for you answer mentioning than there are no crosswalks in our scenario. Attached is the screen shot of files list of our scenario generated via OSMWebWizad script. By the way we have vehicles in the scenarios but the pedestrians are inserted remotely from external simulator during the simulation using the following as you told me in a previous email: *** Hello, - the easiest way to couple with a pedestrian simulator is to remote-control each person using the traci function person.moveToXY (after adding it with person.add and person.appendWalkingStage) - if your original network data (probably OSM) does not contain sidewalk information, there are various ways to add sidwalks. See https://sumo.dlr.de/docs/Simulation/Pedestrians.html#building_a_network_for_pedestrian_simulation<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html%23building_a_network_for_pedestrian_simulation=04%7C01%7Cmelhem.tawk%40cae.com%7C5ba52fbe1efe4cc7388d08d9923b38b0%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637701606143610134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=RwYh9wCn1qiVutK1M390ywI3bkMjwJhcFu0eBmeFr3Q%3D=0> - you can obtain permission data using traci.lane.getAllowed regards, Jakob ** First, Based on what we have could you please explain to us how we can generate the cross walks. By the way we despite that there are no crosswlaks in our scenario, we can see in sumo the pedestrian coming from external simulator on crosswalk. Second Point, we are using the c++ api to start sumo Simulation::Start({"sumo", "-c", "osm.sumocfg", "--load-state" , "statetakenat750SimulationTimename", "--step-length", "0.5"}). This will run for 7200 simulation time then we use Simulation::Load(({"sumo", "-c", "osm.sumocfg", "--load-state" , "statename", "--load-state.offset", "7200") to reload the simulation without restaring the full scenario. Do you think this the best way to reload the simulation in an efficient way or there is another way ? Please advice Mell Thank you for answer [cid:image001.jpg@01D7D251.AC0E20F0] From: sumo-dev On Behalf Of Jakob Erdmann Sent: Friday, November 5, 2021 3:31 AM To: sumo developer discussions Subject: 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<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FSimulation%2FPedestrians.html=04%7C01%7Cmelhem.tawk%40cae.com%7Cfb69b1852d8f498e460108d9a02e3f5c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637716943870502646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=dJ0evKAtadqsvdd11GusxozfBTJtLxzhcMMRORG7H%2F8%3D=0> for how to get them. This is what a pedestrian-enabled network should look like: https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTutorials%2FTraCIPedCrossing.html=04%7C01%7Cmelhem.tawk%40cae.com%7Cfb69b1852d8f498e460108d9a02e3f5c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637716943870512602%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000=iRnjyqgxqWnbSJGLWJwqalRDPC%2BTpS%2B83a1usw4IG9g%3D=0> Am Do., 4. Nov. 2021 um 21:25 Uhr schrieb Adrien Dubedat mailto:adrien.dube...@cae.com>>: 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: Thank you for your help, Adrien De : sumo-dev mailto:sumo-dev-boun...@eclipse.org>> De la part de Jakob Erdmann Envoyé : Wednesday, November 3, 2021 6:11 PM À : sumo developer discussions mailto:sumo-dev@eclipse.org>> Objet : Re: [sumo-dev] Retrieving the type of Junction You can use traci.trafficlight.getControlledLanes and getControlledLinks Lanes with ids of the form :_w_0 are walkingareas Lanes with ids of the form :_c_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 mailto:adrien.dube...@cae.com>>: Hi Jakob, Thank you for your reply, I only just see it now because your emails were considered as
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.dube...@cae.com>: > 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: > > > > incLanes="260842179_0" intLanes="" shape="9549.40,6845.01 9551.22,6845.82"/> > > > > Thank you for your help, > > Adrien > > > > *De :* sumo-dev *De la part de* Jakob > Erdmann > *Envoyé :* Wednesday, November 3, 2021 6:11 PM > *À :* sumo developer discussions > *Objet :* Re: [sumo-dev] Retrieving the type of Junction > > > > You can use traci.trafficlight.getControlledLanes and getControlledLinks > > Lanes with ids of the form :_w_0 are walkingareas > > Lanes with ids of the form :_c_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.dube...@cae.com>: > > 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 *De la part de* Jakob > Erdmann > *Envoyé :* Monday, November 1, 2021 3:04 PM > *À :* sumo developer discussions > *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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTools%2FSumolib.html=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130011942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=YT6q%2BuAoNY67cHzWHzt3m0jFhINewpK5PFL7mD5F%2FI8%3D=0> > ) > > > > 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.dube...@cae.com>: > > 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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FNetworks%2FPlainXML.html%23node_types=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130011942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C100
Re: [sumo-dev] Retrieving the type of Junction
Thank you, I will try that ! De : sumo-dev De la part de Jakob Erdmann Envoyé : Wednesday, November 3, 2021 6:11 PM À : sumo developer discussions Objet : Re: [sumo-dev] Retrieving the type of Junction You can use traci.trafficlight.getControlledLanes and getControlledLinks Lanes with ids of the form :_w_0 are walkingareas Lanes with ids of the form :_c_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 mailto:adrien.dube...@cae.com>>: 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 mailto:sumo-dev-boun...@eclipse.org>> De la part de Jakob Erdmann Envoyé : Monday, November 1, 2021 3:04 PM À : sumo developer discussions mailto:sumo-dev@eclipse.org>> 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<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTools%2FSumolib.html=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130011942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=YT6q%2BuAoNY67cHzWHzt3m0jFhINewpK5PFL7mD5F%2FI8%3D=0>) 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 mailto:adrien.dube...@cae.com>>: 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<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FNetworks%2FPlainXML.html%23node_types=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130011942%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=oAlgYRLcxpfka2pJiOOgRpJJB%2FS%2FEF4YpbJgMdileTU%3D=0>) : 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@eclipse.org<mailto:sumo-dev@eclipse.org> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-dev<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eclipse.org%2Fmailman%2Flistinfo%2Fsumo-dev=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130021889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=pFw6%2BK0O1ODgPoqpJPAmUgDtOblx1xcKRHRcM6GWzQo%3D=0> ___ sumo-dev mailing list sumo-dev@eclipse.org<mailto:sumo-dev@eclipse.org> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-dev<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eclipse.org%2Fmailman%2Flistinfo%2Fsumo-dev=04%7C01%7Cadrien.dubedat%40cae.com%7C46399d3a94bd429ffea408d99f16ee0c%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637715743130021889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=pFw6%2BK0O1ODgPoqpJPAmUgDtOblx1xcKRHRcM6GWzQo%3D=0>
Re: [sumo-dev] Retrieving the type of Junction
You can use traci.trafficlight.getControlledLanes and getControlledLinks Lanes with ids of the form :_w_0 are walkingareas Lanes with ids of the form :_c_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.dube...@cae.com>: > 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 *De la part de* Jakob > Erdmann > *Envoyé :* Monday, November 1, 2021 3:04 PM > *À :* sumo developer discussions > *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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FTools%2FSumolib.html=04%7C01%7Cadrien.dubedat%40cae.com%7Ccf399cc0d6244d5e491e08d99d6a5c83%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637713903277548399%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=dDhgKan6kNz9gDw7cb2igLadfg32BQBqn4yxEI498Dw%3D=0> > ) > > > > 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.dube...@cae.com>: > > 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 > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsumo.dlr.de%2Fdocs%2FNetworks%2FPlainXML.html%23node_types=04%7C01%7Cadrien.dubedat%40cae.com%7Ccf399cc0d6244d5e491e08d99d6a5c83%7C006c1e48e34247e9ab5d0dd9ff89bd96%7C0%7C0%7C637713903277558357%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=SLOPX9liBL3aHYkhM%2BkS4vdpvXGNodrWA5rBtzLVS5c%3D=0>) > : > > > > 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@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-dev > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2
Re: [sumo-dev] Retrieving the type of Junction
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.dube...@cae.com>: > 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) : > > > > 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@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-dev > ___ sumo-dev mailing list sumo-dev@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-dev
[sumo-dev] Retrieving the type of Junction
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) : 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@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-dev