From dd7e1fc088f20501cac0241bb8fa3e09d38672ce Mon Sep 17 00:00:00 2001 From: Stevedan Ogochukwu Omodolor <61468301+stevedanomodolor@users.noreply.github.com> Date: Thu, 20 Jun 2024 23:45:09 +0200 Subject: [PATCH] Feat/port upown tests to new gazebo (#4454) * minor speeling check Signed-off-by: stevedan * minor changes Signed-off-by: stevedan * minor changes Signed-off-by: stevedan --------- Signed-off-by: stevedan Signed-off-by: Steve Macenski Co-authored-by: Steve Macenski --- nav2_system_tests/CMakeLists.txt | 2 +- nav2_system_tests/src/updown/README.md | 2 +- nav2_system_tests/src/updown/test_updown_launch.py | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/nav2_system_tests/CMakeLists.txt b/nav2_system_tests/CMakeLists.txt index acd3d0c2a7..13576a6cdd 100644 --- a/nav2_system_tests/CMakeLists.txt +++ b/nav2_system_tests/CMakeLists.txt @@ -117,8 +117,8 @@ if(BUILD_TESTING) add_subdirectory(src/localization) add_subdirectory(src/system) add_subdirectory(src/system_failure) + add_subdirectory(src/updown) # Uncomment after https://github.com/ros-navigation/navigation2/pull/3634 - # add_subdirectory(src/updown) # add_subdirectory(src/waypoint_follower) # add_subdirectory(src/gps_navigation) # add_subdirectory(src/behaviors/spin) diff --git a/nav2_system_tests/src/updown/README.md b/nav2_system_tests/src/updown/README.md index 6756d52465..ff84569c3a 100644 --- a/nav2_system_tests/src/updown/README.md +++ b/nav2_system_tests/src/updown/README.md @@ -14,7 +14,7 @@ If the test passes, you should see this comment in the output: To run the test in a loop 1000x, run the `test_updown_reliablity` script and log the output: ``` -./test_updown_reliablity |& tee /tmp/updown.log +./test_updown_reliability |& tee /tmp/updown.log ``` When the test is completed, pipe the log to the `updownresults.py` script to get a summary of the results: ``` diff --git a/nav2_system_tests/src/updown/test_updown_launch.py b/nav2_system_tests/src/updown/test_updown_launch.py index 458779411b..760f458d57 100755 --- a/nav2_system_tests/src/updown/test_updown_launch.py +++ b/nav2_system_tests/src/updown/test_updown_launch.py @@ -25,11 +25,9 @@ def generate_launch_description(): # Configuration parameters for the launch - launch_dir = os.path.join(get_package_share_directory('nav2_bringup'), 'launch') + nav2_bringup_dir = get_package_share_directory('nav2_bringup') - map_yaml_file = os.path.join( - get_package_share_directory('nav2_system_tests'), 'maps/map_circular.yaml' - ) + map_yaml_file = os.path.join(nav2_bringup_dir, 'maps', 'tb3_sandbox.yaml') # Specify the actions start_tf_cmd_1 = Node( @@ -61,7 +59,8 @@ def generate_launch_description(): ) nav2_bringup = launch.actions.IncludeLaunchDescription( - PythonLaunchDescriptionSource(os.path.join(launch_dir, 'bringup_launch.py')), + PythonLaunchDescriptionSource( + os.path.join(nav2_bringup_dir, 'launch', 'bringup_launch.py')), launch_arguments={ 'map': map_yaml_file, 'use_sim_time': 'True', @@ -77,7 +76,7 @@ def generate_launch_description(): 'lib/nav2_system_tests/test_updown', ) ], - cwd=[launch_dir], + cwd=[nav2_bringup_dir], output='screen', )