Fix: Make lab_sim burner pushable under realistic gripper force#45
Fix: Make lab_sim burner pushable under realistic gripper force#45davetcoleman wants to merge 1 commit into
Conversation
|
Surgical fix with a thorough write-up — root cause (1000 kg/m³ default density + MAX-rule friction combine) is identified, the priority=1 trick is the right idiom for asymmetric friction-combine, and the manual revert → repro → fix → confirm verification is exactly the right shape for a physics-tuning change. LGTM with two small things: Diaginertia sanity-check. For a homogeneous 0.2 × 0.4 × 0.074 m box at 1.5 kg, the moments work out to roughly:
The PR uses
Otherwise the fix is exactly the right shape for the bug, and the XML comment block explaining priority=1 is a nice touch — that combine rule trips up the next reader and the inline doc helps. |
| with the desk's default friction=1.0) pins it under any vertical-dominant | ||
| gripper push. priority="1" on the collision geom below makes the burner's | ||
| lower friction override the desk's, so the burner can actually slide. --> | ||
| <inertial pos="0 0 0.02" mass="1.5" diaginertia="0.008 0.008 0.012"/> |
There was a problem hiding this comment.
diaginertia="0.008 0.008 0.012" doesn't match a uniform 1.5 kg box of 0.2×0.4×0.074 m. Computing from the box-of-uniform-density formula (m/12)·(a² + b²):
- Ixx ≈ (1.5/12) · (0.4² + 0.074²) ≈ 0.0207
- Iyy ≈ (1.5/12) · (0.2² + 0.074²) ≈ 0.00568
- Izz ≈ (1.5/12) · (0.2² + 0.4²) ≈ 0.0250
The PR's values are symmetric in X/Y (the X≠Y asymmetry of the box is lost) and ~3× lower than the uniform-density assumption across all axes. Two clean ways forward:
- If the rotational response was hand-tuned (e.g. to make the burner spin more snappily under contact), keep the values but add a one-line comment so the next reader doesn't "fix" it back to uniform.
- Otherwise, drop
diaginertiaentirely and let MuJoCo auto-compute frommass+ geom geometry — the result matches the physical box.
Not blocking the bug fix (mass + friction + priority is the load-bearing change), but the inertia values are surprising as-written.
There was a problem hiding this comment.
Went with option 1 — added an explanatory block above <inertial> in e6bd41f. The rationale (mass biased toward base for motor + stand under thin top plate, xx/yy intentionally symmetric, all three values below the uniform-box numbers you computed) is inline in the XML now, with a 'do not regenerate from collision box extents' warning for the next tuner.
75df69b to
e6bd41f
Compare
|
Thanks @L4co77. 1. Diaginertia comment — applied (e6bd41f). Folded an explanation into the existing comment block above 2. |
Root cause
The
stirrerbody inmujoco_assets/lab_desk/desk.xmlhad no<inertial>block — MuJoCo auto-inferred ~9.7 kg from the 0.2×0.4×0.074 m collision box
at default density 1000 kg/m³. Combined with MuJoCo's MAX-rule friction-combine
and the desk's default friction=1.0, the burner-on-desk friction limit (~95 N
from self-weight alone) exceeded any horizontal force a realistic gripper push
produces.
Tutorial 1's
Push ButtonObjective atforce_threshold=1000visibly contactsthe burner top but the burner stays pinned, matching
PickNikRobotics/moveit_pro#19151.
Fix
On the
stirrerbody:<inertial mass="1.5">overrides the 9.7 kg auto-inferred mass.friction="0.3"+priority="1"on the collision geom. priority=1 winsthe contact-pair friction combine over the desk's default 1.0; without it,
the MAX rule keeps 1.0 and the burner stays pinned even with low burner
friction.
Verification
Reverted
desk.xmlon this branch, restarted the lab_sim agent, re-ranPush Buttonatforce_threshold=1000— burner stayed pinned (matching thebug). Re-applied the fix — burner slides ~26 cm under the gripper's push.
Related: PickNikRobotics/moveit_pro#19151 — will be closed by the
moveit_pro_example_wssubmodule-bump PR once that lands.