Skip to content

Nav2 single trigger node test fail-> halt does not does not convert state to idle #3310

@stevedanomodolor

Description

@stevedanomodolor

Bug report

Required Info:

  • Operating System: ubuntu 22
  • ROS2 Version: rolling
  • Version or commit hash:
  • DDS implementation:

Steps to reproduce issue

  • Building current nav2 codebase

Expected behavior

All test should pass

Actual behavior

/opt/overlay_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:75
Expected equality of these values:
  bt_node_->executeTick()
    Which is: FAILURE
  BT::NodeStatus::RUNNING
    Which is: RUNNING/opt/overlay_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:77
Expected equality of these values:
  bt_node_->executeTick()
    Which is: FAILURE
  BT::NodeStatus::SUCCESS
    Which is: SUCCESS

Additional information

  • I tried debuging to finding the root of the issue, it seem that the halt function does not change the bt node to idle, it just remains in failure. The single node plugin is acting as it is supposed to.
    This is bad debugging style but It shows what I mean, for example the test for the single node plugins,
std::cout << "Testing from here" << std::endl;
 std::cout << "Dummy node -> Status() :" << dummy_node_->status() << std::endl;
 std::cout << "Bt node -> Status() :" << bt_node_->status() << std::endl;

 bt_node_->halt();
 std::cout << "Dummy node -> Status() :" << dummy_node_->status() << std::endl;
 std::cout << "Bt node -> Status() :" << bt_node_->status() << std::endl;
 dummy_node_->changeStatus(BT::NodeStatus::RUNNING);
 std::cout << "Dummy node -> Status() :" << dummy_node_->status() << std::endl;
 std::cout << "Bt node -> Status() :" << bt_node_->status() << std::endl;
 EXPECT_EQ(bt_node_->executeTick(), BT::NodeStatus::RUNNING);
 std::cout << "Dummy node -> Status() :" << dummy_node_->status() << std::endl;
 std::cout << "Bt node -> Status() :" << bt_node_->status() << std::endl;
 dummy_node_->changeStatus(BT::NodeStatus::SUCCESS);
 std::cout << "Dummy node -> Status() :" << dummy_node_->status() << std::endl;
 std::cout << "Bt node -> Status() :" << bt_node_->status() << std::endl;

As you will see below, the bt node is never able to back to idle.

Here: SUCCESS
23: Testing from here
23: Dummy node -> Status() :IDLE
23: Bt node -> Status() :FAILURE
23: Dummy node -> Status() :IDLE
23: Bt node -> Status() :FAILURE
23: Dummy node -> Status() :RUNNING
23: Bt node -> Status() :FAILURE
23: /opt/overlay_ws/src/navigation2/nav2_behavior_tree/test/plugins/decorator/test_single_trigger_node.cpp:83: Failure
23: Expected equality of these values:
23:   bt_node_->executeTick()
23:     Which is: FAILURE
23:   BT::NodeStatus::RUNNING
23:     Which is: RUNNING
23: Dummy node -> Status() :RUNNING
23: Bt node -> Status() :FAILURE
23: Dummy node -> Status() :SUCCESS
23: Bt node -> Status() :FAILURE
23: [  FAILED  ] SingleTriggerTestFixture.test_behavior (0 ms)
23: [----------] 1 test from SingleTriggerTestFixture (0 ms total)
23: 
23: [----------] Global test environment tear-down
23: [==========] 1 test from 1 test suite ran. (115 ms total)
23: [  PASSED  ] 0 tests.
23: [  FAILED  ] 1 test, listed below:
23: [  FAILED  ] SingleTriggerTestFixture.test_behavior
23: 
23:  1 FAILED TEST
23: -- run_test.py: return code 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions