From 643c1248b895457da9ce9b3d492cd41b763c630f Mon Sep 17 00:00:00 2001 From: Alessio Quaglino Date: Mon, 23 Oct 2023 10:00:33 -0700 Subject: [PATCH] Skip flex edge Jacobian if not needed. When equality constraints and built-in passive forces are not present, edge Jacobians are unused. This gives a 3x speedup in `mj_kinematics` in `floppy_flex` (from 0.2ms/step to 0.06ms/step). Changed the default options of `floppy_flex` to match those of `floppy` for a fair comparison. PiperOrigin-RevId: 575850622 Change-Id: I4c618536fd17ef930153bbd1f1da7d9e0e44abbe --- model/plugin/elasticity/floppy_flex.xml | 4 ++-- src/engine/engine_core_smooth.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/model/plugin/elasticity/floppy_flex.xml b/model/plugin/elasticity/floppy_flex.xml index a8645f2f..b6a262c3 100644 --- a/model/plugin/elasticity/floppy_flex.xml +++ b/model/plugin/elasticity/floppy_flex.xml @@ -22,7 +22,7 @@ -