-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Kinematic analysis while constructing a MultibodyPlant #21943
Comments
@joemasterjohn propposed alternative solution for @RussTedrake's specific problem of parsing equality constraints. Currently we require user added equality constraints (ball, weld, distance) to fully specify their kinematics at creation. The ball constraint for instance: MultibodyConstraintId AddBallConstraint(const RigidBody<T>& body_A,
const Vector3<double>& p_AP,
const RigidBody<T>& body_B,
Vector3<double>> p_BQ); We could alter the API to be closer to what's specified in MJCF's equality constraint (which specifies that what we call p_BQ should be coincident with p_AP in the default configuration): MultibodyConstraintId AddBallConstraint(const RigidBody<T>& body_A,
const Vector3<double>& p_AP,
const RigidBody<T>& body_B = world_body(),
const std::optional<Vector3<double>> p_BQ = {}); Then have the plant compute and fill in the missing kinematics data at Finalize time and store it in the constraint spec. i.e. as the very last step of MbP::FinalizePlantOnly() |
I think this change to the (I still worry that we will need to make similar improvements in other parts of the code, but we can defer those until the need arises). |
Is this the ticket we want to use? As I understand the overall request, it is actually "Parse MJCF 'equality' elements" so possibly we should open a new ticket with that specific outcome? Or, if the only goal is to switch |
This is my understanding, correct me if I am wrong @RussTedrake:
|
Here's another explanation of the point I tried to make above -- if you add and test and review and merge the new MbP feature without contemporaneously integrating it into the parser to confirm its utility, then we run the risk of adding a new MbP feature that doesn't actually solve the problem. In other words, the two issues are not orthogonal -- so if you do decide to split it up, someone will actively need to coordinate and de-risk their overlap. My suggestion is to just make one new issue, for MJCF |
I can open a new issue tomorrow. I already have the feature basically implemented in the mujoco parser (but I was unable to run the tests). I would not say that it is not yet a priority. It is not yet high priority. |
Dealing with loops in MuJoCo's input file requires doing some kinematic analysis using the default configuration to determine the location of attachment points.
The first attempt which seemed very sensible was:
However that failed because we can't currently clone an un-finalized MbP.
Possible fixes:
cc @amcastro-tri @xuchenhan-tri @joemasterjohn @SeanCurtis-TRI @RussTedrake
The text was updated successfully, but these errors were encountered: