Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Wrong return value of traci.vehicle.getDrivingDistance if vehicle is on node - workaround

A quick workaround to my own issue:
measuring the distance to at least 1m inside edge2 will retuen "reasonable" results (who cares about 1m), so for example

distance = traci.vehicle.getDrivingDistance(vehicleID, edge2ID, 1.0)

will work, even if the vehicle is on the node before edge2.

Best wishes,
Joerg

On 31/10/17 11:12, Joerg Schweizer via sumo-user wrote:
Hello,
I noticed a strange return value from  getDrivingDistance in the following situation:

---edge1---| node |---edge2---

if a vehicle is right on the node (on some internal edge) and I call

distance = traci.vehicle.getDrivingDistance(vehicleID, edge2ID, 0.0)

then the distance value is not close to zero  (as I would expect),
but returns approximately the length of edge1.

(I tried this with version r26440 and  older 0.30)

Kind regards,
JOerg

------------------------------------------------------------------------------
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
sumo-user@xxxxxxxxxxxxxxxxxxxxx
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
sumo-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sumo-user

Back to the top