machines-in-motion / dynamic_graph_manager

BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Stream the data in the device signals from the start. #11

Closed MaximilienNaveau closed 3 years ago

MaximilienNaveau commented 4 years ago

Problem

The problem is that the device do not stream the data until the dynamic_graph is executed. The desired behavior is that whenever the user start the python interpreter the device is already updating the sensors value. One can therefore evaluate the quality of the sensors data without any controller running.

Potential solution

Start the control thread from the start, update the signals but do not execute the graph until the "start_dynamic_graph" service has been called.

MaximilienNaveau commented 3 years ago

@jviereck I am tackling this issue because it helps using default value when building the graph and because you asked me this feature a while ago.

jviereck commented 3 years ago

Thanks for fixing this!

In general, is there much value in having the start/stop of the graph? The pattern we (should) follow is to have a master switch anyways to switch between the different tasks. In that sense what is the additional value of setting up the graph and then starting it? In my experience I always start the graph right away with the calibration of the robot.

MaximilienNaveau commented 3 years ago

Yes there is because the graph needs to be "complete" before you run or you will have a segfault upon execution. If an input of an en entity is not plugged and access it then a throw is generated.

Hence we need this "start graph" step to do this in the good order: