Remove behavior factory attempt
This commit is contained in:
parent
07bba20386
commit
5b54db02a9
@ -36,7 +36,6 @@ endforeach()
|
|||||||
|
|
||||||
set(CPP_FILES
|
set(CPP_FILES
|
||||||
src/Tree.cpp
|
src/Tree.cpp
|
||||||
src/Factory.cpp
|
|
||||||
src/Extensions.cpp
|
src/Extensions.cpp
|
||||||
src/nodes/WeightedRandomNode.cpp
|
src/nodes/WeightedRandomNode.cpp
|
||||||
src/nodes/AmICalled.cpp
|
src/nodes/AmICalled.cpp
|
||||||
@ -52,27 +51,10 @@ set(CPP_FILES
|
|||||||
src/nodes/ActorMovement.cpp
|
src/nodes/ActorMovement.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(tree_plugins_base src/Factory.cpp)
|
|
||||||
set_property(TARGET tree_plugins_base PROPERTY CXX_STANDARD 17)
|
|
||||||
add_executable(tree ${CPP_FILES})
|
add_executable(tree ${CPP_FILES})
|
||||||
set_property(TARGET tree PROPERTY CXX_STANDARD 17)
|
set_property(TARGET tree PROPERTY CXX_STANDARD 17)
|
||||||
ament_target_dependencies(tree_plugins_base ${DEPENDENCIES})
|
|
||||||
ament_target_dependencies(tree ${DEPENDENCIES})
|
ament_target_dependencies(tree ${DEPENDENCIES})
|
||||||
|
|
||||||
pluginlib_export_plugin_description_file(behaviortree_cpp_v3 plugins.xml)
|
|
||||||
|
|
||||||
#add_executable(talker src/publisher_member_function.cpp)
|
|
||||||
#ament_target_dependencies(talker geometry_msgs rclcpp)
|
|
||||||
#add_executable(listener src/subscriber_member_function.cpp)
|
|
||||||
#ament_target_dependencies(listener geometry_msgs rclcpp)
|
|
||||||
|
|
||||||
install(TARGETS
|
|
||||||
tree_plugins_base
|
|
||||||
EXPORT export_${PROJECT_NAME}
|
|
||||||
ARCHIVE DESTINATION lib
|
|
||||||
LIBRARY DESTINATION lib
|
|
||||||
RUNTIME DESTINATION bin)
|
|
||||||
|
|
||||||
install(TARGETS
|
install(TARGETS
|
||||||
tree
|
tree
|
||||||
DESTINATION lib/${PROJECT_NAME})
|
DESTINATION lib/${PROJECT_NAME})
|
||||||
@ -88,11 +70,4 @@ if (BUILD_TESTING)
|
|||||||
ament_lint_auto_find_test_dependencies()
|
ament_lint_auto_find_test_dependencies()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
ament_export_libraries(
|
|
||||||
tree_plugins_base
|
|
||||||
)
|
|
||||||
ament_export_targets(
|
|
||||||
export_${PROJECT_NAME}
|
|
||||||
)
|
|
||||||
|
|
||||||
ament_package()
|
ament_package()
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
<library path="btree_nodes">
|
|
||||||
<class type="Factory" base_class_type="BT::BehaviorTreeFactory">
|
|
||||||
<description>Ye.</description>
|
|
||||||
</class>
|
|
||||||
</library>
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by bastian on 18.08.22.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "Factory.h"
|
|
||||||
|
|
||||||
|
|
||||||
BT::ActorNodeFactory::ActorNodeFactory() {
|
|
||||||
auto YES = [](BT::TreeNode &parent_node) -> BT::NodeStatus {
|
|
||||||
return BT::NodeStatus::SUCCESS;
|
|
||||||
};
|
|
||||||
|
|
||||||
registerSimpleCondition("YES!", YES);
|
|
||||||
}
|
|
||||||
|
|
||||||
PLUGINLIB_EXPORT_CLASS(BT::ActorNodeFactory, BT::BehaviorTreeFactory)
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by bastian on 18.08.22.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef BUILD_FACTORY_H
|
|
||||||
#define BUILD_FACTORY_H
|
|
||||||
|
|
||||||
#include <behaviortree_cpp_v3/bt_factory.h>
|
|
||||||
#include <pluginlib/class_list_macros.hpp>
|
|
||||||
|
|
||||||
namespace BT{
|
|
||||||
class ActorNodeFactory : public BT::BehaviorTreeFactory {
|
|
||||||
public:
|
|
||||||
ActorNodeFactory();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //BUILD_FACTORY_H
|
|
||||||
Loading…
x
Reference in New Issue
Block a user