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

fixes repeated divergence after crash #5

Open kelia opened 4 years ago

kelia commented 4 years ago

Crashing in simulation leads to divergence of MPC. When resetting the simulation and restarting the MPC, the previous state corrupts the optimization, leading to repetitive crashes and requiring to restart the MPC node.

This change forces a clean solve from scratch, fixing above issue.

foehnx commented 4 years ago

Thanks. The change right now is on the wrapper level, which does not account for threading. I will move the change to the controller and make it thread-safe... but has to wait for next week. Cheers