From 3f0932f99285662247b64020293c763ebcc8a353 Mon Sep 17 00:00:00 2001 From: Steve Macenski Date: Wed, 17 Nov 2021 23:12:16 -0800 Subject: [PATCH] Fix spin recovery test (#2684) * debugging flaky shutdown on plugin planner tests * adding independent tests * adding types * adding new QoS and fix param declares * try this * try tihis * try 10hz * try sleeping on setup * add footprint pub * adding additional pub for debug * try adding a spin for debug types * replacing spin with sleep --- .../src/recoveries/spin/spin_recovery_tester.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nav2_system_tests/src/recoveries/spin/spin_recovery_tester.cpp b/nav2_system_tests/src/recoveries/spin/spin_recovery_tester.cpp index 884fb7a9b5..73a66bd755 100644 --- a/nav2_system_tests/src/recoveries/spin/spin_recovery_tester.cpp +++ b/nav2_system_tests/src/recoveries/spin/spin_recovery_tester.cpp @@ -162,7 +162,7 @@ bool SpinRecoveryTester::defaultSpinRecoveryTest( sendFakeOdom(0.0); } - rclcpp::spin_some(node_); + rclcpp::sleep_for(std::chrono::milliseconds(100)); auto goal_handle_future = client_ptr_->async_send_goal(goal_msg); @@ -328,7 +328,7 @@ void SpinRecoveryTester::sendFakeOdom(float angle) geometry_msgs::msg::PolygonStamped footprint; footprint.header.frame_id = "odom"; - footprint.header.stamp = rclcpp::Time(); + footprint.header.stamp = node_->now(); footprint.polygon.points.resize(4); footprint.polygon.points[0].x = 0.22; footprint.polygon.points[0].y = 0.22;