From e2e8e709cb32850020c38db703223365b0d970d4 Mon Sep 17 00:00:00 2001 From: Alexey Merzlyakov Date: Tue, 12 May 2020 11:50:19 +0300 Subject: [PATCH 1/3] Return back planning system tests --- nav2_system_tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav2_system_tests/CMakeLists.txt b/nav2_system_tests/CMakeLists.txt index ce0b6573bd..3e8b52caf4 100644 --- a/nav2_system_tests/CMakeLists.txt +++ b/nav2_system_tests/CMakeLists.txt @@ -52,7 +52,7 @@ if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) find_package(ament_cmake_pytest REQUIRED) - # add_subdirectory(src/planning) + add_subdirectory(src/planning) add_subdirectory(src/localization) add_subdirectory(src/system) add_subdirectory(src/updown) From ebfd2b674522076bfd6e24ab2490d0f8086aeb2e Mon Sep 17 00:00:00 2001 From: Alexey Merzlyakov Date: Wed, 13 May 2020 19:53:56 +0300 Subject: [PATCH 2/3] Fix testcase failure related to not updating costmap This appeared while compiler treated costmap pointer to be unused and optimized it out --- nav2_system_tests/src/planning/planner_tester.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nav2_system_tests/src/planning/planner_tester.hpp b/nav2_system_tests/src/planning/planner_tester.hpp index 6a411050e7..f03b8ee784 100644 --- a/nav2_system_tests/src/planning/planner_tester.hpp +++ b/nav2_system_tests/src/planning/planner_tester.hpp @@ -67,7 +67,8 @@ class NavFnPlannerTester : public nav2_planner::PlannerServer costmap_ros_->getCostmap()->resizeMap( prop.size_x, prop.size_y, prop.resolution, prop.origin.position.x, prop.origin.position.x); - unsigned char * costmap_ptr = costmap_ros_->getCostmap()->getCharMap(); + // Volatile prevents compiler from treating costmap_ptr as unused or changing its address + volatile unsigned char * costmap_ptr = costmap_ros_->getCostmap()->getCharMap(); delete[] costmap_ptr; costmap_ptr = new unsigned char[prop.size_x * prop.size_y]; std::copy(cm.data.begin(), cm.data.end(), costmap_ptr); From beac06419d8a09f20ff01f8e86fb5fe3934f14fc Mon Sep 17 00:00:00 2001 From: Alexey Merzlyakov Date: Thu, 14 May 2020 10:25:02 +0300 Subject: [PATCH 3/3] Fix flake8 E128 failure --- nav2_system_tests/src/system/test_multi_robot_launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nav2_system_tests/src/system/test_multi_robot_launch.py b/nav2_system_tests/src/system/test_multi_robot_launch.py index 5adfa97f17..6f6f9f2e5e 100755 --- a/nav2_system_tests/src/system/test_multi_robot_launch.py +++ b/nav2_system_tests/src/system/test_multi_robot_launch.py @@ -41,9 +41,9 @@ def generate_launch_description(): bringup_dir = get_package_share_directory('nav2_bringup') robot1_params_file = os.path.join(bringup_dir, # noqa: F841 - 'params/nav2_multirobot_params_1.yaml') + 'params/nav2_multirobot_params_1.yaml') robot2_params_file = os.path.join(bringup_dir, # noqa: F841 - 'params/nav2_multirobot_params_2.yaml') + 'params/nav2_multirobot_params_2.yaml') # Names and poses of the robots robots = [