Implement non-linear position stabilization for the generic constraint.

This commit is contained in:
Crozet Sébastien
2021-02-15 11:20:09 +01:00
parent d9b6198fa0
commit de39a41faa
6 changed files with 591 additions and 205 deletions

View File

@@ -333,23 +333,6 @@ 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),