dora icon indicating copy to clipboard operation
dora copied to clipboard

Stop custom node when stopping the dataflow

Open phil-opp opened this issue 3 years ago • 5 comments

Requested by @haixuanTao

phil-opp avatar Nov 09 '22 13:11 phil-opp

@haixuanTao Could you give more details on this request?

phil-opp avatar Nov 09 '22 13:11 phil-opp

The problem is that some python program such as ROS python nodes are based on a forever loop. When starting them through dora we might want to stop them on dora stop.

haixuanTao avatar Nov 09 '22 16:11 haixuanTao

But after discussion, we chose to leave the closing of those forever loops to the user as we might not have enough information on how to stop the nodes.

haixuanTao avatar Nov 09 '22 16:11 haixuanTao

Maybe we can change the node API to ensure that the input channel is always used? With the current implementation it is easy to accidentally ignore the channel in source nodes. As a result, the nodes never receive stop signals.

Reopening so that we don't forget to investigate this further.

phil-opp avatar Nov 10 '22 13:11 phil-opp

With the new event stream design merged in #162, all nodes should listen for incoming events, even if they don't expect inputs. Nodes that don't do this will be killed as soon as #184 is merged.

phil-opp avatar Mar 09 '23 12:03 phil-opp

Closing as rhis is now implemented with grace duration

haixuanTao avatar Aug 31 '24 04:08 haixuanTao