What changed in the SmoothTrajectory function in matlab 2025b?

조회 수: 12 (최근 30일)
Luis Arturo Torres
Luis Arturo Torres 2025년 10월 14일 14:47
I had this script to export a series of points to the driving scenario in the Automated Driving Toolbox and it was working in Matlab 2024b.
Now I updated to 2025b and this stopped working. I read in the docs. that maybe the Jerk, which is a new parameter by default in 0.6, coud be the reason. I tried with a big number of jerk but it is still failing.
The error message only says that there is an error in the function smoothTrajectory and nothing else.
The out.VehiclePose format is [X,Y, Yaw].
Do you guys have some suggestions?
load('waypoints.mat'); % It must contain a variable with the way-point list.
waypoints = racetrackwaypoints(:, 1:2); % Only X, Y
velocities = racetrackwaypoints(:, 3); % Velocity on each point.
realVehiclePose = out.VehiclePose;
% Create the scenario.
scenario = drivingScenario('SampleTime',0.1','StopTime',60);
roadCenters = [waypoints, zeros(size(waypoints(:,1)))]; % Use the loaded way-points
% Add the read center to the scenario.
cr = road(scenario, roadCenters, 'Lanes', lanespec(3)); % Define lanes explicitly
% Add a vehicle.
veh = vehicle(scenario, ClassID=1,PlotColor='red',Name='EgoVehicle');
%roadActor = actor(scenario, 'ClassID', 3, 'Position', [0,0,0]); % Static road object
% Define the vehicle trajectory with the way-points and speeds.
smoothTrajectory(veh, realVehiclePose);
drivingScenarioDesigner(scenario); %this is to open the drivingScenarioDesigner

답변 (0개)

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by