You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Second-Order Derivatives and Autodiff Support (#95)
This PR adds support for second-order derivatives (Hessians) and automatic differentiation across the codebase:
* Added autodiff library (v1.1.2) as a dependency for automatic differentiation
* Refactored state and control Hessian functions to return vectors of matrices instead of single matrices
* Added autodiff versions of continuous dynamics functions in all dynamics models
* Implemented functions to compute Hessians using autodiff for improved accuracy
* Updated core algorithm calculations in ipddp_core.cpp to use second-order information
* Added examples demonstrating Hessian calculations for pendulum and Dubins car models
* Added comprehensive tests for Hessian calculations and autodiff functionality
This refactoring improves accuracy of second-order derivatives while providing a consistent interface across all dynamics models.
Although the library automatically finds and installs the following dependencies via [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html), if you do not have ones, here is how you can install on your own.
180
-
181
-
*[OSQP](https://osqp.org/) (QP solver) and [osqp-cpp](https://github.com/google/osqp-cpp) (C++ Wrapper for OSQP)
182
-
```bash
183
-
conda install -c conda-forge osqp # Optional
184
-
```
185
-
*[libtorch](https://pytorch.org/get-started/locally/) : This library utilizes Torch for its underlying computations. It will be automatically installed during the build process.
186
-
187
-
*[CUDA](https://developer.nvidia.com/cuda-toolkit)(Optional): If you want to leverage GPU acceleration for torch, ensure you have CUDA installed. You can download it from the [NVIDIA website](https://developer.nvidia.com/cuda-12-4-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local).
188
179
189
180
### Building
190
181
```bash
@@ -215,6 +206,7 @@ This project uses the following open-source libraries:
0 commit comments