magazino / move_base_flex

Move Base Flex: a backwards-compatible replacement for move_base
https://uos.github.io/mbf_docs/
BSD 3-Clause "New" or "Revised" License
429 stars 154 forks source link

Check the absolute angle difference when checking angular tolerance #211

Closed corot closed 4 years ago

corot commented 4 years ago

Actually, this is still not enough, as we also need to check that the robot is almost stopped. Like in the base_local_planner:

  bool stopped(const nav_msgs::Odometry& base_odom, 
      const double& rot_stopped_velocity, const double& trans_stopped_velocity){
    return fabs(base_odom.twist.twist.angular.z) <= rot_stopped_velocity 
      && fabs(base_odom.twist.twist.linear.x) <= trans_stopped_velocity
      && fabs(base_odom.twist.twist.linear.y) <= trans_stopped_velocity;
  }

But wee need to merge #189 to have actual robot speed to check that, so I'll do in another PR.

corot commented 4 years ago

my bad; mbf_utility::angle always returns positive angles