MatthewPeterKelly / OptimTraj

A trajectory optimization library for Matlab
MIT License
598 stars 207 forks source link

ADiGator for OptimTraj #25

Open stumarcus314 opened 7 years ago

stumarcus314 commented 7 years ago

ADiGator (https://sourceforge.net/projects/adigator/) is free, open-source MATLAB software that computes vectorized gradients (and even Hessians) via automatic differentiation. It was developed by the author of GPOPS-II to make it easier to supply vectorized gradients and Hessians to GPOPS-II. Perhaps ADiGator could be integrated into OptimTraj so that OptimTraj can optionally use ADiGator to generate vectorized derivatives of the optimal control functions (e.g. dynamics, path objective, etc.). This would be very useful, as it is often very difficult to manually derive and implement vectorized gradients (and Hessians).

MatthewPeterKelly commented 7 years ago

You can ADiGator to supply gradients to OptimTraj, but you would probably need to do a bit of work to get the formats to be consistent.

This would be a great feature to add to OpimTraj at some point.

I have used ADiGator before, but only as a built-in feature for GPOPS-II, when called directly (as opposed to through OptimTraj).

All of the code in OptimTraj uses the Matlab symbolic toolbox to automatically generate gradients. The format for the gradients in OptimTraj was selected so as to be most compatible with these methods. This is most clear in the Five-Link Biped example.