Issues with OpenScenario() and trying to run a roadrunner simulation

조회 수: 11 (최근 30일)
KWASI DEBRAH-PINAMANG
KWASI DEBRAH-PINAMANG 2023년 10월 14일
댓글: Fauzia 2023년 11월 16일
I get the following error when trying to run my code:
Error using matlabshared.roadrunner.RoadRunnerService/openScenarioImpl
RoadRunner method execution failed. Details:
This is not a valid project path. No 'Project' subdirectory exists at that location. (Path: C:/Program Files/RoadRunner
R2023b/bin/win64/AssetsInstall/Base Asset Scenes/../)
Error in matlabshared.roadrunner.RoadRunnerService/openScenario (line 32)
rrService.openScenarioImpl(lsr);
Error in roadrunner/openScenario (line 29)
openScenario( obj.Application, varargin{ : } );
Error in VehicleControlDemo (line 10)
openScenario(rrApp, "roadrunner_demoscene.rrscenario");
For reference, the file name is VehicleControlDemo.m, and the project contains a Scenes and Scenarios folder with the corresponding scenes/scenarios.
RRInstallationFolder = "C:\Program Files\RoadRunner " + matlabRelease.Release + "\bin\win64";
s = settings;
s.roadrunner.application.InstallationFolder.PersonalValue = RRInstallationFolder;
s.roadrunner.application.InstallationFolder.TemporaryValue = RRInstallationFolder;
rrApp = roadrunner("C:\Users\kwasi\Documents\RoadRunner Demo Project");
openScene(rrApp, 'ScenarioBasic.rrscene');
openScenario(rrApp, "roadrunner_demoscene.rrscenario");
rrSim = createSimulation(rrApp);
set(rrSim, 'SimulationCommand','Start');

답변 (1개)

Narvik
Narvik 2023년 10월 25일
Hi,
I understand that you are facing an issue while trying to run a RoadRunner simulation. The error message may be caused by missing auxiliary RoadRunner project files.
This issue can be resolved by creating a new RoadRunner project and adding all the required files to the project. The following steps might resolve your issue:
  1. Open the RoadRunner app and create a new project using the ‘New Project’ button.
  2. Check the sample scenes and scenarios options if required.
  3. After creating the project, navigate to the ‘Scenes’ folder and add your scene files (files with ‘.rrscene’ extension).
  4. Similarly, add the scenario files (files with ‘.rrscenario’ extension) to the ‘Scenarios’ folder.
  5. Add any other configuration files to the ‘Project’ folder.
You should now be able to run the RoadRunner simulation.
You can also refer to the ‘Set Up RoadRunner Scenario' section in the following documentation link:
Hope this helps!

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by