CognitiveComputingResearchGroup / lidapy-framework

A Python-based LIDA framework using ROS.
20 stars 1 forks source link

No notion of ticks? #25

Closed pulinagrawal closed 7 years ago

pulinagrawal commented 7 years ago

Is the execution in the framework scheduled based on time? If a process (call() method) takes long to execute, what happens then?

skugele commented 7 years ago

Ros and lidapy is based on a distributed systems model. Because of this having a globally synchronized time step would be difficult to achieve and is questionable in value. Currently, each process manages its own run rate based on the "rate_in_hz" parameter. Using the rate_in_hz we can independently control the execution rate of any module, codelet, etc., and thanks to the parameter server that ros provides we can change these values at runtime.

If the call method blocks because of a long running operation, then the process will be unable to process new incoming messages. This is easily prevented by scheduling long running operations as non-blocking operations.

It's not clear to me how having a globally managed discrete time step would help with this issue. If anything, I think it would make the issue worse.

Is there a particular use case you had in mind related to this issue? If you are trying to control the agent's processing rate (for example, scheduling tasks every 15ms) this is currently possible in lidapy.