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?
waypoints = racetrackwaypoints(:, 1:2);
velocities = racetrackwaypoints(:, 3);
realVehiclePose = out.VehiclePose;
scenario = drivingScenario('SampleTime',0.1','StopTime',60);
roadCenters = [waypoints, zeros(size(waypoints(:,1)))];
cr = road(scenario, roadCenters, 'Lanes', lanespec(3));
veh = vehicle(scenario, ClassID=1,PlotColor='red',Name='EgoVehicle');
smoothTrajectory(veh, realVehiclePose);
drivingScenarioDesigner(scenario);