Groot icon indicating copy to clipboard operation
Groot copied to clipboard

Compilation using catkin results error due to missing flatbuffers header

Open mbuijs opened this issue 6 years ago • 4 comments

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"                                                                                                                                
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mbuijs avatar May 17 '19 12:05 mbuijs

Thanks for reporting, I will check it out

facontidavide avatar May 17 '19 14:05 facontidavide

@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

jimmyshe avatar Sep 17 '19 04:09 jimmyshe

I can confirm this issue is down to flatbuffers/stl_emulation.h not being exported from behaviortree

mark-goodall avatar Oct 03 '19 09:10 mark-goodall

...and I can confirm that I have little time to address this, so any Pull Request is welcome

facontidavide avatar Oct 03 '19 10:10 facontidavide