diff --git a/src/optimization/SleipnirOpti.cpp b/src/optimization/SleipnirOpti.cpp index 4080dfff..0b75b33e 100644 --- a/src/optimization/SleipnirOpti.cpp +++ b/src/optimization/SleipnirOpti.cpp @@ -106,6 +106,7 @@ void SleipnirOpti::SetInitial(trajopt::SleipnirExpr& expr, double value) { } void SleipnirOpti::Solve() { + GetCancellationFlag() = 0; opti.Callback([](const sleipnir::SolverIterationInfo&) -> bool { return trajopt::GetCancellationFlag(); });