yorgoon / minimum-snap-geometric-control

Quadrotor control using minimum snap trajectory optimization and SE3 geometric controller
101 stars 30 forks source link

Nonsquare constraint matrix A #2

Closed williamdwarke closed 4 years ago

williamdwarke commented 4 years ago

Outstanding work on this! I know you open-sourced this project and probably didn't plan on providing any support for it, but I am working on similar research and was wondering if you could give me a hand with a very simple issue. In the polynomial trajectory optimization, you transform the constrained QP into an unconstrained QP. Is this possible when you have a non-square constraint matrix A (i.e., due to arbitrary velocity constraints in some intervals and not others)? Unfortunately it seems that A^-1 is required to do the transformation. Thanks so much!

yorgoon commented 4 years ago

I've worked on this few years ago, but as far as I remember, you can still set arbitrary velocity constraints along the waypoints. The reason why the matrix A is square is the fact that the inputs are function of up to snap (pos-vel-acc-jerk-snap). It would be impossible to achieve the desired control if we have a sudden jump unless if we have the ability to do so (in the real world, pretty much impossible). Consequently, SUB A is 5 by 10 (since the polynomial trajectory is 9th order). By connecting two waypoints, we have 10 by 10 matrix. As long as the continuity is satisfied, you can choose arbitrary velocity, in fact, up to snap. In my work, I only set the positions of the waypoints including start and end. Additionally, I set derivatives all zero at the start and end. Hope this can clear some things up.

kwads123 commented 4 years ago

Thank you very much! I had been having the same problem with the non-square A matrix in my own code.