From 2a8a9d7aa2957f896d0d8da1950f0b8d32f73e8b Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 15 Feb 2024 17:11:51 -0800 Subject: [PATCH] Properly initialize Sleipnir cancellation flag (#80) --- src/optimization/SleipnirOpti.cpp | 1 + 1 file changed, 1 insertion(+) 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(); });