plexe-pyapi icon indicating copy to clipboard operation
plexe-pyapi copied to clipboard

Platoon at signalized intersection

Open HappyDay-design opened this issue 4 years ago • 18 comments

Hello

I created some platoons at the signalized intersection.

And I saw that the platoons don't stop at red lights. only the leader vehicles stop. Could you show me how to fix this? Thanks

image

image

HappyDay-design avatar Jan 12 '22 05:01 HappyDay-design

this is not possible without further ado. The car following model does not handle any traffic lights or regulations such as "right before left" or similar. You can work around this by instantiating the leader as a "DRIVER" and not as an "ACC". In case of a DRIVER, the Krauss model is used and traffic lights are considered. However, you will probably get further issues as the desired acceleration (as required by CACC) cannot be calculated and transmitted to the followers.

thardes2 avatar Jan 12 '22 19:01 thardes2

this is not possible without further ado. The car following model does not handle any traffic lights or regulations such as "right before left" or similar. You can work around this by instantiating the leader as a "DRIVER" and not as an "ACC". In case of a DRIVER, the Krauss model is used and traffic lights are considered. However, you will probably get further issues as the desired acceleration (as required by CACC) cannot be calculated and transmitted to the followers.

Thank you for replying to me. I changed the setSpeedMode to 31 instead of 0. traci.vehicle.setSpeedMode(vid, 31)

But only the leader car stopped abruptly, and the following cars kept going through the front car. Do you know a way to make the following cars also stop when the leader car stops? Thanks

image giphy

And you can see, the simulator is lagged when the leader of platoon hits the red line

HappyDay-design avatar Jan 22 '22 02:01 HappyDay-design

But only the leader car stopped abruptly, and the following cars kept going through the front car. Do you know a way to make the following cars also stop when the leader car stops? Thanks

Hey, Have you solved this problem?

Q-max007 avatar May 08 '22 10:05 Q-max007

But only the leader car stopped abruptly, and the following cars kept going through the front car. Do you know a way to make the following cars also stop when the leader car stops? Thanks

I guess the issue here is that, by changing the speed mode, SUMO forces the vehicle to stop, but the vehicle itself still computes an ACC desired acceleration which is shared with the others. As SUMO slows down the vehicles, the ACC algorithm will compute a positive acceleration, because it wants to speed it up to reach the desired speed. So the other vehicles believe the leader will accelerate, while it is actually slowing down. But to confirm this, you should do some debugging by printing the values exchanged between the vehicles.

michele-segata avatar May 20 '22 10:05 michele-segata

thank you for replying to me. But how to print the value exchanged between vehicles?

I only know the position, speed and acceleration of vehicles over times

HappyDay-design avatar May 21 '22 05:05 HappyDay-design

You first have to use the right controller. This would be either "CACC" or "Ploeg". ACC is not working since it is not suitable for platooning.

In case you use one of the two, the vehicle still relies on the 'controller acceleration', which cannot be provided by a human driven vehicle. This needs to be changed in the code, e.g. you use the real acceleration for the controller acceleration as well. This will very likely not keep the platoon string stable. Thus you somehow need to change the protocol for the beacon exchange or the properties of the controller. This is up to your scenario and your overall conditions.

thardes2 avatar May 21 '22 08:05 thardes2

You first have to use the right controller. This would be either "CACC" or "Ploeg". ACC is not working since it is not suitable for platooning.

In case you use one of the two, the vehicle still relies on the 'controller acceleration', which cannot be provided by a human driven vehicle. This needs to be changed in the code, e.g. you use the real acceleration for the controller acceleration as well. This will very likely not keep the platoon string stable. Thus you somehow need to change the protocol for the beacon exchange or the properties of the controller. This is up to your scenario and your overall conditions.

Thank you for replying to me. I modified Segata's model by adding traffic signals to the model. I would like to check the behavior of platoons when approaching the red signal. I understand that I have to change the protocol but I do not know how to change it. Could you provide examples about Plexe API with traffic signals so I can follow it? Thanks

My model here

HappyDay-design avatar May 21 '22 13:05 HappyDay-design

