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

Dear Joerg,
thank you for reporting this. It has been fixed in
v0_31_0-843-g5aa8c2c
(which is our new github way of referencing commits and means 843 commits after release of 0.31.0 with full hash:
https://github.com/DLR-TS/sumo/commit/5aa8c2ca2e839fd3853f9db60304aeae27a7d393 )
regards,
Jakob

2017-10-31 11:54 GMT+01:00 Joerg Schweizer via sumo-user <sumo-user@xxxxxxxxxxxxxxxxxxxxx>:
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@xxxxxxxxxxxxxxxxxxxxt
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@xxxxxxxxxxxxxxxxxxxxt
https://lists.sourceforge.net/lists/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


Back to the top