Effacer les filtres
Effacer les filtres

Simulink 3D capabilities, move objects during simulation?

4 vues (au cours des 30 derniers jours)
Brian Munguia
Brian Munguia le 23 Juil 2012
I am working on a project regarding distributed engine control and have looked into SimMechanics as a modeling tool, but it became apparent that it would be ideal to manipulate objects during simulation. Does Simulink 3D have such a capability? For example, if I have a temperature sensor in a jet engine and want to grab it and move it to a different location in the engine during simulation, is this possible? Also, can SimMechanics elements be incorporated into Simulink 3D or are they separate entities? Thank you.
  3 commentaires
Brian Munguia
Brian Munguia le 30 Juil 2012
Thank you Sumit. I have been experimenting with sensors but still can't get them to affect my simulation (see my question "Grab object in Simulink 3D to adjust conditions" for more details). Any help would be appreciated.
Sumit Tandon
Sumit Tandon le 30 Juil 2012
Please see my answer for that question.

Connectez-vous pour commenter.

Réponse acceptée

Jan Danek
Jan Danek le 31 Juil 2012
Hi Brian,
The initial positions of objects in virtual scene need to be aligned with that in the simulation model (and of course, with the desired position in the scene).
You can do this in Simulink by adding a Constant signal to the signal you feed the VR Sink inputs.
In Virtual scene, you can wrap an object with another offset Transform. Example:
DEF Ball_Offset Transform {
translation 0 10 0
children [
DEF Ball Transform {
translation 0 20 0
children Shape {
geometry Sphere {
radius 1
}
}
}
]
}
In order to align objects with VRML sensors attached, you need to attach the sensor to the correct geometry (put sensor as "brother of a geometry"). Example in the vrmaglev demo VRML file maglev.wrl:
====
Transform { translation 0 4.25 0 children [ DEF Grab_Sensor PlaneSensor { enabled TRUE autoOffset TRUE maxPosition 0 1 minPosition 0 0 offset 0 0 0 }
DEF Ball Transform {
translation 0 0 0
children Shape {
geometry Sphere {
radius 0.25
}
}
}
]
}
I hope this helps, if you still have problems, please send me your model + VRML file, I will align them for you...
All the best,
Jan

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by