Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Pedestrain crossing IDs, Pedestrian XY coordinates information using TraCI

Hello,
It's not straight- forward to retrieve this information.
Option 1:
- use context subscription to get all pedestrians around the vehicle in a radius. Then do your own filtering

Option 2:
- retrieve the list of lanes that the vehicle will drive using traci.vehicle.getBestLanes(vehID)[traci.vehicle.getLaneIndex(vehID)][-1]
- retrieve the internal lanes that the vehicle will drive using traci.lane.getLinks(laneID, True) for each of the upcoming lanes
   if there are multiple connections from a lane, you need to pick the connection that targets the subsequent lane the vehicle wants to drive
   (target lane and internal lane are all in the resulting list of tuples)
- for each of the upcoming internal lanes, call traci.lane.getInternalFoes. This will return all internal lanes which are in conflict with the vehicle
- from these foes retrieve the ones that have '_c' in their name. These are crossings
- for each of the crossings you can get the pedestrians using traci.edge.getLastStepPersonIDs(traci.lane.getEdgeID(crossingID))
- for each person you can get its position using traci.person.getPosition

regards,
Jakob

Am Di., 3. Dez. 2019 um 11:51 Uhr schrieb Mohsin Memon <mohsin.ldce@xxxxxxxxx>:
Hello All,
I have developed a scenario in SUMO, in which, the pedestrians have been
generated randomly using randomtrips.py and are moving along the sidewalks
and are crossing a priority zebra crossing. My ego-vehicle in SUMO halts in
front of the zebra crossing after detecting walking pedestrians.
I would like to obtain the following information using TraCI,
1)      Immediate zebra crossing ID
2)      Pedestrian ID’s walking on that corresponding crossing
3)      Pedestrian X,Y co-ordinates and velocity
I have tried the functions mentioned in this example, but was unsuccessful
in obtaining the above
information(https://sumo.dlr.de/docs/Tutorials/TraCIPedCrossing.html).
I am using traci4matlab as my interface with SUMO. I would be grateful if
you could please suggest me which functions would be appropriate to be used
to solve my problem?


Regards,
Mohsin Memon



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top