Cannot add 'custom' model with addMesh() as the only two options are 'polygon' and 'cylinder'
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
for my dissertation I need to place custom models in a uav scenario to collect LIDAR data. In the documentation it says that it is possible to add custom models by supplying the vertice list and the vertice connectivity list using addMesh(scene,'custom',{vertices,faces}) but when running the code an error pops up saying
Expected type to match one of these values:
'polygon', 'cylinder'
The input, 'custom', did not match any of the valid values.
Does the package not support custom models anymore? I checked the code and it only includes the two options mentioned above, is there a way to get an older version of the code that allows custom models?
Thank you.
2 件のコメント
Jianxin Sun
2021 年 12 月 2 日
Hi, Gianluca,
What MATLAB version are you using? "custom" option is added in R2021a.
Thanks,
Jianxin
採用された回答
Jianxin Sun
2023 年 4 月 3 日
Starting from R2021a, user can use stlread to import stl files into MATLAB and use addMesh custom option to add the model into uavScenario. See code sample below:
scene = uavScenario;
stltri = stlread("multirotor.stl");
addMesh(scene, "custom", {stltri.Points, stltri.ConnectivityList}, [1, 0, 0]);
show3D(scene)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!