From e6bde1e7c26575fdb790e42ca68ecf00f8954a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 29 Sep 2024 22:03:23 +0200 Subject: [PATCH] Reactivate tests for example_15 (#546) * Revert "Deactivate failing tests for example_15" This reverts commit 0c3c9786baff703dd0a816f528b8bbc2d346bdff. * Remove RegisterEventHandlers (cherry picked from commit 8796c3b9cdf34b2563fea2b3f73feb4af6011021) --- example_15/CMakeLists.txt | 5 ++-- .../bringup/launch/rrbot_base.launch.py | 11 +-------- .../bringup/launch/rrbot_namespace.launch.py | 23 ++----------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/example_15/CMakeLists.txt b/example_15/CMakeLists.txt index 2ca67931b..53ab216dc 100644 --- a/example_15/CMakeLists.txt +++ b/example_15/CMakeLists.txt @@ -28,9 +28,8 @@ install( if(BUILD_TESTING) find_package(ament_cmake_pytest REQUIRED) - # TODO(christophfroehlich) deactivated because of bug in spawner - # ament_add_pytest_test(test_rrbot_namespace_launch test/test_rrbot_namespace_launch.py) - # ament_add_pytest_test(test_multi_controller_manager_launch test/test_multi_controller_manager_launch.py) + ament_add_pytest_test(test_rrbot_namespace_launch test/test_rrbot_namespace_launch.py) + ament_add_pytest_test(test_multi_controller_manager_launch test/test_multi_controller_manager_launch.py) endif() diff --git a/example_15/bringup/launch/rrbot_base.launch.py b/example_15/bringup/launch/rrbot_base.launch.py index b64b4e192..6852c117c 100644 --- a/example_15/bringup/launch/rrbot_base.launch.py +++ b/example_15/bringup/launch/rrbot_base.launch.py @@ -220,20 +220,11 @@ def generate_launch_description(): ) ) - # Delay start of joint_state_broadcaster after `robot_controller` - # TODO(anyone): This is a workaround for flaky tests. Remove when fixed. - delay_joint_state_broadcaster_after_robot_controller_spawner = RegisterEventHandler( - event_handler=OnProcessExit( - target_action=robot_controller_spawner, - on_exit=[joint_state_broadcaster_spawner], - ) - ) - nodes = [ control_node, robot_state_pub_node, robot_controller_spawner, - delay_joint_state_broadcaster_after_robot_controller_spawner, + joint_state_broadcaster_spawner, delay_rviz_after_joint_state_broadcaster_spawner, ] diff --git a/example_15/bringup/launch/rrbot_namespace.launch.py b/example_15/bringup/launch/rrbot_namespace.launch.py index b3c70aca6..a39f5dee4 100644 --- a/example_15/bringup/launch/rrbot_namespace.launch.py +++ b/example_15/bringup/launch/rrbot_namespace.launch.py @@ -128,32 +128,13 @@ def generate_launch_description(): ) ) - # Delay start of joint_state_broadcaster after `robot_controller` - # TODO(anyone): This is a workaround for flaky tests. Remove when fixed. - delay_joint_state_broadcaster_after_robot_controller_spawner = RegisterEventHandler( - event_handler=OnProcessExit( - target_action=robot_forward_position_controller_spawner, - on_exit=[joint_state_broadcaster_spawner], - ) - ) - - # Delay start of robot_controller after `joint_state_broadcaster` - delay_robot_position_trajectory_controller_spawner_after_joint_state_broadcaster_spawner = ( - RegisterEventHandler( - event_handler=OnProcessExit( - target_action=joint_state_broadcaster_spawner, - on_exit=[robot_position_trajectory_controller_spawner], - ) - ) - ) - nodes = [ control_node, robot_state_pub_node, delay_rviz_after_joint_state_broadcaster_spawner, robot_forward_position_controller_spawner, - delay_joint_state_broadcaster_after_robot_controller_spawner, - delay_robot_position_trajectory_controller_spawner_after_joint_state_broadcaster_spawner, + joint_state_broadcaster_spawner, + robot_position_trajectory_controller_spawner, ] return LaunchDescription(declared_arguments + nodes)