Skip to content

Commit

Permalink
Add Automatic Differentiated Jacobians to Velocity-Implicit Euler Int…
Browse files Browse the repository at this point in the history
…egrator, fourth PR of RobotLocomotion#12528 (RobotLocomotion#12967)

Add Automatic Differentiated Jacobians to Velocity-Implicit Euler Integrator, fourth PR of RobotLocomotion#12528

This commit:
1. Adds automatic differentiation as a velocity-Jacobian computation scheme for the velocity-implicit Euler integrator, by following the model of ImplicitIntegrator<T>::ComputeAutoDiffJacobian().
2. Refactors ComputeLOfY() based on the templated <U> IntegratorBase<T>::EvalTimeDerivatives() to enable this computation.
3. Fixes the tests so that they reset integrators between testing the different Jacobian computation schemes, to force Jacobian recomputations. Filed RobotLocomotion#13069 so that this will not be needed in the future.
4. Removes the boolean flags that skip tests that require AutoDiff'd Jacobians.
  • Loading branch information
antequ authored Apr 17, 2020
1 parent 6719d9d commit a3bcb50
Show file tree
Hide file tree
Showing 5 changed files with 386 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class DiscontinuousSpringMassDamperSystem final

// Second element of the derivative is spring acceleration.
(*derivatives)[1] = force / this->get_mass();

// Third element of the derivative is the energy added into the spring.
(*derivatives)[2] = this->CalcConservativePower(context);
}

private:
Expand Down
Loading

0 comments on commit a3bcb50

Please sign in to comment.