MatthewPeterKelly / OptimTraj

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

added new example (3d quadcopter) #39

Closed cjmcgreal closed 4 years ago

cjmcgreal commented 4 years ago

Matt,

I am still considering this "work in progress", but progress is slowing and so I created the pull request in case you were available for input / review.

I still have not been able to get it to converge to a result, despite it having run >3000 iterations. (trapz with n = 16).

I did some preliminary testing to check dynamics function for expected behavior. (included).

A couple of thoughts on potential issues: With the 6 DOF model, including the velocities that gives 12 states. I am not sure what should be the 'expected' number of iterations for that problem 'size'. I've (somewhat naively) implemented nested for-loops; I am not sure if these are playing well with the solver. If you think this is the issue, and you have suggestions for improvement, please let me know.

I've tried to strike a balance between expediency and flexibility, documentation and verbosity. Kindly let me know any and all thoughts you might have: suggestions, recommendations, code style, variable naming conventions etc.

Thanks again, Conrad

cjmcgreal commented 4 years ago

Matt,

I'm pretty sure I've addressed all of your comments, but may have introduced new issues...

vectorization: still haven't completely gotten rid of the nested for loops, in particular the coordinate transform, i.e. call to Euler2RotMat: One option is to use eul2rotm() and create the dependency on the Robotic System Toolbox.

Let me know what you think,

Conrad

cjmcgreal commented 4 years ago

Matt,

I think I'm pretty happy with this PR at the moment.

Some comments: 'Hermite Simpson' - left this as 'optional' (i.e. commented it out). As a new user running the example it would be nice to not have to wait so long.

plotting - Now evaluating using the built-in method. Added the optional argument. Added an optional argument to show the propulsion model while I was at it.

Looking forward to get started on the next example :)

Thanks!