Including multiple actors in Simulink 3D animation with asbQuadcopter model
8 次查看(过去 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!