Skip to content

Commit ddc8247

Browse files
Merge pull request #996 from EnjoyRobotics/make-sequence-node-inheritable
Make sequence node inheritable
2 parents 08605d1 + 2e8b13e commit ddc8247

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

include/behaviortree_cpp/controls/sequence_node.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ namespace BT
3434
class SequenceNode : public ControlNode
3535
{
3636
public:
37-
SequenceNode(const std::string& name, bool make_async = false);
37+
SequenceNode(const std::string& name, bool make_async = false,
38+
const NodeConfiguration& conf = NodeConfiguration());
3839

3940
virtual ~SequenceNode() override = default;
4041

@@ -43,11 +44,11 @@ class SequenceNode : public ControlNode
4344
protected:
4445
size_t current_child_idx_;
4546

47+
virtual BT::NodeStatus tick() override;
48+
4649
private:
4750
size_t skipped_count_ = 0;
4851
bool asynch_ = false;
49-
50-
virtual BT::NodeStatus tick() override;
5152
};
5253

5354
} // namespace BT

src/controls/sequence_node.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515

1616
namespace BT
1717
{
18-
SequenceNode::SequenceNode(const std::string& name, bool make_async)
19-
: ControlNode::ControlNode(name, {}), current_child_idx_(0), asynch_(make_async)
18+
SequenceNode::SequenceNode(const std::string& name, bool make_async,
19+
const NodeConfiguration& conf)
20+
: ControlNode::ControlNode(name, conf), current_child_idx_(0), asynch_(make_async)
2021
{
2122
if(asynch_)
2223
setRegistrationID("AsyncSequence");

0 commit comments

Comments
 (0)