MROS-RobMoSys-ITP / Pilot-URJC

7 stars 4 forks source link

--- stderr: nav2_behavior_tree #20

Closed chcorbato closed 4 years ago

chcorbato commented 4 years ago

Current install instructions crash:

--- stderr: nav2_behavior_tree                                                                                                                                                          
In file included from /home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/src/behavior_tree_engine.cpp:15:0:
/home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp: In lambda function:
/home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp:61:45: error: ‘void BT::TreeNode::setStatus(BT::NodeStatus)’ is protected within this context
         node->setStatus(BT::NodeStatus::IDLE);
                                             ^
In file included from /home/chcorbato/mros_itp_ws/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/control_node.h:18:0,
                 from /home/chcorbato/mros_itp_ws/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/controls/parallel_node.h:18,
                 from /home/chcorbato/mros_itp_ws/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/behavior_tree.h:17,
                 from /home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp:22,
                 from /home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/src/behavior_tree_engine.cpp:15:
/home/chcorbato/mros_itp_ws/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/tree_node.h:170:10: note: declared protected here
     void setStatus(NodeStatus new_status);
          ^~~~~~~~~
/home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/src/behavior_tree_engine.cpp: In member function ‘nav2_behavior_tree::BtStatus nav2_behavior_tree::BehaviorTreeEngine::run(std::unique_ptr<BT::Tree>&, std::function<void()>, std::function<bool()>, std::chrono::milliseconds)’:
/home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/src/behavior_tree_engine.cpp:50:13: error: ‘class BT::Tree’ has no member named ‘root_node’; did you mean ‘rootNode’?
       tree->root_node->halt();
             ^~~~~~~~~
             rootNode
/home/chcorbato/mros_itp_ws/src/navigation2/nav2_behavior_tree/src/behavior_tree_engine.cpp:56:20: error: ‘class BT::Tree’ has no member named ‘root_node’; did you mean ‘rootNode’?
     result = tree->root_node->executeTick();
                    ^~~~~~~~~
                    rootNode
make[2]: *** [CMakeFiles/nav2_behavior_tree.dir/src/behavior_tree_engine.cpp.o] Error 1
make[1]: *** [CMakeFiles/nav2_behavior_tree.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< nav2_behavior_tree [ Exited with code 2 ]

I have fixed this by using BehaviourTree.CPP tag 3.1.1

This needs to be fixed in the installation dependencies.

fmrico commented 4 years ago

I have to check if that is the standard release for eloquent. For sure it is for foxy

marioney commented 4 years ago

I have fixed this by using BehaviourTree.CPP tag 3.1.1

Same here, although I used the BehaviourTree.CPP tag ros2-3.1.1 to solve it.

I'm still getting compile errors but I think they're from #22

fmrico commented 4 years ago

Hi Mario

Behavior Tree in Eloquent has some known issues.

My recommendation in Eloquent:

Of course, don't use Nav2 master. It is for Foxy. Use release 0.3.4 instead.

Hope it helps!!

chcorbato commented 4 years ago

My recommendation in Eloquent:

  • Do a git checkout to 0ab3895
  • Add set(CMAKE_CXX_STANDARD 17) to CMakeLists.txt in behaviortree_cpp_v3 package.

Of course, don't use Nav2 master. It is for Foxy. Use release 0.3.4 instead.

Could we keep track of these installation instructions somewhere for the MROS team? I create a thread in https://discourse.robmosys.eu/t/software-setup-for-mros-development/260/5 but maybe it should be in the GitHub repos. What do you think @fmrico @marioney ?

marioney commented 4 years ago

Thanks a lot, I manage to compile everything but the bica_examples which I just delete on my ws

Of course, don't use Nav2 master. It is for Foxy. Use release 0.3.4 instead.

I'm not sure what do you mean by this, from what I see this is using a fork from nav2

    url: https://github.com/MROS-RobMoSys-ITP/navigation2.git
    version: pilot-urj
marioney commented 4 years ago

Could we keep track of these installation instructions somewhere for the MROS team?

Maybe we can just update the Readme and the dependencies on this repo,

fmrico commented 4 years ago

This issue and #22 are related to using C++17 in Bica. The fix is removing explicit set to c++17. I will work this morning on fixing it.

chcorbato commented 4 years ago

This was fixed, as far as I know, so I am closing. Please re-open if this is not correct.