Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SRDF to exclude collision pairs in robot models #50

Merged
merged 1 commit into from
May 28, 2024

Conversation

sea-bass
Copy link
Owner

As shown in this example, Pinocchio allows setting collision pair exclusions using SRDF files.

This PR changes the main models (UR5 and Panda) to use such files, and adds a little more detail in the docs.

@sea-bass sea-bass requested a review from eholum May 27, 2024 19:30
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
pyroboplan
   __init__.py00100% 
pyroboplan/core
   __init__.py00100% 
   planning_context.py880%1, 4, 9, 13–15, 17–18
   utils.py85297%155–156
pyroboplan/ik
   __init__.py00100% 
   differential_ik.py871483%146–147, 156–157, 181, 187, 193, 196, 224, 227, 235–236, 241, 247
   nullspace_components.py16160%3, 6, 22, 25, 45–46, 48–54, 57, 75–76
pyroboplan/models
   __init__.py00100% 
   panda.py450100% 
   two_dof.py80100% 
   utils.py50100% 
pyroboplan/planning
   __init__.py00100% 
   cartesian_planner.py92594%115, 139, 143–144, 207
   graph.py130496%58, 103, 195, 261
   graph_search.py53296%57, 135
   path_shortcutting.py48197%121
   prm.py1052576%107, 136, 198–201, 227–228, 234–235, 258–259, 261–262, 314–317, 320, 323, 331–333, 337–338
   rrt.py1452880%139–140, 142–143, 163–164, 167, 175, 208–209, 237, 332, 377–379, 383–384, 388–391, 394, 397, 405–407, 410, 413
   utils.py47197%80
pyroboplan/trajectory
   __init__.py00100% 
   polynomial.py1513874%148, 150–151, 153–155, 157–158, 161–184, 187, 190, 193, 202, 229, 298
   trajectory_optimization.py1140100% 
   trapezoidal_velocity.py1683380%283–284, 329, 331–335, 337–338, 341–359, 362–364, 373
pyroboplan/visualization
   __init__.py00100% 
   meshcat_utils.py211338%40–41, 43, 45, 57, 81–82, 109, 131–134, 136
TOTAL132819085% 

Tests Skipped Failures Errors Time
89 0 💤 0 ❌ 0 🔥 22.787s ⏱️

Copy link
Collaborator

@eholum eholum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Pinocchio is the GOAT.

srdf_filename = os.path.join(package_dir, "srdf", "panda.srdf")

collision_model.addAllCollisionPairs()
pinocchio.removeCollisionPairs(model, collision_model, srdf_filename)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is better.


<end_effector name="end_effector" parent_link="panda_hand_tcp" group="arm"/>

<disable_collisions link1="panda_hand" link2="panda_leftfinger" reason="Adjacent"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right and I don't seem to get invalid poses in the example IK but I didn't take a close close look

@sea-bass sea-bass merged commit 7c9ef44 into main May 28, 2024
3 checks passed
@sea-bass sea-bass deleted the read-collisions-from-srdf branch May 28, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants