Can traffic lights change while running the simulation in Scenario Editing mode? How?
2 次查看(过去 30 天)
显示 更早的评论
In Scene Editing mode, I have already created a scene which includes a four-way intersection and traffic signals. I used the signal tool and moved the signal phase to the first one. The traffic lights turn out to be red in left and green in right as you can see in the following figure.
Then I kept the signal phase in the first one and got into the Scenario Editing mode through clicking the mode selection button. I added two vehicles to the scenario together with a man as pedestrian. The vehicles are controlled by setting actions in Logic Editor and the pedestrian is controlled by waypoints.
Something happened which has puzzled me a lot. I found that when I was running the scenario, both the vehicles and pedestrian can move as the way I want, but the traffic lights didn't change at all and kept showing red in left and green in right.
At first I wanted to find a way to make the vehicles recognize and follow the changes of the traffic lights. Then I found it hard to achieve because the RoadRunner hasn't supported this feature by far.
I have no choice but to make the vehicles synchronize with the traffic lights through setting time for vehicles and traffic lights separately. I know how to set the time of the vehicles, but I can't find a way to make the traffic lights change as the signal phases shown in Scene Editing mode while the simulation scenario is running in Scenario Editing mode.
Can someone give me a hand? I highly appreciate it.
0 个评论
回答(1 个)
Sai Pavan
2024-1-23
Hello,
I understand that you want to make the traffic lights change with respect to signal phases in RoadRunner.
The signal tool enables us to change the signal phases of the junctions and also make changes to the signal properties such as signal variant and states. These properties can be accessed by selecting the anchor of each traffic signal pole within the prop assembly after selecting the signal tool. The traffic signal colors can be changed by configuring the colors in each of the red, green and yellow intervals.
Please refer to the below screenshot of the RoadRunner environment showing the appropriate attribute changes made to the traffic signal.
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulate RoadRunner Scenarios with MATLAB and Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!