cmower / optas

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

Add safe percentage (or similar) in enforce_model_limits #133

Closed cmower closed 1 year ago

cmower commented 1 year ago

We can set model limits (e.g. joint position limits) using enforce_model_limits, however it would be good to be able to specify a fraction/percentage so that the limits of the optimization can be inside the limits of the robot. E.g.

enforce_model_limits(name, safe_frac=0.95)  # by default safe_frac=1.0

Then the limits that are actually set in the optimization are

0.95q^- \leq q \leq 0.95q^+

Just note, be sure to handle the case when $\exists i : q^+_i \neq -q^-_i$.