diff --git a/nav2_system_tests/src/error_codes/test_error_codes.py b/nav2_system_tests/src/error_codes/test_error_codes.py index a5f2b84d97..47d7673326 100755 --- a/nav2_system_tests/src/error_codes/test_error_codes.py +++ b/nav2_system_tests/src/error_codes/test_error_codes.py @@ -79,6 +79,9 @@ def main(argv=sys.argv[1:]): assert ( navigator.result_future.result().result.error_code == error_code ), 'Follow path error code does not match' + assert ( + navigator.result_future.result().result.error_msg != "" + ), 'Follow path error_msg is empty' else: assert False, 'Follow path was rejected' @@ -111,6 +114,9 @@ def main(argv=sys.argv[1:]): assert ( result.error_code == error_code ), 'Compute path to pose error does not match' + assert ( + result.error_msg != "" + ), 'Compute path to pose error_msg empty' def cancel_task(): time.sleep(1) @@ -145,6 +151,9 @@ def cancel_task(): assert ( result.error_code == error_code ), 'Compute path through pose error does not match' + assert ( + result.error_msg != "" + ), 'Compute path through pose error_msg is empty' # Check compute path to pose cancel threading.Thread(target=cancel_task).start() result = navigator._getPathThroughPosesImpl(initial_pose, goal_poses, 'cancelled') @@ -182,6 +191,7 @@ def cancel_task(): for smoother, error_code in smoother.items(): result = navigator._smoothPathImpl(a_path, smoother) assert result.error_code == error_code, 'Smoother error does not match' + assert result.error_msg != "", 'Smoother error_msg is empty' navigator.lifecycleShutdown() rclpy.shutdown() diff --git a/nav2_system_tests/src/gps_navigation/tester.py b/nav2_system_tests/src/gps_navigation/tester.py index 56064aa9ac..e0fb0b3442 100755 --- a/nav2_system_tests/src/gps_navigation/tester.py +++ b/nav2_system_tests/src/gps_navigation/tester.py @@ -190,6 +190,9 @@ def main(argv=sys.argv[1:]): test.action_result.missed_waypoints[0].error_code == ComputePathToPose.Result().GOAL_OUTSIDE_MAP ) + assert ( + test.action_result.missed_waypoints[0].error_msg != "" + ) # stop on failure test with bogous waypoint test.setStopFailureParam(True) diff --git a/nav2_system_tests/src/waypoint_follower/tester.py b/nav2_system_tests/src/waypoint_follower/tester.py index b5df396006..40bc41098a 100755 --- a/nav2_system_tests/src/waypoint_follower/tester.py +++ b/nav2_system_tests/src/waypoint_follower/tester.py @@ -241,6 +241,7 @@ def main(argv=sys.argv[1:]): test.action_result.missed_waypoints[0].error_code == ComputePathToPose.Result().GOAL_OUTSIDE_MAP ) + assert (test.action_result.missed_waypoints[0].error_msg != "") # stop on failure test with bogous waypoint test.setStopFailureParam(True)