Closed NiPeter closed 3 years ago
In class BaseCostmapToPolygons, spinthread pointer variable is used to check if thread should be stopped and join. After deletion in stopWorker ptr was never set to nullptr, so second call to stopWorker blocks forever. This bug prevent TEB planner from being used in lifecycle node, because BaseCostmapToPolygons cannot be stopped then destructed.
Solution is to set spinthread to null after deletion. In future, it will be more reliable to use smart pointers instead of raw.
Duplicate #27. Sorry for that
In class BaseCostmapToPolygons, spinthread pointer variable is used to check if thread should be stopped and join. After deletion in stopWorker ptr was never set to nullptr, so second call to stopWorker blocks forever. This bug prevent TEB planner from being used in lifecycle node, because BaseCostmapToPolygons cannot be stopped then destructed.
Solution is to set spinthread to null after deletion. In future, it will be more reliable to use smart pointers instead of raw.