alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
513 stars 53 forks source link

Move MATLAB codegen to Jinja2 #14

Open korken89 opened 5 years ago

korken89 commented 5 years ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like Lets move the matlab codegen to Jinja2 templates, the current template code is very hard to read and see how it comes together. This will also help with the C/C++ lib generation and overview IMO.

Describe alternatives you've considered Keep it as it is.

Additional context Link: Jinja 2 documentation

alphaville commented 5 years ago

Jinja is not supported in MATLAB, but there's Lobster (but it looks abandoned).

korken89 commented 5 years ago

Matlab can call into python, that should be enough

alphaville commented 5 years ago

@korken89 that's certainly a legit solution. I'm just concerned that users will need to install the Python package - not too difficult, but the less one does during installation, the better it is.

hampos commented 5 years ago

Hey guys, you could write your functionality in Java and invoke it from Matlab, since Matlab is natively Java I believe. This would require your jar in Matlab's classpath though, not sure if you could do this through an add-on. Cool project btw!