Open6
ROS1 NoeticでBehaviorTree.CPPを使う
現在apt
でインストールできるros-noetic-behaviortree-cpp-v3
(3.5.6)では、CoroAction
nodeが利用できない。元リポジトリにissueが立っているが、まだ解決されていない
BehaviorTree.CPPを全部書くと長いので、以下BT.CPPと表記する
BT.CPPでは、ビルド時にBoost coroutine
がインストールされているかを調べ、なければCoroAction
関係はビルドされなくなる https://github.com/BehaviorTree/BehaviorTree.CPP/blob/0bff68a051a05e0b60a6908750d91ce6079c8685/CMakeLists.txt#L19
ROS buildfarmのログを見ると、noetic版をビルドする際に何故かboostが見つからないようで、coroutineが無効化されている
boostがインストールされたローカル環境README.md
でBT.CPPをビルドすると、coroutineを有効化してビルド/インストールすることはできる
mkdir build; cd build
cmake ..
make
sudo make install
が、ROS packageのCMakeLists.txt
のfind_package()
にbehaviortree_cpp_v3
を追加してcatkin build
するとエラーになる
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"behaviortree_cpp_v3" with any of the following names:
behaviortree_cpp_v3Config.cmake
behaviortree_cpp_v3-config.cmake
Add the installation prefix of "behaviortree_cpp_v3" to CMAKE_PREFIX_PATH
or set "behaviortree_cpp_v3_DIR" to a directory containing one of the above
files. If "behaviortree_cpp_v3" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:11 (find_package)
make: *** [Makefile:854: cmake_check_build_system] Error 1
結局、BT.CPPを$ROS_PACKAGE_PATH
(~/catkin_ws/src等)に移動してcatkin build
すると、問題なくビルドできた