Is there a way to create a video of a multibody simulation which includes frame-by-frame readouts of certain parameters?

3 次查看(过去 30 天)
I have a multibody simulation, and I need to find some way to create a video just like the one you can export from Mechanics Explorer, except with a couple of readouts which display the value of certain parameters, frame-by-frame.
I'm pretty sure there is no way to add a numerical readout to a video in mechanics explorer directly, so here are the things I have attempted to figure out so far (unsuccessfully):
  • I could try to create separate video of my readouts, like from the dashboard blocks, which I could then just combine with the mechanics explorer video using other software. Is there a way to get a video file of the dashboard blocks from a simulation? I don't think a desktop recorder would work, since I need frame-by-frame values of the simulation.
  • I also suspect that I could use the 3D animation library somehow (no experience with it thus far)... It looks like I would have to rebuild the machine in the Virtual World file and connect it, which seems like a pain... So looking for any other options before I try to figure that out.
Any other suggestions?
Thanks!

回答(1 个)

Steve Miller
Steve Miller 2019-4-1
Hi,
To get a video that shows scope/dashboard block results synchronized with the Simscape Multibody animation, your best bet is to get everything on the screen as you want it, configure the simulation so that everything goes the same speed (i.e. the Mechanics Explorer animation doesn't go "real time" while your simulation goes 10x faster than real time) and record it all at once.
To get everything to run at a synchronous speed...
  1. You can set the maximum step size quite small.
  2. Starting in R2018a, you can use Simulink Pacinghttps://www.mathworks.com/help/releases/R2018a/simulink/ug/simulation-pacing.html
  3. There are various tools on the File Exchange for making Simulink models go at a fixed pace.https://www.mathworks.com/matlabcentral/fileexchange/29107-real-time-pacer-for-simulink
--Steve

类别

Help CenterFile Exchange 中查找有关 Simulation and Analysis 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by