Hi, i am unable to build the package
user:~/ros2_ws$ colcon build
[0.500s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in oneor more underlay workspaces:
‘behaviortree_cpp_v3’ is in: /home/user/ros2_ws/install/behaviortree_cpp_v3, /opt/ros/galactic
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.
If you understand the risks and want to override a package anyways, add the following to the command line:
–allow-overriding behaviortree_cpp_v3
This may be promoted to an error in a future release of colcon-override-check.
Starting >>> behaviortree_cpp_v3
Finished <<< behaviortree_cpp_v3 [2.77s]
Starting >>> behaviortree_ros2
— stderr: behaviortree_ros2
In file included from /home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/test/test_unit4.cpp:1:
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp: In lambda function:
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp:217:7: error: there are no arguments to ‘emitStateChanged’ that depend on a template parameter, so a declaration of ‘emitStateChanged’ must be available [-fpermissive]
217 | emitStateChanged();
| ^~~~~~~~~~~~~~~~
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp:217:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp: In lambda function:
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp:225:7: error: there are no arguments to ‘emitStateChanged’ that depend on a template parameter, so a declaration of ‘emitStateChanged’ must be available [-fpermissive]
225 | emitStateChanged();
| ^~~~~~~~~~~~~~~~
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/test/test_unit4.cpp: In function ‘int main(int, char**)’:
/home/user/ros2_ws/src/bt_course_files/behaviortree_ros2/test/test_unit4.cpp:240:10: error: ‘class BT::Tree’ has no member named ‘sleep’
240 | tree.sleep(std::chrono::milliseconds(200));
| ^~~~~
make[2]: *** [CMakeFiles/test_unit4.dir/build.make:63: CMakeFiles/test_unit4.dir/test/test_unit4.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:133: CMakeFiles/test_unit4.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Failed <<< behaviortree_ros2 [8.58s, exited with code 2]
Summary: 1 package finished [11.7s]
1 package failed: behaviortree_ros2
1 package had stderr output: behaviortree_ros2