Skip to content

Commit

Permalink
Planner issues (#29)
Browse files Browse the repository at this point in the history
* Uncommented path_start_index_ and planner node now handles failed plan attempts

* linting
  • Loading branch information
eawilton authored and asaba96 committed Nov 4, 2019
1 parent 24f8b26 commit 9318e04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/magellan_motion/src/path_follower/path_follower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void PathFollower::UpdateUserInput(std_msgs::Int32::ConstPtr input) {

void PathFollower::UpdatePath(nav_msgs::Path::ConstPtr path) {
current_path_ = path;
//path_start_index_ = 0;
path_start_index_ = 0;
}

void PathFollower::Update() {
Expand Down
9 changes: 7 additions & 2 deletions src/magellan_motion/src/path_planner/planner_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ int main(int argc, char** argv)
ROS_INFO("New goal accepted by planner");

Path plan = planner.plan(goal_->goal);
plan_pub.publish(plan);

magellan_motion::PlannerRequestResult result_;

result_.success = true;
if ( plan.poses.size() >= 0 ) {
plan_pub.publish(plan);
result_.success = true;
} else {
result_.success = false;
}

server.setSucceeded(result_);
}
}
Expand Down

0 comments on commit 9318e04

Please sign in to comment.