Skip to content

Commit

Permalink
planner - global path's age detection of RecoveryManager integrat…
Browse files Browse the repository at this point in the history
…ed with the planner class
  • Loading branch information
rayvburn committed Jan 17, 2024
1 parent b7e5ad4 commit c65999c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/humap_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ void HumapPlanner::reconfigure(HumapConfigConstPtr cfg) {
cfg_->getPlannerBehaviors()->oscillation_buffer_length / cfg_->getGeneral()->sim_period
))
);
recovery_.setGlobalPathPlanMaxAge(
cfg_->getGeneral()->path_planning_period * cfg_->getPlannerBehaviors()->path_plan_update_violation_multiplier
);
}

bool HumapPlanner::checkTrajectory(
Expand Down Expand Up @@ -439,6 +442,8 @@ base_local_planner::Trajectory HumapPlanner::findBestTrajectory(
obstacle_costs_
);

recovery_.checkGlobalPlanAge();

auto traj_robot_g = Trajectory(result_traj_, true);
auto traj_robot_poses = traj_robot_g.getPoses();
std::vector<Trajectory> trajs_people;
Expand Down Expand Up @@ -551,6 +556,7 @@ bool HumapPlanner::setPlan(const std::vector<geometry_msgs::PoseStamped>& orig_g
stop_rotate_controller_.resetLatching();

bool plan_updated = planner_util_->setPlan(orig_global_plan);
recovery_.markGlobalPlanUpdate();

// get goal pose transformed to the local frame (usually 'odom')
geometry_msgs::PoseStamped goal_new;
Expand Down

0 comments on commit c65999c

Please sign in to comment.