agimus-project / happypose

Toolbox and trackers for object pose-estimation. Based on the work CosyPose and MegaPose
https://agimus-project.github.io/happypose/
BSD 2-Clause "Simplified" License
22 stars 8 forks source link

batch renderer destructor #159

Open nim65s opened 4 months ago

nim65s commented 4 months ago

panda3d batch renderer needs to be deleted to stop its subprocesses: https://github.com/agimus-project/happypose/blob/6f06ad7fe34c8b866fac460b00004b1a5efd61fd/happypose/toolbox/renderer/panda3d_batch_renderer.py#L347

but its destructor might not be called, and the scripts might hang forever, eg in cosypose run_inference_on_example, where the scope is never destroyed.

This can be quickly workaround by creating main() functions, but it should be refactored to avoid this kind of issues.