Skip to content

Commit

Permalink
Revert "fix(behavior_path_planner): check new modified goal in the no…
Browse files Browse the repository at this point in the history
…de side (#4295)"

This reverts commit 76c61de.
  • Loading branch information
kosuke55 committed Jul 17, 2023
1 parent 361fbaf commit 43c08e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,7 @@ void BehaviorPathPlannerNode::run()
publishPathReference(planner_manager_->getSceneModuleManagers(), planner_data_);
stop_reason_publisher_->publish(planner_manager_->getStopReasons());

// publish modified goal only when it is updated
if (
output.modified_goal &&
/* has changed modified goal */ (
!planner_data_->prev_modified_goal ||
planner_data_->prev_modified_goal->uuid != output.modified_goal->uuid)) {
if (output.modified_goal) {
PoseWithUuidStamped modified_goal = *(output.modified_goal);
modified_goal.header.stamp = path->header.stamp;
planner_data_->prev_modified_goal = modified_goal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,11 @@ void GoalPlannerModule::setDrivableAreaInfo(BehaviorModuleOutput & output) const

void GoalPlannerModule::setModifiedGoal(BehaviorModuleOutput & output) const
{
// set the modified goal only when it is updated
const auto & route_handler = planner_data_->route_handler;
if (status_.is_safe) {
const bool has_changed_goal =
modified_goal_pose_ && (!prev_goal_id_ || *prev_goal_id_ != modified_goal_pose_->id);
if (status_.is_safe && has_changed_goal) {
PoseWithUuidStamped modified_goal{};
modified_goal.uuid = route_handler->getRouteUuid();
modified_goal.pose = modified_goal_pose_->goal_pose;
Expand Down

0 comments on commit 43c08e3

Please sign in to comment.