Matlab/Simulink-Roadrunner Co-Simulation Problem with own Scenario
Show older comments
Dear all,
I am using the Matlab/Simulink Roadrunner co-simulation example:
“AutonomousEmergencyBrakingWithRoadRunnerScenarioExample”:
https://de.mathworks.com/help/driving/ug/autonomous-emergency-braking-with-roadrunner-scenario.html
with tool versions Matlab/Simulink R2024b and Roadrunner R2026a.
I have created my own scenario, which I want to use in the same setup instead of the original scenario. Last year, I already had similar problems with self-created scenarios; at that time I could only solve the problem by modifying an existing working scenario, rather than creating a completely new one.
After starting the simulation, I get the following message in the Matlab Command Window after a few seconds:
Connection status: 1
Connected to RoadRunner Scenario server on localhost:39466, with client id {1cc969c8-ddd1-40c1-a826-de75d4297f7e}
Unfortunately, the simulation with the new scenario only runs up to the actual start of the co-simulation, after which it seems there’s no real data exchange between the tools (Roadrunner doesn’t start the simulation at all). And after a while I get in the Roadrunner output window:
> ERROR: Client 'MATLAB_Client' (id: {3ae6a6ac-4d8d-4093-80d6-44e462f22a80}) timed out on event SimulationStepEvent.
> ERROR: Simulation failed:
At the same time, Matlab/Simulink crashes.
What debugging options do I have for this problem?
If needed I can provide the files or the code.
Best regards,
Hans-Werner Groh
2 Comments
Purvaja
on 3 Jul 2026 at 10:52
Hey Hans,
The "SimulationStepEvent" timeout indicates that the co-simulation is unable to progress after the connection between MATLAB/Simulink and RoadRunner has been established. Assuming the original "Autonomous Emergency Braking with RoadRunner Scenario" example runs successfully, there may be some differences between your custom scenario and the example setup that are worth checking.
As a starting point, I'd recommend comparing your custom scenario with the example and reviewing the RoadRunner Scenario co-simulation workflow described in the following documentation:
- Autonomous Emergency Braking with RoadRunner Scenario: https://www.mathworks.com/help/driving/ug/autonomous-emergency-braking-with-roadrunner-scenario.html
- Simulate RoadRunner Scenarios with Actors Modeled in Simulink: https://www.mathworks.com/help/driving/ug/co-simulate-roadrunner-with-agents-modeled-in-simulink.html
- RoadRunner Scenario block reference: https://www.mathworks.com/help/driving/ref/roadrunnerscenario.html
There is also a similar MATLAB Answers discussion that may be helpful:
If you're still seeing the same behavior after reviewing the above, I'd recommend reaching out to MathWorks Technical Support:
Hans-Werner Groh
on 5 Jul 2026 at 14:27
Answers (0)
Categories
Find more on MATLAB Functions for Scenarios in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!