-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with removing skeletons without shapes
When `subscribeTo` is called with a skeleton in `addSkeleton`, the skeleton is added to `mSkeletonSources`. However, inside `removeSkeleton`, `unsubscribeFrom` is not called. Instead, `removeShapeFrameOf` is called. This is fine for most cases, but if it fails to remove the skeleton from `mSkeletonSources` if the skeleton does not have any shapes within it. This causes `mSkeletonSources` to grow indefinitely. A hazardous side effect of this is that when an attempt is made to add a new skeleton via `subscribeTo`, the address of the skeleton might be the same as one of the stale entries in `mSkeletonSources`. Consequently, the new skeleton's shapes don't get added to the collision detection engine and very surprising results follow. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
- Loading branch information
Showing
5 changed files
with
115 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters