SimMechanics isn't an "inverse dynamics" engine, it's not an inverse kinematics engine, it's a "forward dynamics" or just "dynamics" engine. You provide link dimensions, inertias, and joint constraints. Then you provide either an applied force or an applied motion, SimMechanics propagates those forces (or equivalent forces, in the even of applied motions) through your model, and you get an output that shows what your system does in the presence of those forces.
I don't know what you think your Subsystem1 is supposed to be doing, but it's not doing it. Here is what is actually happening:
- Each joint or link has an input location ("Base") and an output locations ("Follower"). Links have inertias and fixed transforms between base and follower, joints have no inertias and obviously have variable transforms between base and follower.
- Each system has one and only one ground. This provides your zero-reference.
- So, reading your first diagram from left to right, you have a "Root Ground", a welded base, then you start building your robot with joint, link, joint, link, etc.
- Eventually you get to "Link 4-1", which I'm assuming is supposed to be an end effector.
- Here's where you get into trouble - you tie some coordinate frame from the end effector to "Subsystem1" by attaching it to the follower (output) of a pair of parallel constraints.
- Those parallel constraints are attached to the follower of a link, which is the follower of a custom joint, which is attached to ground!
You have made a closed loop, starting and ending at a ground connection.
The problem with this is that SimMechanics seems to be especially terrible at solving for initial conditions. If your starting/default orientation for the revolute joints and those linkages doesn't result in an end effector pose that exactly matches the starting/default orientation for the custom joint and the subsystem1 link, then you get this error because the difference in pose matching results in a separated joint somewhere - typically where you tie back to ground. This is in Subsystem, where the ground connection attaches to custom joint 1, which is where you're getting the error.
It looks like maybe you're trying to do inverse kinematics by creating a "puppet" - you provide a position and an orientation and rely on the SimMechanics solver to find the joint angles that allow the arm to reach that pose. Again, the problem here is if you start with a set of initial conditions where your initial input pose doesn't correspond to your initial robot pose.
You could also get this error if you use your input pose to drive the arm to an unreachable subspace. At that point, the arm "locks up," the input continues to move, and in one time step a joint separates somewhere and you hit a "not coincident" error like this again.
My suggestion would be to check the default orientation of the arm by commenting out the input subsystem1 code (highlight, right click, and choose "comment out). Then uncomment the input, comment out the robot arm (except the end effector, of course), and see if the end effector is in the same position. If it's not, there's your problem. Adjust your default input/robot joint angles as required to get the two to mesh.