Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
pipeline_sequence.hpp
1 // Copyright (c) 2019 Intel Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__CONTROL__PIPELINE_SEQUENCE_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__CONTROL__PIPELINE_SEQUENCE_HPP_
17 
18 #include <string>
19 #include "behaviortree_cpp/control_node.h"
20 #include "behaviortree_cpp/bt_factory.h"
21 
22 namespace nav2_behavior_tree
23 {
24 
55 class PipelineSequence : public BT::ControlNode
56 {
57 public:
62  explicit PipelineSequence(const std::string & name);
63 
69  PipelineSequence(const std::string & name, const BT::NodeConfiguration & config);
70 
74  void halt() override;
75 
80  static BT::PortsList providedPorts() {return {};}
81 
82 protected:
87  BT::NodeStatus tick() override;
88 
89  std::size_t last_child_ticked_ = 0;
90 };
91 } // namespace nav2_behavior_tree
92 
93 #endif // NAV2_BEHAVIOR_TREE__PLUGINS__CONTROL__PIPELINE_SEQUENCE_HPP_
Type of sequence node that re-ticks previous children when a child returns running.
void halt() override
The other (optional) override required by a BT action to reset node state.
BT::NodeStatus tick() override
The main override required by a BT action.
static BT::PortsList providedPorts()
Creates list of BT ports.
PipelineSequence(const std::string &name)
A constructor for nav2_behavior_tree::PipelineSequence.