The problem about restart simulation in stopped event

After generated the path of robot I will start simulation in code. When the simulation end, it will enter stopped event where I will check something such as collision detector and maybe restart the simulation derectly. But it is seems invalid that restarts simulation in the event. How to solve it? Or are there some ways to restart the simulation after the event?

Maybe just schedule the restart using WPF Dispatcher?

1 Like