“chasePlot” do't show ego vhicle?
3 views (last 30 days)
why the following code did not show egovhicle? I try to set chasePlot propertites ViewLocation to larger than default,but it still can't show egovhicle? how can i fixt it?（run in R2022a）
scenario = drivingScenario("SampleTime",0.01,"StopTime",3);
roadNetwork(scenario,"OpenStreetMap","my_openstreetmap_export.xml");% openstreetmap xml file see attachment
egovhicle = vehicle(scenario,ClassID=1);
egopath = [-133,-388,0;-98,-266,0];
egospeed = 30;
Adam Danz on 19 Jul 2022
Edited: Adam Danz on 19 Jul 2022
chasePlot is outside my area of expertise but I did some digging found that if you change the ViewLocation of the scene then your vehicle comes into view.
The default ViewLocation is behind the actor's center at 2.5x the length of the actor. Your vehicle length is 4.7 but for whatever reason, the viewLocation needs to be back even further. This value worked.
This may indicate that there's something not right with your scene or vehicle properties or that there is a bug. If you think there's a bug, please contact tech support and supply your code and data file. Contact Us - MATLAB & Simulink
It may be helpful to trouble shoot by plotting the scene with a top-down view
% Look at a bird's eye view to see where the vehicle is
% It's a large scene which makes the vehicle small, zoom in to the vehicle