Skip to content
Snippets Groups Projects
Unverified Commit a3595322 authored by Wilco Bonestroo's avatar Wilco Bonestroo Committed by GitHub
Browse files

Fix zero waypoints crash (#1978)

* return if the number of waypoints is zero.

* terminate the action.

* Succeed action instead of terminating.
parent 26b975b7
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,11 @@ WaypointFollower::followWaypoints()
get_logger(), "Received follow waypoint request with %i waypoints.",
static_cast<int>(goal->poses.size()));
if (goal->poses.size() == 0) {
action_server_->succeeded_current(result);
return;
}
rclcpp::Rate r(loop_rate_);
uint32_t goal_index = 0;
bool new_goal = true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment