Skip to content

Add whole-body differential IK example #66

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

Merged
merged 10 commits into from
Aug 6, 2024
Merged

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Aug 3, 2024

This PR adds a joint_weights option to differential IK, which can be used for e.g. solving whole-body IK.

Incidentally, I also had to fix how the "ignore joints" works, meaning we're now doing it better. Meaning now we grab only the columns of the Jacobian we need instead of doing the full calculation and throwing away unneeded output.

It also adds a UR5 on mobile base URDF and cleans up all the models in the package to be in the same location. (this is where most of the deletions come from)

python3 examples/differential_ik_whole_body.py

image

Closes #52

@sea-bass sea-bass requested a review from eholum August 3, 2024 20:35
Copy link

github-actions bot commented Aug 3, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
pyroboplan
   __init__.py00100% 
pyroboplan/core
   __init__.py00100% 
   planning_context.py880%1, 4, 9, 13–15, 17–18
   utils.py1341291%78–79, 81–84, 86–87, 228–229, 531, 542
pyroboplan/ik
   __init__.py00100% 
   differential_ik.py1101487%193–194, 203–204, 232, 238, 244, 247, 293–294, 297–298, 303, 314
   nullspace_components.py350100% 
pyroboplan/models
   __init__.py00100% 
   panda.py450100% 
   two_dof.py251348%41, 47–49, 51, 57–59, 62, 65–68
   ur5.py15150%3–4, 6, 9, 18–20, 22, 25, 41–44, 46–47
   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.py1092577%113, 149, 211–214, 240–241, 247–248, 273–274, 278–279, 331–334, 337, 340, 348–350, 354–355
   rrt.py1522881%157–158, 167–168, 192–193, 196, 204, 273, 302–303, 369, 417–419, 423–424, 428–431, 434, 437, 445–447, 450, 453
   utils.py470100% 
pyroboplan/trajectory
   __init__.py00100% 
   polynomial.py1523974%148, 150–151, 153–155, 157–159, 162–185, 188, 191, 194, 203, 230, 299
   trajectory_optimization.py1830100% 
   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
TOTAL153221286% 

Tests Skipped Failures Errors Time
97 0 💤 0 ❌ 0 🔥 30.034s ⏱️

@sea-bass sea-bass force-pushed the whole-body-ik-example branch from 7be536b to b805798 Compare August 3, 2024 20:38
@sea-bass
Copy link
Owner Author

sea-bass commented Aug 4, 2024

One internal debate I am having is whether this qualifies as "whole body IK" or I should relax some of the claims and use something like mobile base, floating base, etc.

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.

I think whole body is appropriate given a very quick googling of where the term is used!

Just some minor questions but overall this is pretty nifty. Plus it's so fun to watch the entire robot run off into the distance when the solution diverges.

@sea-bass sea-bass requested a review from eholum August 5, 2024 23:06
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.

👍👍👍

@sea-bass sea-bass merged commit c0f417a into main Aug 6, 2024
3 checks passed
@sea-bass sea-bass deleted the whole-body-ik-example branch August 6, 2024 02:09
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.

Create mobile base IK example
2 participants