Skip to content
Snippets Groups Projects
Unverified Commit 32058610 authored by Shrijit Singh's avatar Shrijit Singh Committed by GitHub
Browse files

Fix trans_stopped_velocity comparison with x & y velocity (#1649)


Signed-off-by: default avatarShrijit Singh <shrijitsingh99@gmail.com>
parent 26d776b4
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@
#include "pluginlib/class_list_macros.hpp"
#include "nav2_util/node_utils.hpp"
using std::hypot;
using std::fabs;
namespace dwb_plugins
......@@ -74,9 +75,9 @@ bool StoppedGoalChecker::isGoalReached(
if (!ret) {
return ret;
}
return fabs(velocity.angular.z) <= rot_stopped_velocity_ &&
fabs(velocity.linear.x) <= trans_stopped_velocity_ &&
fabs(velocity.linear.y) <= trans_stopped_velocity_;
hypot(velocity.linear.x, velocity.linear.y) <= trans_stopped_velocity_;
}
} // namespace dwb_plugins
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment