文章目錄
1. 開環場景
1.1 場景的建立與使用
drivingScenarioDesigner
輸入命令,打開場景編輯器
隨便加入一些道路和車輛
加入車輛行駛路徑點,並加入一臺camera
導出到SIMULINK,自動生成slx與mat文件
SCENARIO模塊輸出的車輛數據格式如下,可用Bus模塊分解,也可作爲結構體使用matlab function 解碼
1.2 使用現有場景
如圖所示,matlab附帶衆多標準化的試驗場景
2. 閉環場景
與開環場景類似,
SIMULINK中設置如下
數據打包如下
function egoActor = packEgo(pos,vel,yaw,yawRate)
% Pack ego information into a single ego actor bus
%
% Imoprtant note:
% Output is a bus of type BusActorsActors. This is the same bus used by the
% Scenario Reader to output an individual actor. If you change the
% output bus name of Scenario Reader, change the output bus name here
% as well by clicking on 'Edit Data' in the menu above.
egoActor = struct(...
'ActorID',2,...
'Position', [pos(1) pos(2) 0], ...
'Velocity', [vel(1) vel(2) 0], ...
'Roll', 0, ...
'Pitch', 0, ...
'Yaw', yaw, ...
'AngularVelocity', [0 0 yawRate]);
3.使用UNREAL 4引擎進行SCENARIO SIMULATION
參照MATLAB2019B中自帶的例子
4.一些參考資料和附加說明
4.1 DRIVING SCENARIO DESIGNER
MATLAB/Simulink自動駕駛工具箱之Driving Scenario Designer
https://zhuanlan.zhihu.com/p/109939394
4.2 matlab2020的自動駕駛工具箱更新了什麼
參考:MATLAB2020a自動駕駛工具箱有哪些新特性?
https://zhuanlan.zhihu.com/p/115166496
(1)增加了幾個自動駕駛demo——高速公路車道跟隨、高速公路車道變更和交通信號協同系統
(2)Ground Truth Labeler可以同時標註代表同一場景的多個信號
(3)增加了激光雷達傳感器模型
(4)Driving Scenario Designer增加了3D顯示
(5)提供了幾個預構建場景,這幾個預構建場景在仿真運行中打通了Driving Scenario Designer和Unreal Engine
這幾個場景包括CurvedRoad、CurvedRoad、StraightRoad、USCityBlock、USHighway。