Skip to content

Commit

Permalink
change to stop moving when no path
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-F24 committed Feb 10, 2024
1 parent 8bac0ce commit 517a352
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lunabot_control/src/mpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ bool comparator(std::pair<Eigen::MatrixXd, double> a, std::pair<Eigen::MatrixXd,
void MPC::calculate_velocity() {
SWRI_PROFILE("calculate-velocity");
if (this->robot_pos_.empty() || this->path_.empty() || !this->enabled_) {
MPC::publish_velocity_(0, 0);
return;
}
int horizon_length = this->horizon_length_;
Expand Down

0 comments on commit 517a352

Please sign in to comment.