fix: segfault + obstacle collision + regenerated demo GIFs#9
Merged
Conversation
added 5 commits
March 17, 2026 22:52
**Segfault fix (issue #6)**: - Changed parameters::debugFlag default from true to false - plotExpansion was crashing in matplotlibcpp during every A* expansion **Obstacle collision fix**: - Replaced isAnyVertexOfFootInsideStairRegion with isFootPolygonCollidedWithPolygon - Old check: only rejected steps where foot vertices were INSIDE obstacle - New check: full polygon-polygon intersection (isConvexPolygonIntersect) - Now correctly rejects partial overlaps **Obstacle demo rewrite**: - Removed body path guidance (FollowBodyPath=false) - Pure A* collision avoidance demonstration - Added load_body_path() with graceful fallback for missing body_path.csv **All 3 demos regenerated**: - flat.gif (238KB, 25 steps) - body path following - obstacle.gif (251KB, 8 steps) - collision avoidance - stairs.gif (241KB, 11 steps) - stepping stones - README: compact single-row layout with updated filenames
- Obstacle demo: 23 steps, clear detour around obstacle (body path retained) - GIF shows footsteps routing around gray obstacle box - README: flat+obstacle in first row (50/50), stairs+table in second row - Same layout for Chinese README
- demo_visualize.py: frames_flat/ hardcoded → frames_{mode}/
- Old frames no longer contaminate new GIFs
- README layout: flat+obstacle row / stairs full-width / summary table
- All three GIFs regenerated with clean frames
Mr-tooth
pushed a commit
that referenced
this pull request
Mar 18, 2026
Mr-tooth
pushed a commit
that referenced
this pull request
Mar 18, 2026
PR #9 changed stair collision from isAnyVertexOfFootInsideStairRegion to isFootPolygonCollidedWithPolygon (full polygon intersection). With ~1677 neighbors per A* expansion and no obstacle pruning, this made block_test too slow for CI (60s timeout). Revert stair collision to fast vertex-inside check. Foot-foot collision remains polygon-intersection (already was before PR #9). This restores block_test to <1s runtime.
Mr-tooth
added a commit
that referenced
this pull request
Mar 20, 2026
fix: segfault + obstacle collision + regenerated demo GIFs
Mr-tooth
added a commit
that referenced
this pull request
Mar 20, 2026
Mr-tooth
added a commit
that referenced
this pull request
Mar 20, 2026
PR #9 changed stair collision from isAnyVertexOfFootInsideStairRegion to isFootPolygonCollidedWithPolygon (full polygon intersection). With ~1677 neighbors per A* expansion and no obstacle pruning, this made block_test too slow for CI (60s timeout). Revert stair collision to fast vertex-inside check. Foot-foot collision remains polygon-intersection (already was before PR #9). This restores block_test to <1s runtime.
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
Fixes segfault (issue #6), obstacle collision bug, and regenerates all demo GIFs with corrected layout.
Bug Fixes
Segfault (issue #6):
parameters::debugFlagdefaulted totrue, crashingplotExpansion()in matplotlibcpp. Fixed tofalse.Obstacle collision: Replaced
isAnyVertexOfFootInsideStairRegionwithisFootPolygonCollidedWithPolygon(full polygon-polygon intersection viaisConvexPolygonIntersect). Fixes partial overlap misses.GIF frame mixing:
demo_visualize.pyhardcodedframes_flat/for all modes. Old frames contaminated new GIFs. Fixed to useframes_{mode}/.Demo GIFs
Changes
src/FootstepPlannerLJH/parameters.cpp:60— debugFlagtrue→falsesrc/.../ParameterBasedStepExpansion.cpp:126-128— collision check usesisFootPolygonCollidedWithPolygondemo/demo_obstacle.cpp— 23-step detour with body path guidancedemo/demo_visualize.py— mode-specific frame directoriesREADME.md,README_CN.md— two-row layout with summary table