Driving scenario designer path reference

3 ビュー (過去 30 日間)
Natnael Negash
Natnael Negash 2021 年 4 月 26 日
回答済み: Anjaneyulu Bairi 2025 年 1 月 7 日
Hi all,
Can anyone guide me through exporting and using the waypoints (X,Y) and yaw angle information to simulink (using simin) ) for my vehicle to follow the prescribed reference trajectory. I already have my X, Y and yaw angle informations but i need to give it to my simulink controller as a timeseries reference trrajectory. How can I do that?
I appreaciate your cooperation

回答 (1 件)

Anjaneyulu Bairi
Anjaneyulu Bairi 2025 年 1 月 7 日
Hi,
To export the data from created scenario ,you can follow below steps:
1) Export the scenario to MATLAB function:
  • Click on "Export" button on the top-right and click "MATLAB Function"
  • It will open the MATLAB script related to created scenario.
2) Save the Data:
  • At the end of the script , write the below code
save("data.mat")
  • This will save the all variables in the script to MAT file.
3) Access the variables from MAT file:
  • Load the MAT file.
  • Access the "roadCenters" variable first column which gives 'x' and second column which gives 'y'
x = roadCenters(:, 1);
y = roadCenters(:, 2);
Now, you can pass these variables to "simin" function.
Hope this helps!

カテゴリ

Help Center および File ExchangeAutomated Driving Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by