MATLAB: Revolute Joints Block, State Tragets

Simscape Multibody

When I have a value for "Specify Position Target" and I run the simulation, I don't get the same value from the sensor. Any idea, how can I set the mechanism at a specific revolute joint angle?

Best Answer

Closing the loop here. The main problem was the initial condition setting at different joint targets. You can check if a system initialized in the desired target by going to the Variable Viewer:
And then checking if the system could initialize correctly:
Usually relaxing some of the target leads to the system initalizing correctly.
Related Question