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 ). regards, Jakob
2017-06-12 15:18 GMT+02:00 Yiqun Xia <[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] > https://lists.sourceforge.net/lists/listinfo/sumo-user > > ------------------------------------------------------------------------------ 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
