fix: CAPT false negatives during affordance propagation - #122
Open
nrkumar93 wants to merge 2 commits into
Open
Conversation
Author
Follow-up observationThis fix assumes queries respect CAPT's documented This is independent of the affordance-propagation defects fixed here and can be addressed separately through documentation or generated robot metadata. |
nrkumar93
marked this pull request as draft
August 23, 2026 17:05
nrkumar93
marked this pull request as ready for review
August 23, 2026 17:05
tenhjo
added a commit
to tenhjo/vamp
that referenced
this pull request
Aug 25, 2026
…akiLab#122 CAPT false-negative fix fr3_07.hh generated by cricket from robot_zoo.export.vamp's Fr3_07 inputs: 17 spheres with rokin's radii and rokin's joint box, FK verified against rokin to 4.5e-6 m over 2000 configs. PR KavrakiLab#122 is not optional for us: CAPT::collides returns FALSE NEGATIVES (says free while a query sphere overlaps a stored point), worst observed missed penetration ~10 cm against robot spheres of 5-13 cm. Still open upstream as of 2026-08-24.
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
Fix two defects in
CAPT::subdividethat can omit points from leaf affordance buffers. The omissions cause bothCAPT::collidesandCAPT::collides_simdto return false negatives for point-cloud collision queries.A motion planner using a CAPT-backed environment could consequently accept a configuration where a query sphere overlaps a stored point.
Primitive collision geometry is unaffected.
Root cause
After partitioning a cell, each child must inherit points near the split plane from the opposite half.
Two issues made this propagation incomplete:
The low half was scanned from the wrong end.
Each half is sorted along the split dimension. The high child must inherit the low half's suffix, the points closest to the split, but the previous implementation scanned and copied from the low half's beginning.
The propagation band excluded the point radius.
The required distance is
r_max + r_point, but the propagation checks used onlyr_max. This omitted points that the laterVolume::affordscheck would otherwise accept.Fix
max_affordance_l1value (r_max + r_point) as the propagation band.Both changes are required. Testing the changes separately still produced false negatives:
Verification
Added CAPT regression coverage comparing tree results against a brute-force sphere/point overlap test for:
r_point = 0, isolating the propagation-direction defect;Results after the fix:
CAPT::is_valid()holds for every tested tree;Before the fix, missed overlaps included deep penetrations—not only floating-point boundary cases. The worst observed missed overlap depth was approximately 10 cm.
Performance impact
Correct propagation stores more affordance entries and therefore increases CAPT construction time and memory use. For a 12³ grid containing 1,728 points:
CAPT construction is a per-scene cost. Query throughput was unchanged to slightly improved in the measured workload.