diff --git a/nav2_regulated_pure_pursuit_controller/CMakeLists.txt b/nav2_regulated_pure_pursuit_controller/CMakeLists.txt
index 78beab89fea..e0340a131c9 100644
--- a/nav2_regulated_pure_pursuit_controller/CMakeLists.txt
+++ b/nav2_regulated_pure_pursuit_controller/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)
project(nav2_regulated_pure_pursuit_controller)
find_package(ament_cmake REQUIRED)
-find_package(nav2_amcl REQUIRED)
+find_package(angles REQUIRED)
find_package(nav2_common REQUIRED)
find_package(nav2_core REQUIRED)
find_package(nav2_costmap_2d REQUIRED)
@@ -27,7 +27,7 @@ set(dependencies
nav2_costmap_2d
pluginlib
nav_msgs
- nav2_amcl
+ angles
nav2_util
nav2_core
tf2
diff --git a/nav2_regulated_pure_pursuit_controller/package.xml b/nav2_regulated_pure_pursuit_controller/package.xml
index c56147a9693..f55486761fa 100644
--- a/nav2_regulated_pure_pursuit_controller/package.xml
+++ b/nav2_regulated_pure_pursuit_controller/package.xml
@@ -10,7 +10,7 @@
ament_cmake
- nav2_amcl
+ angles
nav2_common
nav2_core
nav2_util
diff --git a/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp b/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
index 09012a9fb3e..692f21e82b1 100644
--- a/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
+++ b/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp
@@ -20,7 +20,7 @@
#include
#include
-#include "nav2_amcl/angleutils.hpp"
+#include "angles/angles.h"
#include "nav2_regulated_pure_pursuit_controller/regulated_pure_pursuit_controller.hpp"
#include "nav2_core/controller_exceptions.hpp"
#include "nav2_util/node_utils.hpp"
@@ -266,7 +266,7 @@ bool RegulatedPurePursuitController::shouldRotateToPath(
angle_to_path = atan2(carrot_pose.pose.position.y, carrot_pose.pose.position.x);
// In case we are reversing
if (x_vel_sign < 0.0) {
- angle_to_path = nav2_amcl::angleutils::normalize(angle_to_path + M_PI);
+ angle_to_path = angles::normalize_angle(angle_to_path + M_PI);
}
return params_->use_rotate_to_heading &&
fabs(angle_to_path) > params_->rotate_to_heading_min_angle;