moveit2_server: bound the warm MoveItPy instance cache - #339
Closed
warun7 wants to merge 1 commit into
Closed
Conversation
The adapter kept one warm MoveItPy instance per model forever -- a ROS node plus planning context each, so serving many distinct robots crawled memory for the life of the server. The cache is now bounded LRU (default 5, MOVEIT_PY_ADAPTER_CACHE to change): a lookup refreshes recency, and shedding the oldest instance shuts its node down best-effort rather than letting the native state be silently collected.
Owner
|
@warun7 I've actually removed ros2 and moveit2 support on the release/0.5.0 branch, since i think this creates a bit too much bloat and probably isn't needed for the scope of the repo's skills. I'm ok to merge this in if you need it, but if not let's drop it. |
Contributor
Author
|
yeah if theres no support then it doesnt make sense |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MoveItPyAdapterkept one warmMoveItPyinstance per model forever - keyed by model asset hash, never evicted. Each instance is a ROS node plus a planning context, so serving many distinct robots crawled memory for the life of the server.The cache is now bounded LRU:
MOVEIT_PY_ADAPTER_CACHE(floored at 1)shutdown()best-effort rather than letting the native ROS node be silently collected; a shutdown failure is swallowed so eviction always proceedsVerification
MoveItPyCacheTests: LRU shedding order, recency refresh on hit, shutdown-failure tolerance (all without rclpy, matching the suite's existing style)scripts/test/test-python.shall suites green