Skip to content
Snippets Groups Projects
Commit 85939afd authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added two actions: one to generate a success state and the other one to generate a failure state.

parent 28174716
No related branches found
No related tags found
1 merge request!1Revert "Added two actions: one to generate a success state and the other one...
......@@ -37,6 +37,8 @@ class IriBTBasicNodes
*
*/
BT::NodeStatus RUNNING(void);
BT::NodeStatus FAILURE(void);
BT::NodeStatus SUCCESS(void);
BT::NodeStatus is_variable_true(BT::TreeNode& self);
BT::NodeStatus is_variable_false(BT::TreeNode& self);
BT::NodeStatus transform_pose(BT::TreeNode& self);
......
......@@ -18,6 +18,8 @@ void IriBTBasicNodes::init(IriBehaviorTreeFactory &factory)
factory.registerSimpleCondition("is_variable_false", std::bind(&IriBTBasicNodes::is_variable_false, this, std::placeholders::_1),check_variable_ports);
factory.registerIriAsyncAction("RUNNING", std::bind(&IriBTBasicNodes::RUNNING, this));
factory.registerIriAsyncAction("FAILURE", std::bind(&IriBTBasicNodes::FAILURE, this));
factory.registerIriAsyncAction("SUCCESS", std::bind(&IriBTBasicNodes::SUCCESS, this));
factory.registerSimpleAction("transform_pose", std::bind(&IriBTBasicNodes::transform_pose, this, std::placeholders::_1),transform_pose_ports);
factory.registerSimpleAction("compute_distance", std::bind(&IriBTBasicNodes::compute_distance, this, std::placeholders::_1),compute_distance_ports);
factory.registerSimpleAction("compare_bigger", std::bind(&IriBTBasicNodes::compare_bigger, this, std::placeholders::_1),compare_ports);
......@@ -162,6 +164,15 @@ BT::NodeStatus IriBTBasicNodes::compare_smaller(BT::TreeNode& self)
BT::NodeStatus IriBTBasicNodes::RUNNING()
{
return BT::NodeStatus::RUNNING;
return BT::NodeStatus::RUNNING;
}
BT::NodeStatus IriBTBasicNodes::FAILURE()
{
return BT::NodeStatus::FAILURE;
}
BT::NodeStatus IriBTBasicNodes::SUCCESS()
{
return BT::NodeStatus::SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment