diff --git a/nav2_regulated_pure_pursuit_controller/test/test_regulated_pp.cpp b/nav2_regulated_pure_pursuit_controller/test/test_regulated_pp.cpp index 09892755d93..7087ef5acbf 100644 --- a/nav2_regulated_pure_pursuit_controller/test/test_regulated_pp.cpp +++ b/nav2_regulated_pure_pursuit_controller/test/test_regulated_pp.cpp @@ -403,6 +403,11 @@ TEST(RegulatedPurePursuitTest, lookaheadAPI) dist = 3.8; pt = ctrl->getLookAheadPointWrapper(dist, path); EXPECT_EQ(pt.pose.position.x, 3.8); + + // test carrot projected off end of path with interpolation + dist = 100.0; + pt = ctrl->getLookAheadPointWrapper(dist, path); + EXPECT_EQ(pt.pose.position.x, 100.0); } TEST(RegulatedPurePursuitTest, rotateTests)