Including multiple actors in Simulink 3D animation with asbQuadcopter model
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Benjamin Campbell
el 10 de Oct. de 2024
Comentada: Nishan Nekoo
el 10 de Oct. de 2024
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 comentarios
Respuesta aceptada
Nishan Nekoo
el 10 de Oct. de 2024
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 comentarios
Nishan Nekoo
el 10 de Oct. de 2024
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
Más respuestas (0)
Ver también
Categorías
Más información sobre Aerospace Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!