No. There is no direct command for that. The recommend approach is to obtain the leader speed with traci.vehicle.getSpeed(leaderID). Alternatively, you could use a filtered context subscription for speed with addSubscriptionFilterCFManeuver but this would not give you the lengthwise gap.
regards, Jakob Am Di., 22. Juni 2021 um 14:27 Uhr schrieb Francesco Zambolin < [email protected]>: > Thanks Jakob, > > > > I‘m already using traci.vehicle.getLeader (or its subscription), but this > command allows to get only the distance information between ego-vehicle and > leader-vehicle. Is there no TraCI command to directly obtain the leader > vehicle speed starting from the ego-vehicle ID? > > > > Thanks again, > > > > Francesco > > > > *Da: *Jakob Erdmann <[email protected]> > *Inviato: *martedì 22 giugno 2021 07:44 > *A: *Sumo project User discussions <[email protected]> > *Oggetto: *Re: [sumo-user] TraCI4Matlab: commands to obtain the > Leader-Vehicleposition and speed > > > > You can use traci.vehicle.getLeader. > > > > For increased efficiency (when not using libsumo), see > > traci.vehicle.subscribeLeader > > https://sumo.dlr.de/docs/TraCI/Object_Variable_Subscription.html > > > https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#subscriptions > > > > regards, > > Jakob > > > > Am Mo., 21. Juni 2021 um 22:12 Uhr schrieb Francesco Zambolin < > [email protected]>: > > Hi everyone, > > > > > > I’m using TraCI4Matlab to implement a driver model (IDM) which works in > real time on SUMO simulation by updating, at each time-step, the > Ego-vehicle speed. > > > > In this regard, I’m looking for TraCI commands that give access to the > position and speed of the Leader-vehicle, which changes during the > simulation. > > > > At the moment, I’m trying to use TraCI commands of the “vehicle” domain > but I have not found anything for my purpose. > > > > I would be very grateful for suggestions. > > > > > > Waiting for your kind reply, I appreciate the opportunity to extend > cordial greetings. > > > > Francesco. > > _______________________________________________ > sumo-user mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user > > > _______________________________________________ > sumo-user mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
