Closed zhaotuo0815 closed 1 year ago
The problem here might be that, when the leader of a platoon leaves the scenario, the other vehicles cannot find it anymore. As there is no network simulator in the Plexe Python APIs, communication is simply done by copying information of some specific vehicles to some other ones (e.g., passing leader speed and acceleration to all the followers). In the braking scenario, this is done here. Inside the communicate
method, the code fetches data about vehicles from SUMO (e.g., here). I fear that, if the vehicle leaves the simulation and you try to fetch data about that, SUMO might crash.
A solution in this case would be to first check whether a vehicle exist and fetch data about that only if it is found. You could use the getIDList TraCI method for that.
Thank you very much for your reply, I will try it according to your method.
------------------ 原始邮件 ------------------ 发件人: "michele-segata/plexe-pyapi" @.>; 发送时间: 2022年7月28日(星期四) 晚上10:45 @.>; @.**@.>; 主题: Re: [michele-segata/plexe-pyapi] platoon vehicles leave the network will return error (Issue #12)
The problem here might be that, when the leader of a platoon leaves the scenario, the other vehicles cannot find it anymore. As there is no network simulator in the Plexe Python APIs, communication is simply done by copying information of some specific vehicles to some other ones (e.g., passing leader speed and acceleration to all the followers). In the braking scenario, this is done here. Inside the communicate method, the code fetches data about vehicles from SUMO (e.g., here). I fear that, if the vehicle leaves the simulation and you try to fetch data about that, SUMO might crash. A solution in this case would be to first check whether a vehicle exist and fetch data about that only if it is found. You could use the getIDList TraCI method for that.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hello developer, when the platoon vehicles I generate is going to leave the road network, it will report an error(as shown in the photo), but the simulation time has not reached the final simulation time I set.