Skip to content

Commit fcea9ec

Browse files
doisygGuillaume Doisy
andauthored
fix default behavior (enforce_path_inversion: false) (#3643)
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
1 parent 1cbc2db commit fcea9ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nav2_mppi_controller/src/path_handler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ void PathHandler::setPath(const nav_msgs::msg::Path & plan)
174174
{
175175
global_plan_ = plan;
176176
global_plan_up_to_inversion_ = global_plan_;
177-
inversion_locale_ = utils::removePosesAfterFirstInversion(global_plan_up_to_inversion_);
177+
if (enforce_path_inversion_) {
178+
inversion_locale_ = utils::removePosesAfterFirstInversion(global_plan_up_to_inversion_);
179+
}
178180
}
179181

180182
nav_msgs::msg::Path & PathHandler::getPath() {return global_plan_;}

0 commit comments

Comments
 (0)