Sorry for my late reply. What do you mean by

I would like to check the behavior of platoons when approaching the red signal. I understand that I have to change the protocol but I do not know how to change it.

It is not really clear to me what you want to do.

michele-segata avatar Jun 20 '22 13:06 michele-segata

Hi All, Even I'm facing the same issue, while vehicle reach the Junction/intersection... Vehicles are crossing the signal irrespective of phase of signal colour. I have tried to change the driver controller as well from IDM, ACC and CACC but none of them were working fine. Could you please solve this or provide any solution that could help in solving this issue. image

prasuka4 avatar Jun 28 '22 03:06 prasuka4

I guess the only way is to use the plexe::DRIVER controller in MSCFModel_CC for the leader, but then you still need to modify the car following model to be able to provide the followers with the required acceleration they need for control.

michele-segata avatar Sep 29 '22 18:09 michele-segata

@TrinhTuanHung2021 @michele-segata @prasuka4 @Q-max007 hi all, I'm facing the same issue, vehicles do not stop at red lights at signalized intersections, have you solved this problem?

way-thu avatar Aug 22 '23 09:08 way-thu

@TrinhTuanHung2021 @michele-segata @prasuka4 @Q-max007 hi all, I'm facing the same issue, vehicles do not stop at red lights at signalized intersections, have you solved this problem?

It related to the deceleration of vehicles in the platoon. If the leader stops suddenly, the following cars can not stop in time because the gap is too small. So I set the deceleration to be high to stop the following cars immediately.

HappyDay-design avatar Aug 23 '23 01:08 HappyDay-design

The initial approach suggested by @michele-segata is to utilize the plexe:: DRIVER model. This will result in a scenario utilizing the actual acceleration rather than the desired acceleration. To resolve this issue, begin by setting the *.node[*].scenario.useControllerAcceleration value in the omnetpp.ini file to false.

This gives you a scenario where the actual acceleration is used instead of the desired one. As a consequence, this leads to a situation where the vehicles behind the leader in the platoon cannot respond "immediately" to the leader's actions, which could result in collisions. One potential solution is to increase the distance between the vehicles in the platoon.

Yet, by using the actual acceleration instead of the desired one, you cannot achieve the same 'performance' as in the ACC controlled scenario, but it will allow for successful stopping at red traffic lights.

thardes2 avatar Aug 23 '23 06:08 thardes2

The initial approach suggested by @michele-segata is to utilize the plexe:: DRIVER model. This will result in a scenario utilizing the actual acceleration rather than the desired acceleration. To resolve this issue, begin by setting the *.node[*].scenario.useControllerAcceleration value in the omnetpp.ini file to false.

This gives you a scenario where the actual acceleration is used instead of the desired one. As a consequence, this leads to a situation where the vehicles behind the leader in the platoon cannot respond "immediately" to the leader's actions, which could result in collisions. One potential solution is to increase the distance between the vehicles in the platoon.

Yet, by using the actual acceleration instead of the desired one, you cannot achieve the same 'performance' as in the ACC controlled scenario, but it will allow for successful stopping at red traffic lights.

much thanks for your reply, i will try

way-thu avatar Aug 24 '23 07:08 way-thu

@TrinhTuanHung2021 @michele-segata @prasuka4 @Q-max007 hi all, I'm facing the same issue, vehicles do not stop at red lights at signalized intersections, have you solved this problem?

It related to the deceleration of vehicles in the platoon. If the leader stops suddenly, the following cars can not stop in time because the gap is too small. So I set the deceleration to be high to stop the following cars immediately.

much thanks, Can we exchange a wechat or something for better communication? i saw u on github so many times

way-thu avatar Aug 24 '23 07:08 way-thu

Sorry - I mixed up the projects... The approach would work for the OMNeT implementation.

thardes2 avatar Aug 25 '23 13:08 thardes2

As I wrote in my answer above, you should use the Plexe::DRIVER controller for the leader and change the SUMO code so that you can fetch the acceleration of the human driver model via the API. Then you have to share such value with the followers in the platoon.

michele-segata avatar Aug 28 '23 06:08 michele-segata