goodrobots / vision_landing

Precision landing using visual targets
GNU General Public License v3.0
202 stars 71 forks source link

Move target event to asynchronous handling rather than loop #90

Open fnoop opened 7 years ago

fnoop commented 7 years ago

Incoming target data from track_targets to vision_landing added to a queue and the main loop checks the queue each iteration. This requires the main loop to run at a high speed to reduce pickup latency, and increases cpu usage significantly on slower platforms. Move the queue pickup to an event based pattern and reduce main loop to much slower 1hz to decrease cpu usage, which will give cpu space back to track_targets and increase framerate and decrease latency.