From 517a352fc4aa94f1ec8e369b0edcec574305fec9 Mon Sep 17 00:00:00 2001 From: Isaac-F24 Date: Sat, 10 Feb 2024 11:43:19 -0500 Subject: [PATCH] change to stop moving when no path --- lunabot_control/src/mpc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lunabot_control/src/mpc.cpp b/lunabot_control/src/mpc.cpp index dd89b46b..50abbf6a 100644 --- a/lunabot_control/src/mpc.cpp +++ b/lunabot_control/src/mpc.cpp @@ -271,6 +271,7 @@ bool comparator(std::pair a, std::pairrobot_pos_.empty() || this->path_.empty() || !this->enabled_) { + MPC::publish_velocity_(0, 0); return; } int horizon_length = this->horizon_length_;