Skip to content

Commit 9318e04

Browse files
eawiltonasaba96
authored andcommitted
Planner issues (#29)
* Uncommented path_start_index_ and planner node now handles failed plan attempts * linting
1 parent 24f8b26 commit 9318e04

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/magellan_motion/src/path_follower/path_follower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void PathFollower::UpdateUserInput(std_msgs::Int32::ConstPtr input) {
4646

4747
void PathFollower::UpdatePath(nav_msgs::Path::ConstPtr path) {
4848
current_path_ = path;
49-
//path_start_index_ = 0;
49+
path_start_index_ = 0;
5050
}
5151

5252
void PathFollower::Update() {

src/magellan_motion/src/path_planner/planner_node.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,16 @@ int main(int argc, char** argv)
9797
ROS_INFO("New goal accepted by planner");
9898

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

102101
magellan_motion::PlannerRequestResult result_;
103102

104-
result_.success = true;
103+
if ( plan.poses.size() >= 0 ) {
104+
plan_pub.publish(plan);
105+
result_.success = true;
106+
} else {
107+
result_.success = false;
108+
}
109+
105110
server.setSucceeded(result_);
106111
}
107112
}

0 commit comments

Comments
 (0)