Skip to content

Simplified API by using shared pointers

Writing a complex optimal control problem can be very hard if the user needs to handle carefully all raw pointers. Paying this expensive lunch for just a bit of memory overhead (counter pointer) of shared pointers cannot be justified.

With this code, I ensure that we don't create runtime overhead.

Additionally, I simplified the unittest by using shared pointers. Please have a look of this code @mnaveau.

Finally, I have figured out how to expose custom data in Python. I included all these datas.

In conclusion this PR includes:

  1. Simpler API which uses shared pointers for abstracts (i.e. state, contacts, impulses, costs, actions, callbacks and shooting problem)
  2. benchmarks and unittest according 1.
  3. unittest code which uses shared pointers, removed custom management of memory
  4. exposition of custom data structures in Python

Merge request reports