Dear Andres ,
thank you for your reply. The getLeader function works, but I still have a
problem, could you help me?
I set for example the detection range as 100
[vehicle_ID, range]=traci.vehicle.getLeader('ego',100)
As a result, I got many ranges, which is much larger than 100. I tried to make
the detection range even smaller by setting:
[vehicle_ID, range]=traci.vehicle.getLeader('ego',10)
But I still get many ranges even greater than 300. Is there any minimum value
for detection range?
Could the function also return the correct value even if the leading vehicle
and the following vehicle are on different edges, for example, there is a
junction or a node between the current position of leading vehicle and
following vehicle?
Thank you in advance.
Best regards
Yiqun
________________________________
From: Andres Felipe Acosta Gil <[email protected]>
Sent: 15 June 2017 17:23
To: Jakob Erdmann; [email protected]
Cc: Yiqun Xia
Subject: Re: [sumo-user] How to extract the Time-to-Collision
Dear Yiqun
For obtaining the leader ID and the distance you have to change your command as
follows:
[leaderID, range]=traci.vehicle.getLeader('ego',1000)
Best Regards.
2017-06-13 8:22 GMT-05:00 Jakob Erdmann
<[email protected]<mailto:[email protected]>>:
Hello,
i'm not sure if the getLeader function is fully implemented in traci4matlab. It
should return two values (string and float).
Maybe Andres (the developer of traci4matlab) can help with this.
regards,
Jakob
2017-06-13 13:13 GMT+02:00 Yiqun Xia
<[email protected]<mailto:[email protected]>>:
Hi Jakob,
thank you for your advice. I have tried the following code in MatLab, but only
get the vehicle ID, there is no distance data at all, could you tell me how
could I get the distance between the ego vehicle and the leading vehicle?
range=traci.vehicle.getLeader('ego',1000)
what I got in command window is only:
range =
flow1.11
range =
flow3.7
range =
flow3.7
....
I could not find any distance.
Mit freundlichen Grüßen
Yiqun Xia
________________________________
From: Jakob Erdmann
<[email protected]<mailto:[email protected]>>
Sent: 12 June 2017 15:40
To: Yiqun Xia
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [sumo-user] How to extract the Time-to-Collision
Hello,
using traci you can call vehicle.getLeader() which gives the leader vehicle and
the distance (see
http://sumo.dlr.de/wiki/TraCI/Vehicle_Value_Retrieval#Extended_retrieval_messages).
TraCI/Vehicle Value Retrieval -
Sumo<http://sumo.dlr.de/wiki/TraCI/Vehicle_Value_Retrieval#Extended_retrieval_messages>
sumo.dlr.de<http://sumo.dlr.de>
Overview Retrievable Vehicle Variables; Variable ValueType Description Python
Method; id list (0x00) stringList Returns a list of ids of all vehicles
currently ...
regards,
Jakob
2017-06-12 15:18 GMT+02:00 Yiqun Xia
<[email protected]<mailto:[email protected]>>:
Hi there,
I'm using a self-defined map, which consists of many edges with different
number of lanes. Could you give me some advice on how to extract the
time-to-collison data regarding one specific ego vehicle. Since the edges are
usually not straigt lines, and the lane IDs are also always changing, it's not
easy to get know the leading vehicle ID regarding the ego-vehicle at each time
step (see figure below). Is there any direct and easier way to extract the
time-to-collison or the range data? I'm thinking about using the x-y coordinate
information to get the distance, but then it's still unknown whether the two
vehicles are on the same lane or not, since the lane ID changes with the number
of lanes. Thank you in advance.
[cid:073facc4-9982-4dcc-bcec-0ad3e20f40d3]
Best regards
Yiqun
Mit freundlichen Grüßen
Yiqun
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/sumo-user
--
Andres Felipe Acosta Gil, MSc student - Software developer
Universidad Nacional de Colombia - Medellín
Facultad de Minas
Tel: +57 (4) 4255092
Institutional e-mail: [email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user