How to fix the "class does not support code generation" problem in UAV sceanrio simulation in simulink

6 views (last 30 days)
Hello everybody, I am trying ti modify the model from UAV Obstacle Avoidance in Simulink with the model from Control and Simulate Multiple Warehouse Robots and when I ran the simulation and this error shown
Unable to update models referenced by 'UAV_multiRobot'.
Caused by:
Simulink detected an error
'The 'uav.sluav.internal.system.UAVScenarioConfiguration' class does not support code
generation.'.
The error occurred for MATLAB System block 'UAV_robotController/UAV Scenario
Configuration/Scenario'.
To prevent this error, modify the System object to avoid code that does not support code
generation.

Answers (1)

Nivedita
Nivedita on 30 Aug 2023
Hi Setthivadee!
I understand that you are facing the error 'uav.sluav.internal.system.UAVScenarioConfiguration' class does not support code generation when you are trying to update your models referenced by ‘UAV_multiRobot’.
  • You are facing this error because the “uavScenario” function available under the “Scenario Simulation” category of the UAV toolbox does not have the extended capability of C/C++ code generation. You can find more about this in the following documentation: Scenario Simulation — Functions (mathworks.com)
  • I would suggest you to check under the mask of the “UAV Scenario Configuration” block to ensure that the “Simulate Using” is configured as “Interpreted execution”. You can also check this by selecting the block and then executing the following line of code from the command window:
get_param([gcb,'/Scenario'],'SimulateUsing')
  • If the setting has been somehow changed to “Code generation”, it could be the possible cause of the error you are encountering.
  • In case the none of the above steps resolves the issue, I would request you to send the reproduction files for further inspection.
I hope this helps!

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!