Automatic Differentiation of Rigid Body Dynamics for Optimal Control and Estimation
About
Many algorithms for control, optimization and estimation in robotics depend on derivatives of the underlying system dynamics, e.g. to compute linearizations, sensitivities or gradient directions. However, we show that when dealing with Rigid Body Dynamics, these derivatives are difficult to derive analytically and to implement efficiently. To overcome this issue, we extend the modelling tool `RobCoGen' to be compatible with Automatic Differentiation. Additionally, we propose how to automatically obtain the derivatives and generate highly efficient source code. We highlight the flexibility and performance of the approach in two application examples. First, we show a Trajectory Optimization example for the quadrupedal robot HyQ, which employs auto-differentiation on the dynamics including a contact model. Second, we present a hardware experiment in which a 6 DoF robotic arm avoids a randomly moving obstacle in a go-to task by fast, dynamic replanning.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Jacobian computation | 2-layer MLP | Median Runtime (ms)0.3 | 8 | |
| Jacobian computation | Transformer | Median Runtime (ms)0.29 | 8 | |
| Finding Optimal Elimination Order | 2-layer MLP | Multiplications392 | 5 | |
| Finding Optimal Elimination Order | Transformer | Number of Multiplications4.69e+3 | 5 | |
| Finding Optimal Elimination Order | RoeFlux 1d | Number of Multiplications364 | 4 | |
| Finding Optimal Elimination Order | HumanHeartDipole | Number of Multiplications172 | 4 | |
| Finding Optimal Elimination Order | PropaneCombustion | Number of Multiplications90 | 4 | |
| Finding Optimal Elimination Order | Random function f | Number of Multiplications9.33e+3 | 4 | |
| Jacobian computation | RobotArm 6DOF | Median Runtime (ms)8.48 | 4 | |
| Jacobian computation | PropaneCombustion | Median runtime (ms)36.47 | 4 |