Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move_base dose not put SUCCEEDED status (move_base/status or move_base/result) #43

Open
tosa-no-onchan opened this issue Aug 29, 2022 · 1 comment

Comments

@tosa-no-onchan
Copy link

The flowing code(return goal_reached_;) dosen't work correctly.

bool EBandPlannerROS::isGoalReached(){
  ....
  return goal_reached_;
  ....
}

Why did you comment out next lines?
from here
// nav_msgs::Odometry base_odom;
//...
to here
//return is_goal_reached;

bool EBandPlannerROS::isGoalReached()
{
  // check if plugin initialized
  if(!initialized_)
  {
    ROS_ERROR("This planner has not been initialized, please call initialize() before using this planner");
    return false;
  }

  return goal_reached_;

  // // copy odometry information to local variable
  // nav_msgs::Odometry base_odom;
  // {
  // 	// make sure we do not read new date from topic right at the moment
  // 	boost::mutex::scoped_lock lock(odom_mutex_);
  // 	base_odom = base_odom_;
  // }

  // geometry_msgs::PoseStamped global_pose;
  // costmap_ros_->getRobotPose(global_pose);

  // // analogous to dwa_planner the actual check uses the routine implemented in trajectory_planner (trajectory rollout)
  // bool is_goal_reached = base_local_planner::isGoalReached(
  //     *tf_, global_plan_, *(costmap_ros_->getCostmap()),
  //     costmap_ros_->getGlobalFrameID(), global_pose, base_odom,
  // 		rot_stopped_vel_, trans_stopped_vel_, xy_goal_tolerance_,
  //     yaw_goal_tolerance_
  // );

  // return is_goal_reached;

}
@tosa-no-onchan
Copy link
Author

tosa-no-onchan commented Aug 30, 2022

I found some correct code.

eband_local_planner_ros.cpp

    // set global plan to wrapper and pass it to eband    
bool EBandPlannerROS::setPlan(const std::vector<geometry_msgs::PoseStamped>& orig_global_plan)
{
 ....
  // set goal as not reached
  // changed by nishi
  //goal_reached_ = false;

  return true;
}

bool EBandPlannerROS::isGoalReached()
{
  // check if plugin initialized
  if(!initialized_)
  {
    ROS_ERROR("This planner has not been initialized, please call initialize() before using this planner");
    return false;
  }

  // added by nishi 
  //ROS_INFO("GOAL Reached!");
  //std::cout << "BandPlannerROS::isGoalReached() :#9  goal_reached_=" << goal_reached_ << std::endl;
  if(goal_reached_==true){
    goal_reached_=false;
    return true;
  }
  return false;

  //return goal_reached_;
  ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant