10 Inverse Simulation

10.5 Caveats and limitations

Use of the inverse controller is subject to some caveats.

  • Tracked components must be dynamic, in that their motion is controlled by forces. This means that their dynamic property must be set to true or they must be attached to other bodies that are dynamic.

  • The algorithm which computes the excitations currently has a complexity O(n^{3}) in the number of excitations n. This is due both to the use of numeric differentiation for determining excitation response matrices such as {\bf H}_{m} and {\bf H}_{e} (Section 10.1.3), and also the fact that the QP solver is at present a dense solver. This means that applications with large numbers of excitations may require considerably longer to simulate than those with fewer excitations.

  • The controller is not designed to work with unilateral constraints (the most common examples of which are constraint-based contact and joint limits). For models containing these behaviors, inverse simulation may produce excitations that jump around erratically. In the case of collisions, one solution may be to use force-based collisions, implemented with either PointPlaneForce or PointMeshForce, as described in Section 3.6. Setting these components to use a quadratic force function may improve performance even more. Another possible solution, for any kind of unilateral constraint, may be to make it compliant (Sections 3.3.8 and 8.7), since this has the same effect as making the constraint force-based.

  • Prescribed motion trajectories may need to be sufficiently smooth the avoid large transient excitations, particularly at the start and end of motions when velocities transition from and to 0. Transient effects are often more pronounced for models where inertial effects are high. Cubic interpolation is useful for creating smoother trajectories, particularly with a limited number of data points. It may also be necessary to explicitly smooth an input trajectory with additional points.

    In the InverseMuscleArm example, there is a noticeably transient at the start (Figure 10.6, left). Increasing the L2 regularization weight reduces the transient amplitude but spreads it out over a longer time (Figure 10.6, right), at the expense of tracking accuracy.