feat: Integrate Rotational CCD using compas-forge for motion planning#467
Open
moaminmo90 wants to merge 1 commit into
Open
feat: Integrate Rotational CCD using compas-forge for motion planning#467moaminmo90 wants to merge 1 commit into
moaminmo90 wants to merge 1 commit into
Conversation
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
This Pull Request addresses the
TODOregardingsweep_collision_fninside motion planning loops (specifically inpybullet_plan_motion.pyandpybullet_plan_cartesian_motion.py). By integrating the Rust-backedcompas-forgeengine, we introduce Rotational Continuous Collision Detection (CCD) with temporal sub-stepping. This approach aims to mitigate the "tunneling effect" during continuous rotary joint movements while maintaining computational efficiency.Technical Implementation & Optimizations
To optimize performance inside the planning loops, the implementation avoids repeated mesh reconstruction by utilizing a caching mechanism:
pybullet_set_robot_cell.py): Collision meshes for robot links, attached tools, and stationary rigid obstacles are registered once insidecompas-forge's thread-safe memory registry duringset_robot_cell.pybullet_set_robot_cell_state.py): Global frames of tools and rigid bodies are updated during cell state transitions and cached inclient._forge_object_poses.pybullet_plan_cartesian_motion.py): Within the Cartesian path planning loop, the planner queriescompas_forge.check_swept_collision_cachedusing string IDs and calculated start/end poses.Preliminary Benchmarks
Initial evaluations were conducted on a standard UR5 robot cell setup with a stationary obstacle:
Backward Compatibility & Fallback
If
compas-forgeis not installed in the local environment, the planner gracefully falls back to the default discrete collision checking, ensuring no breaking changes to existing COMPAS core APIs.We welcome your feedback and review on this integration for
compas_fab!