MatthewPeterKelly / OptimTraj

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

Constraints on the Control Inputs #54

Closed AhmedMAtallah closed 1 year ago

AhmedMAtallah commented 1 year ago

Can I have a constraint on the control input such that '||\mathbf{u}||<=u_{max}'?

MatthewPeterKelly commented 1 year ago

I think so! You would use the path constraint: https://github.com/MatthewPeterKelly/OptimTraj/blob/27bcf50697a0a8ec95fbe729b418d0fd72b66f3b/optimTraj.m#L28-L30

It will probably behave better if you square both sides, so that you don't end up with a square root in your constraint.