forked from BehaviorTree/BehaviorTree.CPP
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a25e96d
commit 0f9ebb2
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ enum class NodeType | |
{ | ||
UNDEFINED = 0, | ||
ACTION, | ||
INTERACTION, | ||
CONDITION, | ||
ASSUMPTIONCHECKER, | ||
CONTROL, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef INTERACTIONNODE_H | ||
#define INTERACTIONNODE_H | ||
|
||
#include "leaf_node.h" | ||
#include "behaviortree_cpp/action_node.h" | ||
|
||
namespace BT | ||
{ | ||
class InteractionNode : public SyncActionNode | ||
{ | ||
public: | ||
InteractionNode(const std::string& name, const NodeConfig& config); | ||
~InteractionNode() override = default; | ||
|
||
/// throws if the derived class return RUNNING. | ||
virtual NodeStatus executeTick() override; | ||
|
||
virtual NodeType type() const override final | ||
{ | ||
return NodeType::INTERACTION; | ||
} | ||
}; | ||
} // namespace BT | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "behaviortree_cpp/interaction_node.h" | ||
|
||
namespace BT | ||
{ | ||
InteractionNode::InteractionNode(const std::string& name, const NodeConfig& config) | ||
: SyncActionNode(name, config) | ||
{} | ||
} |