[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Jaywalking
|
Hi Yokhanan,
Am 29.01.2018 um 20:09 schrieb Beck, Yokhanan Z.:
> However, I have been unable to figure out how to access these neighbors from either traci or sumolib:
>
> net = sumolib.net.readNet(net_file)
> # ...
> ped_road = traci.person.getRoadID(ped_id)
> try:
> edge = net.getEdge(ped_road)
> except KeyError:
> edge = None
> if edge is not None:
> inner_lane = edge.getLane(edge.getLaneNumber() - 1)
>
> At this point I can't actually figure out how to access the "neigh" attribute. Reading through the NetReader class in sumolib/net/__init__.py, it seems that the attribute is not actually read in by sumolib..?
You are right it wasn't. I just fixed that. You may either download a
nightly snapshot tomorrow or apply the changes yourself, see
https://github.com/DLR-TS/sumo/commit/a6752e13a8af44c1e19eebe8e421720a2bfdb7fa
I did not test it, so please speak up if something does not work as
expected.
Best regards,
Michael
Attachment:
signature.asc
Description: OpenPGP digital signature