How can I export an actor trajectory from a RoadRunner simulation by using the API?
이전 댓글 표시
I want to export the trajectory of the Sedan actor from a RoadRunner scenario by using the RoadRunner API. I used the following workflow:
rrApp = roadrunner(projectFolder);
rrApi = roadrunnerAPI(rrApp);
openScene(rrApp, sceneFile);
openScenario(rrApp, scenarioFile);
rrSim = createSimulation(rrApp);
set(rrSim, "MaxSimulationTime", 10);
set(rrSim, "SimulationCommand", "Start");
pause(15)
exportActorTrajectoryToCSV(rrApp, 'FolderPath', outputFolderPath, 'FolderName', outputFolderName);
The simulation runs, but the export fails with this error:
Unable to export CSV file. Set the value of 'enable_runtime_log' field of the 'SimulateScenario' method to 'true' to enable simulation logging.
I also tried enabling logging through simulateScenario(rrApp,'EnableLogging',true), but that changed the workflow and appeared to interfere with the "MaxSimulationTime" in the "set" command.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Functions for Scenarios에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!