ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.5k stars 1.27k forks source link

Enable reloading BT xml file with same name (backport #4209) #4422

Closed christophfroehlich closed 3 months ago

christophfroehlich commented 3 months ago

Manual backport of https://github.com/ros-navigation/navigation2/pull/4209#issuecomment-2155106680 to humble.

The current test results for humble and this branch are the same:

$ colcon test-result
build/nav2_behavior_tree/Testing/20240612-0708/Test.xml: 57 tests, 0 errors, 4 failures, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/cpplint.xunit.xml: 165 tests, 0 errors, 4 failures, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_action_navigate_through_poses_action.gtest.xml: 1 test, 0 errors, 1 failure, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/test_single_trigger_node.gtest.xml: 1 test, 0 errors, 1 failure, 0 skipped
build/nav2_behavior_tree/test_results/nav2_behavior_tree/uncrustify.xunit.xml: 163 tests, 0 errors, 2 failures, 0 skipped
mergify[bot] commented 3 months ago

@christophfroehlich, all pull requests must be targeted towards the main development branch. Once merged into main, it is possible to backport to @humble, but it must be in main to have these changes reflected into new distributions.

SteveMacenski commented 3 months ago

test_action_navigate_through_poses_action

What's this one?

christophfroehlich commented 3 months ago

On humble branch after a clean build:

    [==========] Running 1 test from 1 test suite.
    [----------] Global test environment set-up.
    [----------] 1 test from NavigateThroughPosesActionTestFixture
    [ RUN      ] NavigateThroughPosesActionTestFixture.test_tick
    goals (std::vector<geometry_msgs::msg::PoseStamped_<std::allocator<void> >, std::allocator<geometry_msgs::msg::PoseStamped_<std::allocator<void> > > >) -> full
    initial_pose_received (bool) -> full
    wait_for_service_timeout (std::chrono::duration<long, std::ratio<1l, 1000l> >) -> full
    bt_loop_duration (std::chrono::duration<long, std::ratio<1l, 1000l> >) -> full
    server_timeout (std::chrono::duration<long, std::ratio<1l, 1000l> >) -> full
    node (std::shared_ptr<rclcpp::Node>) -> full
    unknown file: Failure
    C++ exception with description "The creation of the tree failed because the port [goals] was initially created with type [std::vector<geometry_msgs::msg::PoseStamped_<std::allocator<void> >, std::allocator<geometry_msgs::msg::PoseStamped_<std::allocator<void> > > >] and, later type [geometry_msgs::msg::PoseStamped_<std::allocator<void> >] was used somewhere else." thrown in the test body.
    [  FAILED  ] NavigateThroughPosesActionTestFixture.test_tick (0 ms)
    [----------] 1 test from NavigateThroughPosesActionTestFixture (0 ms total)