Simulation can be a time-consuming process between creating test scenarios, running simulations and verifying the results, especially if something goes wrong. Whether it’s a vehicle not behaving as you would expect or some interaction between vehicles causing one or more to stop following the route they are given, it all takes time to solve. Streamlining this process and detecting problems while defining the test scenario, before simulation, is where animation of scenarios helps.
What is animation of scenarios?
Animation of scenarios is a capability within Scenario Editor, which animates a simplified representation of each vehicle, within a test scenario to show what will happen during simulation. This allows for much quicker detection of problems, such as traffic vehicles causing others to stop when not required.
Whereas without animation of scenarios you would need to run a simulation to notice this which would take a noticeably longer amount of time. Animation of scenarios not only supports all vehicles within the vehicle catalogue including cars, buses and aircraft but also pedestrians and cyclists so we can visualise when and what they all do in the scenario.
Why do I need to animate scenarios?
Animation of scenarios runs a simplified simulation of the test scenario finding out what happens to, and the actions taken by each vehicle without running complex features such as sensors or realistic graphics to greatly speed up the run simulation. What it uses is exactly the same traffic controller so the behaviour of the traffic and pedestrians is the same.
This allows for far greater efficiency and less time wasted checking the effect of changes between the test scenario definition and the simulation. This feature is also contained within Scenario Editor so when creating or modifying scenarios using Scenario Editor it is extremely quick and easy to run an animation and get a better understanding of how a simulation of the current scenario will run and what exactly will happen.
How does animation of scenarios work?
When an animation is calculated we first save and pass the current scenario to a traffic plugin, the same plugin that is used in rFpro, which simulates how the traffic vehicles will behave. This plugin then calculates the positions and actions of each vehicle in the test scenario, returning a list of positions and times which we read back into Scenario Editor.
Once we have the results from the simulation back into Scenario Editor we then create a plan view animation of each vehicle superimposed onto the map. Each vehicle is represented by a box defined by its bounding box information.
How do I run an animation?
Running a simulation is very simple and easy. Once you have a scenario you wish to test, simply press the run scenario button and the simulation will be run and results converted into an animation automatically without any user input. Once the animation is ready the user can then control it by playing, pausing, rewinding and changing the time step used by the animation. This animation can then be used to visualise what will happen should you simulate the current scenario, allowing for detection of problems, mistakes or unexpected actions.
Written by: Adam Smedley – Software Developer
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.