cmower / optas

OpTaS: An optimization-based task specification library for trajectory optimization and model predictive control.
https://cmower.github.io/optas/
Other
101 stars 14 forks source link

Update readme with planar example #90

Closed joaomoura24 closed 1 year ago

joaomoura24 commented 1 year ago

This PR adds readme info for the two planar examples. I also renamed it to remove the example word as they are in the example directory so it was redundant.

cmower commented 1 year ago

@joaomoura24 please rebase, there are some conflicts in your examples - I think I made some small modifications to them, so please keep the modifications.

If I remember correct, the change was in the optimization builder interface, please use

builder = optas.OptimizationBuilder(T, other_options)

rather than

builder = optas.OptimizationBuilder(T=T, other_options)

The reason is technical. Python accepts both (technically) but (i) it is not good practice to specify positional arguments as keyword arguments, and (ii) it causes issues for the deprecation_warning decorator. After the first release this won't matter too much because I will remove the deprecation warning and all the associated methods but in general I would prefer to keep changes mainly for reason (i).

cmower commented 1 year ago

Also, once you rebase please wait for the linting and unit tests to complete. If any issues arise there please address.

cmower commented 1 year ago

Thanks @joaomoura24 , you changed the file name for the examples but didn't make the change in test_examples.py. You need to make sure the filename (i.e. parameter for load_main_function function) is correct here:

https://github.com/cmower/optas/blob/9680f57acc0441c9bf8930ccb2e837654762493d/tests/test_examples.py#L32-L39