From 0cf409a33cda4bb94773e2ddaec4e46b8646e447 Mon Sep 17 00:00:00 2001 From: Steve Macenski Date: Wed, 5 Aug 2020 19:15:29 -0700 Subject: [PATCH] minor changes to lower redundent warnings (#1918) --- nav2_controller/src/nav2_controller.cpp | 1 - nav2_planner/src/planner_server.cpp | 4 +--- nav2_system_tests/src/waypoint_follower/tester.py | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nav2_controller/src/nav2_controller.cpp b/nav2_controller/src/nav2_controller.cpp index 81a6c226e8..5ce371e33b 100644 --- a/nav2_controller/src/nav2_controller.cpp +++ b/nav2_controller/src/nav2_controller.cpp @@ -416,7 +416,6 @@ bool ControllerServer::getRobotPose(geometry_msgs::msg::PoseStamped & pose) { geometry_msgs::msg::PoseStamped current_pose; if (!costmap_ros_->getRobotPose(current_pose)) { - RCLCPP_ERROR(this->get_logger(), "Could not get robot pose"); return false; } pose = current_pose; diff --git a/nav2_planner/src/planner_server.cpp b/nav2_planner/src/planner_server.cpp index 394d00c6d4..2d83c0309b 100644 --- a/nav2_planner/src/planner_server.cpp +++ b/nav2_planner/src/planner_server.cpp @@ -281,12 +281,10 @@ PlannerServer::computePlan() result->planning_time = cycle_duration; if (max_planner_duration_ && cycle_duration.seconds() > max_planner_duration_) { - auto planner_period = 1 / max_planner_duration_; - auto cycle_period = 1 / cycle_duration.seconds(); RCLCPP_WARN( get_logger(), "Planner loop missed its desired rate of %.4f Hz. Current loop rate is %.4f Hz", - planner_period, cycle_period); + 1 / max_planner_duration_, 1 / cycle_duration.seconds()); } action_server_->succeeded_current(result); diff --git a/nav2_system_tests/src/waypoint_follower/tester.py b/nav2_system_tests/src/waypoint_follower/tester.py index 6cdd557ad6..7f5db902fb 100755 --- a/nav2_system_tests/src/waypoint_follower/tester.py +++ b/nav2_system_tests/src/waypoint_follower/tester.py @@ -202,6 +202,7 @@ def main(argv=sys.argv[1:]): test.cancel_goal() # a failure case + time.sleep(2) test.setWaypoints([[100.0, 100.0]]) result = test.run(True) assert not result