MATLAB: Do I receive the following error when I run the Simscape Multibody model? Model not assembled: position violation *** Resolve this issue in order to simulate the model. How to fix it

assembledmodelnotposition;simmechanicsSimscapeSimscape Multibodyviolation

Why do I receive the following error when I run my Simscape Multibody model?
Model not assembled: position violation * Resolve this issue in order to simulate the model.
How do I fix it?

Best Answer

This error has to do with the Base and Follower coordinate frames of a Joint violating the degrees-of-freedom constraints of the Joint.
Example: A Prismatic Joint acts along the z axis. If the Base and Follower frames on either side have an offset along the x or y directions which cannot be overcome with different initial conditions, this error will be thrown.
The exact misplacement in the frames can be determined using a Transform Sensor block and readjusted using a Rigid Transform block.