Including multiple actors in Simulink 3D animation with asbQuadcopter model
1 回表示 (過去 30 日間)
古いコメントを表示
I am using the asbQuadcopter model in Simulink to simulate a parrot minidrone. I want to test obstacle avoidance methods I have built which I test on moving objects. From plotting the data I can see it is working, but I want to export the animation of the drone for a video.
I can't figure out how to add these objects to the animation, and save the animation as a video. Starting with just one moving red sphere, how can I add this to the simulink 3D animation? Secondly, how can I save the animation as a video?
I have read the documentation here: https://uk.mathworks.com/help/sl3d/create-multiple-instances-of-actors.html
But I am still unsure on how it can be applied to the asbQuadcopter model to add another "actor". Thank you in advance!
0 件のコメント
採用された回答
Nishan Nekoo
2024 年 10 月 10 日
Hi Benjamin,
In the initialization script, you can use the createShape function to create the sphere and specify its color. There should already be an example in there by default that is commented out for a box shape.
On the Inputs tab of the Simulation 3D Actor, you can specify properties that you would like to create an Inport for such as position or velocity and you can use these to move the red sphere around the scene.
Note that you will need to set the 'Mobility' property of the Actor to sim3d.utils.MobilityTypes.Movable in order to move it around the scene.
To record, unfortunately we don't have any built-in capabilities to record the Viewer yet, though this is an important feature that we are considering for inclusion in a future product release. For now, you will need to screen record to obtain a video.
I hope this helps, and please let me know if you have any additional questions.
Nishan
4 件のコメント
Nishan Nekoo
2024 年 10 月 10 日
You're welcome! Don't hesitate to reach out if you have any additional questions or feedback, I'd love to hear from you.
Nishan
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Aerospace Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!