Hello,
the leader retrieval requires an additional argument (maximum search
distance).
In the python client, the function vehicle.subscribeLeader() can be used
for that purpose.

regards,
Jakob

2017-02-15 12:08 GMT+01:00 Alberto Díaz <[email protected]>:

> Hi there,
>
> I've been having a problem with the latest stable build of sumo (0.28.0).
> I'm subscribing to some events for a vehicle to read the data, but when I
> subscribe to the VAR_LEADER info, SUMO raises the next:
>
> Error: Storage::readChar(): invalid position
> Quitting (on error).
>
> I've detected this behavior when I subscribe to VAR_LEADER. The rest of
> variables I use work:
>
> traci.vehicle.subscribe(vehicle.id, (
>   # constants.VAR_ACCEL,
>   # constants.VAR_COLOR,
>   # constants.VAR_DECEL,
>   # constants.VAR_SPEED,
>   # constants.VAR_CO2EMISSION,
>   # constants.VAR_COEMISSION,
>   # constants.VAR_HCEMISSION,
>   # constants.VAR_PMXEMISSION,
>   # constants.VAR_NOXEMISSION,
>   # constants.VAR_NOISEEMISSION,
>   # constants.VAR_ANGLE,
>   constants.VAR_LEADER,  # ERROR HERE!
>   # constants.VAR_ROAD_ID,
>   # constants.VAR_LANE_ID,
>   # constants.VAR_SIGNALS,
>   # constants.VAR_FUELCONSUMPTION,
>   # constants.VAR_ELECTRICITYCONSUMPTION,
>   # constants.VAR_STOPSTATE,
>   # constants.VAR_SLOPE,
>   # constants.VAR_MINGAP,
>   # constants.VAR_PERSON_NUMBER,
> ))
>
> Happy Tuesday!
>
> Alberto
> ------------------------------------------------------------
> ------------------
> 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

Reply via email to