Simulink 3D capabilities, move objects during simulation?

Illustration
Jan Danek - 2021-08-14T10:44:19+00:00
Question: Simulink 3D capabilities, move objects during simulation?

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.  

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

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...


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!