-
Notifications
You must be signed in to change notification settings - Fork 48
WIP: Add polytopic constraints on forces at QP level #465
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
Draft
Hugo-L3174
wants to merge
46
commits into
jrl-umi3218:master
Choose a base branch
from
Hugo-L3174:topic/DynamicConstraint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP: Add polytopic constraints on forces at QP level #465
Hugo-L3174
wants to merge
46
commits into
jrl-umi3218:master
from
Hugo-L3174:topic/DynamicConstraint
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
60da03c to
1ede344
Compare
e96d55b to
a981e5b
Compare
c74d449 to
42305f7
Compare
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
fix pre-commit
- 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
… at surface using parent robot frame)
- 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
This removes the now unnecessay remove and re add of tasks and constraints from the solver every time they are modified. This is handled automatically by TVM using the changes made by jrl-umi3218/tvm#53 and does not need to be tracked at the solver level anymore.
fee06ff to
1286ae2
Compare
…s string yaml-cpp treats all number-like elements as numbers, even when they are in single or double quotes. Furthermore numbers starting with a leading zero are interpreted as octal: - "123" -> number 123 - "0123" -> number 83 (conversion to decimal) - 0123 -> number 83 now you can do - !!str 0123 -> string "0123" as expected
2e6021c to
a720c23
Compare
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.
This PR intends to add the possibility of constraining the forces (currently bound by a linearized friction cone) in a convex polytope instead, allowing to cap each contact force's maximum value in any direction.
The main changes are the following:
These changes mostly concern TVM because its formulation allow an easy addition and removal of decision variables to the problem.