Skip to content

Nix pendant to pr 465#507

Draft
arntanguy wants to merge 42 commits intojrl-umi3218:masterfrom
arntanguy:topic/nix-DynamicConstraint
Draft

Nix pendant to pr 465#507
arntanguy wants to merge 42 commits intojrl-umi3218:masterfrom
arntanguy:topic/nix-DynamicConstraint

Conversation

@arntanguy
Copy link
Copy Markdown
Collaborator

@arntanguy arntanguy commented Mar 16, 2026

PR #465 rebased on top of #495 for testing nix support of hugo's dynamicPolytope controller

@arntanguy arntanguy force-pushed the topic/nix-DynamicConstraint branch from 73b10e8 to 206a460 Compare April 15, 2026 16:11
arntanguy and others added 29 commits April 17, 2026 09:52
Allows to pass the optional feasibility polytope to the TVM QP Solver
through the contacts
- The polytope is still not thread safe (for external update)
- The function uses a cache for now but is intended to only have the polytope and declare a dependency on it (not working for now)
- Add correct dependencies between FeasiblePolytope and the function
- Contact owns his tvm feasible polytope node
- Create new function in solver instead of the old one
- Still segfault, probably because of rbdyn contact lifetime
- The feasible polytope always builds a 6D polytope, either the force from the optional contact polytope and the moments limit from a basic CoP constraint, or a default friction + CoP
- The function builds its jacobian only as force limits or with the whole 6D matrix depending on the variable dimension
- The addContact function for the dynamics constraint is divided in either 3d or 6d (3d is the default original case)
- The 6d version adds only one wrench variable at the contact frame and its influence on the dynamics function (instead of 4 force vars at each contact limit)
- This allows constraining directly the contact wrench at contact frame
- Added target tasks on force variables in ContactData (for now minimization)
- Flag for constraint size change to remove and re add task to solver (no event in tvm to handle this for now)
- Handle 3d or 6d correctly for polytope function second member
- Polytope index bugfixes
- There is now a polytope R1 and R2 for the two robots involved in the contact
- This allows handling the force limits when both robots have a dynamic constraint and different actuation capabilities.
- This also creates the CoP constraint from the correct robot surface for each side
- In case a contact is created between two robots with dynamics constraint instead of creating both sides with opposite directions we correctly use the same wrench var with opposite directions.
- This way each side has its own set of constraints acting on the same variable.
- This also fixes problems occuring if the robot having the dynamic constraint is the second one.
- Updating the contact with remove/add is no longer necessary in case of friction change (automatic in feasiblie polytope) so hasWork criterion is updated.
- Instead of the previous dir variable at 1 or -1 (assuming both frames were aligned and opposed on z) we use the dual plücker matrix between both frames of the contact.
- This is used both for the polytope constraints and the dynamics constraints, and takes effect only in the case where a contact between two dynamically constrained robots occurs.
- This ensures the common interaction wrench between two robots respects both of their feasible polytopes in the correct frames.
- This also covers the previously ignored case of a contact with a desired offset between the two frames.
- Correct transform mistake
- Conserve X_r2_r1 in contact impl after update
- Add GUI arrow for second contact force
- Add a map of transforms from contact wrenches to CoM with wrench variables as keys
- This is to be used by other tasks such as balancing, to distribute contact wrenches using the wrench variables
@arntanguy arntanguy force-pushed the topic/nix-DynamicConstraint branch from aaee00a to 4da724f Compare April 17, 2026 07:53
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