Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviortree build errors #1

Closed
MurMa opened this issue Sep 4, 2020 · 4 comments
Closed

Behaviortree build errors #1

MurMa opened this issue Sep 4, 2020 · 4 comments

Comments

@MurMa
Copy link

MurMa commented Sep 4, 2020

We are trying to build the project for testing and are having some problems with behaviortree.

First, we had errors with "setStatus" and "root_node" which we solved by manually installing the branch "ros2_devel" of behaviortree_cpp_v3 (https://github.com/BehaviorTree/BehaviorTree.CPP/tree/ros2-devel). It seems like the changes which are on the master branch today are not backwards compatible.

Now, we got another error: We are trying to build the project by executing colcon build in the kmriiwa_ws folder.
Any help is appreciated!

This is the error message:

...
Starting >>> moveit_core
--- stderr: kmr_behaviortree
CMakeFiles/behavior_tree_node.dir/src/behavior_tree_node.cpp.o: In function `std::_Function_handler<void (BT::TreeNode*), kmr_behavior_tree::BehaviorTreeEngine::haltAllActions(BT::TreeNode*)::{lambda(BT::TreeNode*)#1}>::_M_invoke(std::_Any_data const&, BT::TreeNode*&&)':
behavior_tree_node.cpp:(.text._ZNSt17_Function_handlerIFvPN2BT8TreeNodeEEZN17kmr_behavior_tree18BehaviorTreeEngine14haltAllActionsES2_EUlS2_E_E9_M_invokeERKSt9_Any_dataOS2_[_ZNSt17_Function_handlerIFvPN2BT8TreeNodeEEZN17kmr_behavior_tree18BehaviorTreeEngine14haltAllActionsES2_EUlS2_E_E9_M_invokeERKSt9_Any_dataOS2_]+0xb): undefined reference to `typeinfo for BT::CoroActionNode'
collect2: error: ld returned 1 exit status
make[2]: *** [behavior_tree_node] Error 1
make[1]: *** [CMakeFiles/behavior_tree_node.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< kmr_behaviortree [5.10s, exited with code 2]
Aborted  <<< moveit_core [3.62s]

Summary: 23 packages finished [14.1s]
  1 package failed: kmr_behaviortree
  1 package aborted: moveit_core
  2 packages had stderr output: kmr_behaviortree moveit_core
  11 packages not processed
@MurMa
Copy link
Author

MurMa commented Sep 16, 2020

We "solved" this problem by commenting three lines of code in the file kmriiwa_ws/kmr_behaviortree/include/kmr_behaviortree/behavior_tree_engine.hpp. It seems like navigation2 is running fine without it.

@MurMa MurMa closed this as completed Sep 16, 2020
@MortenMDahl
Copy link

@MurMa

Could I ask which lines you commented out? Thanks!

@MurMa
Copy link
Author

MurMa commented Sep 22, 2020

We had to comment out lines 47-49:

if (auto action = dynamic_cast<BT::CoroActionNode *>(node)) {
    action->halt();
}

The error we got had to do with the dynamic cast.

@liushuya7
Copy link

Reference Issue#1686: Migrate from deprecated BehaviorTree.CPP APIs
ros-navigation/navigation2#1686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants