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):
6464@ports (inputs = ["value" ])
6565class Print (SyncActionNode ):
6666 def tick (self ):
67- print (self .get_input ("value" ))
67+ value = self .get_input ("value" )
68+ if value is not None :
69+ print (value )
6870 return NodeStatus .SUCCESS
6971
7072
Original file line number Diff line number Diff line change 2323
2424 <BehaviorTree ID="MainTree">
2525 <Sequence>
26- <!-- Initialize the interpolated position -->
27- <SetBlackboard output_key="interpolated" value="None" />
28-
2926 <!-- Interpolate from the initial position to the final one printing
3027 at each step. -->
3128 <ReactiveSequence name="root">
@@ -63,7 +60,9 @@ def on_halted(self):
6360@ports (inputs = ["value" ])
6461class Print (SyncActionNode ):
6562 def tick (self ):
66- print (self .get_input ("value" ))
63+ value = self .get_input ("value" )
64+ if value is not None :
65+ print (value )
6766 return NodeStatus .SUCCESS
6867
6968
Original file line number Diff line number Diff line change @@ -58,7 +58,10 @@ class Py_StatefulActionNode final : public StatefulActionNode
5858py::object Py_getInput (const TreeNode& node, const std::string& name)
5959{
6060 py::object obj;
61- node.getInput (name, obj);
61+ if (!node.getInput (name, obj).has_value ())
62+ {
63+ return py::none ();
64+ }
6265 return obj;
6366}
6467
You can’t perform that action at this time.
0 commit comments