s = drivingScenario('SampleTime', 0.05);
% Add road
roadCenters = [0 0; 10 0; 40 20; 50 20]; % m
roadWidth = 5; % m
road(s, roadCenters, roadWidth)
plot(s)
% Add vehicle
egoCar = vehicle(s);
waypoints = roadCenters; % m
speed = 13.89; % m/s
trajectory(egoCar, waypoints, speed);
% Play scenario
while advance(s)
pause(s.SampleTime);
end
Open the Driving Scenario Designer App
MATLAB Toolstrip: On the Apps tab, under Automotive, click the app icon.
MATLAB command prompt: Enter drivingScenarioDesigner
.
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删