I am trying to model a closed kinematic chain in simulink, and i get problems with having meaningful initialization. Matlab ignores the joint limits for some joints.
What i have done:
I imported a urdf (which it self doesn't close the chain) and added a bushing joint to close the chain at the required point). There are 5 links, but only three of them are independent (and actuated), thus i have set a position target to those with high priority (to set the desired initial conditions). In the bushing joint, in all the DOFs i want to constraint i have set a position target to zero with low priority.
Thus, the 2 unactuated joints do not have a specified position target and are passive joints.
Problem
When i launch the simulation at specified initial conditions, matlab ignores the limits of the unactuated joint to close the chain, even though there is a solution. See below: (1.22 rad ~= 70 deg)
This causes the closed chain to get in a weird configuration, instead of the sketched one:
Also, the next step in the simulation, puts the configuration in the acceptable limits:
So it is like the limits are not respected when simscape tries to close the chain