dummy_nodes.cpp
Go to the documentation of this file.
1 #include "dummy_nodes.h"
2 
3 // This function must be implemented in the .cpp file to create
4 // a plugin that can be loaded at run-time
6 {
8 }
9 
10 namespace DummyNodes
11 {
13 {
14  std::cout << "Robot says: \"Hello!!!\"" << std::endl;
16 }
17 
19 {
20  std::cout << "[ Battery: OK ]" << std::endl;
22 }
23 
25 {
26  std::cout << "[ Temperature: OK ]" << std::endl;
28 }
29 
31 {
32  _opened = true;
33  std::cout << "GripperInterface::open" << std::endl;
35 }
36 
38 {
39  std::cout << "GripperInterface::close" << std::endl;
40  _opened = false;
42 }
43 
45 {
46  std::cout << "ApproachObject: " << this->name() << std::endl;
48 }
49 
51 {
52  std::string msg;
53  if (getParam("message", msg) == false)
54  {
55  // if getParam failed, use the default value
56  msg = requiredNodeParameters().at("message");
57  }
58  std::cout << "Robot says: " << msg << std::endl;
60 }
61 }
BT::NodeStatus SayHello()
Definition: dummy_nodes.cpp:12
void RegisterNodes(BT::BehaviorTreeFactory &factory)
Definition: dummy_nodes.h:67
BT::NodeStatus CheckTemperature()
Definition: dummy_nodes.cpp:24
BT::NodeStatus tick() override
Method to be implemented by the user.
Definition: dummy_nodes.cpp:50
NodeStatus
Definition: basic_types.h:28
BT_REGISTER_NODES(factory)
Definition: dummy_nodes.cpp:5
BT::NodeStatus tick() override
Method to be implemented by the user.
Definition: dummy_nodes.cpp:44
BT::NodeStatus CheckBattery()
Definition: dummy_nodes.cpp:18


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sun Feb 3 2019 03:14:32