File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,14 @@ NodeStatus ReactiveFallback::tick()
38
38
39
39
if (parent_prt_ != nullptr )
40
40
{
41
-
42
41
parent_prt_->propagateHalt (child_index_);
43
42
}
44
43
45
44
current_child_node->executeTick ();
45
+
46
46
do
47
47
{
48
48
std::this_thread::sleep_for (std::chrono::milliseconds (10 ));
49
-
50
49
child_status = current_child_node->status ();
51
50
52
51
} while (child_status == NodeStatus::IDLE);
@@ -68,11 +67,19 @@ NodeStatus ReactiveFallback::tick()
68
67
case NodeStatus::FAILURE:
69
68
{
70
69
failure_count++;
70
+ if (current_child_node->type () == NodeType::ACTION_ASYNC)
71
+ {
72
+ current_child_node->setStatus (NodeStatus::IDLE);
73
+ }
71
74
}break ;
72
75
73
76
case NodeStatus::SUCCESS:
74
77
{
75
78
haltChildren (index+1 );
79
+ if (current_child_node->type () == NodeType::ACTION_ASYNC)
80
+ {
81
+ current_child_node->setStatus (NodeStatus::IDLE);
82
+ }
76
83
return NodeStatus::SUCCESS;
77
84
}break ;
78
85
@@ -93,4 +100,3 @@ NodeStatus ReactiveFallback::tick()
93
100
}
94
101
95
102
}
96
-
Original file line number Diff line number Diff line change @@ -41,16 +41,16 @@ NodeStatus ReactiveSequence::tick()
41
41
42
42
if (parent_prt_ != nullptr )
43
43
{
44
-
45
44
parent_prt_->propagateHalt (child_index_);
46
45
}
47
46
48
47
current_child_node->executeTick ();
48
+
49
49
do
50
50
{
51
51
std::this_thread::sleep_for (std::chrono::milliseconds (10 ));
52
-
53
52
child_status = current_child_node->status ();
53
+
54
54
} while (child_status == NodeStatus::IDLE);
55
55
}
56
56
else
@@ -71,11 +71,19 @@ NodeStatus ReactiveSequence::tick()
71
71
case NodeStatus::FAILURE:
72
72
{
73
73
haltChildren (index+1 );
74
+ if (current_child_node->type () == NodeType::ACTION_ASYNC)
75
+ {
76
+ current_child_node->setStatus (NodeStatus::IDLE);
77
+ }
74
78
return NodeStatus::FAILURE;
75
79
}
76
80
case NodeStatus::SUCCESS:
77
81
{
78
82
success_count++;
83
+ if (current_child_node->type () == NodeType::ACTION_ASYNC)
84
+ {
85
+ current_child_node->setStatus (NodeStatus::IDLE);
86
+ }
79
87
}break ;
80
88
81
89
case NodeStatus::IDLE:
@@ -93,5 +101,4 @@ NodeStatus ReactiveSequence::tick()
93
101
return NodeStatus::RUNNING;
94
102
}
95
103
96
-
97
104
}
You can’t perform that action at this time.
0 commit comments