More experiments with the way the generic joint is stabilized.

This commit is contained in:
Crozet Sébastien
2021-02-11 18:52:07 +01:00
parent 5b80c4efbf
commit cc80e40067
5 changed files with 332 additions and 25 deletions

View File

@@ -333,6 +333,23 @@ impl AnyJointVelocityConstraint {
}
}
pub fn solve2(
&mut self,
mj_lambdas: &mut [DeltaVel<Real>],
mj_lambdas_pos: &mut [DeltaVel<Real>],
) {
match self {
AnyJointVelocityConstraint::GenericConstraint(c) => {
c.solve2(mj_lambdas, mj_lambdas_pos)
}
AnyJointVelocityConstraint::GenericGroundConstraint(c) => {
c.solve2(mj_lambdas, mj_lambdas_pos)
}
AnyJointVelocityConstraint::Empty => unreachable!(),
_ => {}
}
}
pub fn writeback_impulses(&self, joints_all: &mut [JointGraphEdge]) {
match self {
AnyJointVelocityConstraint::BallConstraint(c) => c.writeback_impulses(joints_all),