UNOFFICIAL
Thanks Jakob,

I can add a poi using traci.poi.add(poiId, x,y, rgb).
I simulate and can see the poi in the list in the gui (although even if I 
change its size or colour I cannot see it visually on the map), and the 
location is correct.
I can see all the vehicles in the UI.
I can get all vehicles positions using traci.vehcile.getIDList() to confirm 
everything is there.

I try to get results using:

def run():

poiId = “555”
traci.poi.add(poiId, x,y, rgb)
traci.simulation.subscribeContext(poiId, 
traci.constants.CMD_GET_VEHICLE_VARIABLE, 50)

while traci.simulation.getMinExpectedNumber() > 0:
traci.simulationStep()
result = traci.simulation.getContextSubscriptionResults(poiId)

etc..

But result, its always empty.

Cheers
Chris

From: sumo-dev 
<sumo-dev-boun...@eclipse.org<mailto:sumo-dev-boun...@eclipse.org>> On Behalf 
Of Jakob Erdmann
Sent: Friday, 5 March 2021 5:55 PM
To: sumo developer discussions 
<sumo-dev@eclipse.org<mailto:sumo-dev@eclipse.org>>
Subject: Re: [sumo-dev] How to query for vehicle in a radius around a location 
[SEC=UNOFFICIAL]


 ⚠  EXTERNAL EMAIL: Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.  ⚠.
Indirectly, yes. You can define a point-of-interest at the given location 
(traci.poi.add) and then perform a context subscription around that object.

regards,
Jakob

Am Fr., 5. März 2021 um 06:07 Uhr schrieb Shiel, Christian (Contractor) 
<christian.shi...@dst.defence.gov.au<mailto:christian.shi...@dst.defence.gov.au>>:

UNOFFICIAL
Using TraCi is it possible to query for vehicles at a point location with a 
radius?
Cheers
Chris


_______________________________________________
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
_______________________________________________
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

Reply via email to