aligator
0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
|
When creating the CMake build, make sure to add the -DCMAKE_EXPORT_COMPILE_COMMANDS=1
flag. See its documentation here.
A template project for using aligator with CMake and C++ can be found in the aligator-cmake-example-project repository.
When aligator is installed, the CMake configuration file (aligatorConfig.cmake
) provides a CMake function to help users easily create a Python extension module. Users can write an extension module in C++ for performance reasons when providing e.g. custom constraints, cost functions, dynamics, and so on.
The CMake function is called as follows:
This will create a CMake MODULE
target named <name>
on which the user can set properties and add an install
directive.
An usage example can be found in this repo.
This project builds some C++ examples and tests. Debugging them is fairly straightforward using GDB:
with the appropriate command line arguments. Examples will appear in the binaries of build/examples
. Make sure to look at GDB's documentation.
If you want to catch std::exception
instances thrown, enter the following command once in GDB:
In order for debug symbols to be loaded and important variables not being optimized out, you will want to compile in DEBUG
mode.
Then, you can run the module under gdb
using
If you want to look at Eigen types such as vectors and matrices, you should look into the eigengdb
plugin for GDB.
TODO Finish documenting this
We use google benchmark to define C++ benchmarks which are able to aggregate data from runs, and Flame Graphs to produce a breakdown of the various function calls and their importance as a proportion of the call stack.
If you have the Rust toolchain and cargo
installed, we suggest you install cargo-flamegraph. Then, you can create a flame graph with the following command:
Here's Crocoddyl's flame graph:
Here's for aligator::SolverFDDP
: