pi_trees icon indicating copy to clipboard operation
pi_trees copied to clipboard

change tic rate on the fly, (or different rates)

Open elpimous opened this issue 7 years ago • 0 comments

Hi Patrick,

I'm using pi_trees with my homemade robot like this :

(Tic rate is 3 times per second)

  • Alfred checks battery, etc...
  • If SUCCEDED, next task recognizes face (dlib detection+deep google dlib reco) (, at the defined rate of .3),
  • next task detects face with haarcascades, and do tracking. In this task, I did a 'while' loop in the task, to use camera topic rate for tracking. (and loop exit when no face detection)

The problem is that I'd like to use parallel tasks, (tracking+brain) with a correct rate for tracking. (ex : during tracking, I can ask questions to Alfred. But, working with deep learning STT model, process takes some time (0.5 to 1sec). I'd like it to not disturb tracking fluidity) Can't do it with the while, otherwise it locks task !!

Now, here is my question : can I use default rate .3 for general, and a different rate or .08 for tracking ?? Or change refresh rate on the fly

Thanks for this lib, Patrick.

Vincent.

elpimous avatar Nov 22 '17 23:11 elpimous