uzh-rpg / rpg_mpc

Model Predictive Control for Quadrotors with extension to Perception-Aware MPC
GNU General Public License v3.0
376 stars 94 forks source link

Any insights/resources on how to tune for other simulated models or real quadrotors? #1

Closed SnShine closed 5 years ago

SnShine commented 5 years ago

There's wiki entry for tuning but that page is empty. Can you link any external resources to tune or update the wiki with model gen & tuning procedure?

foehnx commented 5 years ago

Hi @SnShine I've updated the tuning/adaption page with some instructions and explanations. I hope this helps. Thank you for pointing out this missing page.

If you have further questions, feel free to ask in this thread. If this resolves your question, please close the thread.

SnShine commented 5 years ago

Thanks for updating, and really intuitive explanation for tuning MPC. 😁

Not related to this issue, but I'm trying to replicate the trajectories shown in this video: https://www.youtube.com/watch?v=VIQILwcM5PA.

How should I go about that? Currently, I'm giving go to pose commands and can replicate square movement or polygon movement. And I've noticed there's circular trajectory helper in the rpg_quadrotor_control repo. Do I have to give trajectories to replicate those demo videos or velocity commands?

As I notice, the starting point of all trajectory generation methods have velocities of [0,0,0]. Is there any way to generate trajectory on the fly and follow it without stopping? Say, the drone is circling as shown in the demo and then just go tangentially without stopping? (if we give new trajectory, it has starting point velocities as 0, so it stops and then accelerates.)

foehnx commented 5 years ago

Hi @SnShine

If you run the MPC within our rpg_quadrotor_control framework, you can send it whole trajectories and it will sample and follow it accordingly. You can send multiple trajectories and they will be stored in a queue and executed sequentially.

To generate trajectories which do not start or stop in hover, look for example at: trajectory_generation_helper::polynomials::computeTimeOptimalTrajectory You can set start and end state and if you set them with non-zero velocity/rates, you will get trajectories with the respective properties.

SnShine commented 5 years ago

Thanks a lot. This clears up a lot of confusion if I should go with velocity inputs or trajectory inputs.