feat: Integrate Rotational CCD using compas-forge for motion planning#467
feat: Integrate Rotational CCD using compas-forge for motion planning#467moaminmo90 wants to merge 3 commits into
Conversation
|
@moaminmo90 awesome! Could you please also add |
|
Hi @gonzalocasas, Thanks for the feedback! I've bumped The CI/CD should now automatically run the tests with it. Let me know if everything passes on your end! |
|
Hi @gonzalocasas, We are all set! I have successfully published To solve the stable ABI limitation with the PyBuffer protocol on Python < 3.11, I removed the I've also updated this PR's requirements and the integration workflow to use |
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!