How to change the execution frequency of a service

Hi,

I have multiple computer vision algorithms working with the depth map and I would like to know how to make them execute at different frequencies. For now they all work at 30Hz.

Thanks !
Eliott

Hi e267,

You will need to not be triggered by a video feed (frame available) but a timer instead.

This can be achieved using a pomp_timer from the libpomp:

https://developer.parrot.com/docs/airsdk/general/framework.html#_CPPv414pomp_timer_newP9pomp_loop15pomp_timer_cb_tPv

Note that it is note recommended for computer vision services. It is preferred to use a decimation of the camera frequency (Use one image out for three for example to get 10Hz frequency).

Thanks,

1 Like

Hi,
Where the timer must be implemented ?
In the custom function (do_step() in hello mission), in thread_entry() or in another place ?
Thanks !

Mel

Hi,

You can use the example here to have a service based on a timer:

https://developer.parrot.com/docs/airsdk/general/services.html#c

Thanks,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.