Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow path end pose deviation revive #4065

Prev Previous commit
Next Next commit
removed parameter
Signed-off-by: gg <josho.wallace@gmail.com>
  • Loading branch information
jwallace42 committed Jan 26, 2024
commit 95ea0aa45ed0ee3409dc094a9578c70d463e2511
21 changes: 4 additions & 17 deletions nav2_planner/src/planner_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ PlannerServer::PlannerServer(const rclcpp::NodeOptions & options)
// Declare this node's parameters
declare_parameter("planner_plugins", default_ids_);
declare_parameter("expected_planner_frequency", 1.0);
declare_parameter("allow_path_through_poses_goal_deviation", true);

SteveMacenski marked this conversation as resolved.
Show resolved Hide resolved
declare_parameter("action_server_result_timeout", 10.0);

Expand Down Expand Up @@ -144,9 +143,6 @@ PlannerServer::on_configure(const rclcpp_lifecycle::State & /*state*/)
" than 0.0 to turn on duration overrrun warning messages", expected_planner_frequency);
max_planner_duration_ = 0.0;
}
get_parameter(
"allow_path_through_poses_goal_deviation",
allow_path_through_poses_goal_deviation_);

// Initialize pubs & subs
plan_publisher_ = create_publisher<nav_msgs::msg::Path>("plan", 1);
Expand Down Expand Up @@ -405,15 +401,10 @@ void PlannerServer::computePlanThroughPoses()
if (i == 0) {
curr_start = start;
} else {
if (allow_path_through_poses_goal_deviation_) {
// pick the end of the last planning task as the start for the next one
// to allow for path tolerance deviations
curr_start = concat_path.poses.back();
curr_start.header = concat_path.header;
} else {
// pick the exact pose task as the start for the next one
curr_start = goal->goals[i - 1];
}
// pick the end of the last planning task as the start for the next one
// to allow for path tolerance deviations
curr_start = concat_path.poses.back();
curr_start.header = concat_path.header;
}
curr_goal = goal->goals[i];

Expand Down Expand Up @@ -717,10 +708,6 @@ PlannerServer::dynamicParametersCallback(std::vector<rclcpp::Parameter> paramete
max_planner_duration_ = 0.0;
}
}
} else if (type == ParameterType::PARAMETER_BOOL) {
if (name == "allow_path_through_poses_goal_deviation") {
allow_path_through_poses_goal_deviation_ = parameter.as_bool();
}
}
}

Expand Down
Loading