From f930b20f19b6e1e08d94cdb0513d1107f22a5dc0 Mon Sep 17 00:00:00 2001 From: James Ward Date: Thu, 31 Aug 2023 16:59:21 +1000 Subject: [PATCH] Add unit test for projected RPP carrot at end of path --- .../test/test_regulated_pp.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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)