Compilation using catkin results error due to missing flatbuffers header
Is compilation using catkin (catkin-tools) still supported? I assumed that it was possible, since the readme states the following:
Some functionalities of the code related to ROS will work only if the project is compiled with with catkin.
After installed BehaviorTree.CPP through apt (ros-melodic-behaviortree-cpp-v3), I get the following errors when I try catkin build:
In file included from /opt/ros/melodic/include/behaviortree_cpp/flatbuffers/flatbuffers.h:20:0,
from /opt/ros/melodic/include/behaviortree_cpp/flatbuffers/BT_logger_generated.h:7,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/utils.h:10,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/models/BehaviorTreeNodeModel.hpp:17,
from /mnt/data/git/github/groot_ws/src/groot/bt_editor/models/BehaviorTreeNodeModel.cpp:1:
/opt/ros/melodic/include/behaviortree_cpp/flatbuffers/base.h:56:10: fatal error: flatbuffers/stl_emulation.h: No such file or directory
#include "flatbuffers/stl_emulation.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for reporting, I will check it out
@mbuijs I encountered the same problem, using catkin tool for building this. The problem is due to that stl_emulation.h is not export properly in BehaviorTree.CPP. So when Groot tries to build it, Groot can not find this header file.
Also, there are some link issues when the header problems are resolved.
eg
using
target_link_libraries(Groot behavior_tree_editor ${GROOT_DEPENDENCIES} )
instead of
target_link_libraries(Groot behavior_tree_editor behaviortree_cpp_v3 )
I just hardcode these two packages around for a quick fix right now. I am experimenting with the BT system, so I am not planning for creating a pull request.
Hope my discovery can help @facontidavide
I can confirm this issue is down to flatbuffers/stl_emulation.h not being exported from behaviortree
...and I can confirm that I have little time to address this, so any Pull Request is welcome