File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ def tick(self):
64
64
@ports (inputs = ["value" ])
65
65
class Print (SyncActionNode ):
66
66
def tick (self ):
67
- print (self .get_input ("value" ))
67
+ value = self .get_input ("value" )
68
+ if value is not None :
69
+ print (value )
68
70
return NodeStatus .SUCCESS
69
71
70
72
Original file line number Diff line number Diff line change 23
23
24
24
<BehaviorTree ID="MainTree">
25
25
<Sequence>
26
- <!-- Initialize the interpolated position -->
27
- <SetBlackboard output_key="interpolated" value="None" />
28
-
29
26
<!-- Interpolate from the initial position to the final one printing
30
27
at each step. -->
31
28
<ReactiveSequence name="root">
@@ -63,7 +60,9 @@ def on_halted(self):
63
60
@ports (inputs = ["value" ])
64
61
class Print (SyncActionNode ):
65
62
def tick (self ):
66
- print (self .get_input ("value" ))
63
+ value = self .get_input ("value" )
64
+ if value is not None :
65
+ print (value )
67
66
return NodeStatus .SUCCESS
68
67
69
68
Original file line number Diff line number Diff line change @@ -58,7 +58,10 @@ class Py_StatefulActionNode final : public StatefulActionNode
58
58
py::object Py_getInput (const TreeNode& node, const std::string& name)
59
59
{
60
60
py::object obj;
61
- node.getInput (name, obj);
61
+ if (!node.getInput (name, obj).has_value ())
62
+ {
63
+ return py::none ();
64
+ }
62
65
return obj;
63
66
}
64
67
You can’t perform that action at this time.
0 commit comments