fix(assets): head-heavy mixed-material hammer + recalibrated nail
#15
by Everloom - opened
assets/local_hammer_nail/board_nail.urdf
CHANGED
|
@@ -6,7 +6,17 @@
|
|
| 6 |
(nail_drive). Used for RENDERING only (physics stays MuJoCo in the hybrid
|
| 7 |
path); the joint must exist so metasim can mirror the nail's slide into the
|
| 8 |
IsaacSim render each frame. Geometry matches the MJCF (board 0.14x0.14x0.03,
|
| 9 |
-
nail shaft r0.003 len0.06 + head r0.009 len0.005, joint origin at board top).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
<robot name="board_nail">
|
| 11 |
<link name="board">
|
| 12 |
<visual>
|
|
|
|
| 6 |
(nail_drive). Used for RENDERING only (physics stays MuJoCo in the hybrid
|
| 7 |
path); the joint must exist so metasim can mirror the nail's slide into the
|
| 8 |
IsaacSim render each frame. Geometry matches the MJCF (board 0.14x0.14x0.03,
|
| 9 |
+
nail shaft r0.003 len0.06 + head r0.009 len0.005, joint origin at board top).
|
| 10 |
+
|
| 11 |
+
The <dynamics> values below are INERT: nothing integrates this joint (metasim
|
| 12 |
+
mirrors the nail's MuJoCo slide into the render each frame), so they are stale
|
| 13 |
+
copies of the MJCF's pre-2026-07-29 numbers and are deliberately left alone —
|
| 14 |
+
the generated usd/board_nail.usd was converted from them, and changing one
|
| 15 |
+
without regenerating the other just splits the pair. board_nail.xml is the
|
| 16 |
+
authoritative nail model (now frictionloss=60 plus a stiffened friction
|
| 17 |
+
constraint); URDF has no solreffriction/solimpfriction equivalent at all, so a
|
| 18 |
+
real IsaacSim-*physics* run of this articulation would still show the
|
| 19 |
+
soft-constraint creep the MJCF fixes. Physics stays MuJoCo. -->
|
| 20 |
<robot name="board_nail">
|
| 21 |
<link name="board">
|
| 22 |
<visual>
|
assets/local_hammer_nail/board_nail.xml
CHANGED
|
@@ -2,23 +2,41 @@
|
|
| 2 |
<!-- Board + nail for the hammer_insert_nail task. The nail is NOT a freejoint
|
| 3 |
body: it hangs off the fixed board by a single vertical SLIDE joint with
|
| 4 |
dry friction (frictionloss), the standard rigid-body "drive a nail into
|
| 5 |
-
wood" trick (Adroit hammer task). Static friction (
|
| 6 |
-
against gravity; a hammer strike whose impulse
|
| 7 |
-
down its axis a little — visually "driven in".
|
| 8 |
-
translates along z, the nail can NOT be knocked flat,
|
| 9 |
-
vertical-insertion task (vs hammer_drive_peg's knock-flat).
|
| 10 |
|
| 11 |
Modeling notes:
|
| 12 |
- The nail SHAFT has collision off (contype=0/conaffinity=0): its going
|
| 13 |
"into the wood" is faked by the slide joint, so it must not fight real
|
| 14 |
contact with the board. Only the nail HEAD keeps collision — that is the
|
| 15 |
surface the hammer strikes.
|
| 16 |
-
- damping on the joint spreads the drive over several strikes (one blow
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
- Loaded as ArticulationObjCfg(fix_base_link=True); the root body carries
|
| 19 |
no pos/quat (set via the cfg default_position), as in desk_lamp.xml.
|
| 20 |
- Success is read from the nail_drive joint position (insertion depth):
|
| 21 |
-
qpos 0 = flush with the start, range floor -0.04 = fully driven
|
|
|
|
| 22 |
<compiler angle="radian"/>
|
| 23 |
<worldbody>
|
| 24 |
<body name="board">
|
|
@@ -26,7 +44,8 @@
|
|
| 26 |
rgba="0.55 0.38 0.22 1" friction="0.9 0.05 0.001" density="500"/>
|
| 27 |
<body name="nail" pos="0 0 0.03">
|
| 28 |
<joint name="nail_drive" type="slide" axis="0 0 1" range="-0.04 0"
|
| 29 |
-
frictionloss="
|
|
|
|
| 30 |
<geom name="nail_shaft" type="cylinder" size="0.003 0.03" pos="0 0 0.0"
|
| 31 |
density="7850" contype="0" conaffinity="0" rgba="0.72 0.72 0.75 1"/>
|
| 32 |
<geom name="nail_head" type="cylinder" size="0.009 0.0025" pos="0 0 0.032"
|
|
|
|
| 2 |
<!-- Board + nail for the hammer_insert_nail task. The nail is NOT a freejoint
|
| 3 |
body: it hangs off the fixed board by a single vertical SLIDE joint with
|
| 4 |
dry friction (frictionloss), the standard rigid-body "drive a nail into
|
| 5 |
+
wood" trick (Adroit hammer task). Static friction (60 N) holds the nail
|
| 6 |
+
against gravity and against being leaned on; a hammer strike whose impulse
|
| 7 |
+
exceeds it slides the nail down its axis a little — visually "driven in".
|
| 8 |
+
Because the joint only translates along z, the nail can NOT be knocked flat,
|
| 9 |
+
so this is a genuine vertical-insertion task (vs hammer_drive_peg's knock-flat).
|
| 10 |
|
| 11 |
Modeling notes:
|
| 12 |
- The nail SHAFT has collision off (contype=0/conaffinity=0): its going
|
| 13 |
"into the wood" is faked by the slide joint, so it must not fight real
|
| 14 |
contact with the board. Only the nail HEAD keeps collision — that is the
|
| 15 |
surface the hammer strikes.
|
| 16 |
+
- damping on the joint spreads the drive over several strikes (one blow does
|
| 17 |
+
not bottom it out), matching a real hammering rhythm.
|
| 18 |
+
- solreffriction + solimpfriction stiffen the FRICTION constraint, and both
|
| 19 |
+
are load-bearing, not cosmetic. MuJoCo's frictionloss is a SOFT constraint:
|
| 20 |
+
a *sustained* load deforms it by an amount set by the constraint impedance
|
| 21 |
+
and NOT by the frictionloss magnitude, so the nail creeps down with no
|
| 22 |
+
strike at all. solreffriction's timeconst is already at its stability floor
|
| 23 |
+
(2*dt = 0.004 at the family's dt=0.002) and alone left ~5 mm of gravity sag
|
| 24 |
+
and ~30 mm under a 0.665 kg hammer simply laid on the nail head — i.e. past
|
| 25 |
+
the checker's 25 mm gate with no blow struck (measured 2026-07-29, after the
|
| 26 |
+
YCB hammer's head-heavy mass fix put the tool's real weight on the nail).
|
| 27 |
+
solimpfriction hardens it the rest of the way: gravity sag 0.05 mm, a laid-on
|
| 28 |
+
hammer 1.5 mm, a hard 30 N press 6.6 mm. Do NOT loosen either.
|
| 29 |
+
- frictionloss (60 N) is what a strike must beat to slide the nail, so it sets
|
| 30 |
+
the drive per blow. Calibrated against the corrected head-heavy hammer
|
| 31 |
+
(effective striking mass 599 g of 665 g): ~1 mm per 1.0 m/s tap (never
|
| 32 |
+
latches), 6.5 mm per 1.5 m/s swing (latches on blow 4), 12.8 mm per 2.0 m/s
|
| 33 |
+
blow (latches on blow 3). The pre-fix handle-heavy hammer only delivered
|
| 34 |
+
331 g into the strike, which is why 15 N used to look right.
|
| 35 |
- Loaded as ArticulationObjCfg(fix_base_link=True); the root body carries
|
| 36 |
no pos/quat (set via the cfg default_position), as in desk_lamp.xml.
|
| 37 |
- Success is read from the nail_drive joint position (insertion depth):
|
| 38 |
+
qpos 0 = flush with the start, range floor -0.04 = fully driven; the hammer
|
| 39 |
+
head bottoms out on the board at ~29.6 mm (the nail is then driven flush). -->
|
| 40 |
<compiler angle="radian"/>
|
| 41 |
<worldbody>
|
| 42 |
<body name="board">
|
|
|
|
| 44 |
rgba="0.55 0.38 0.22 1" friction="0.9 0.05 0.001" density="500"/>
|
| 45 |
<body name="nail" pos="0 0 0.03">
|
| 46 |
<joint name="nail_drive" type="slide" axis="0 0 1" range="-0.04 0"
|
| 47 |
+
frictionloss="60" damping="10" armature="0.05"
|
| 48 |
+
solreffriction="0.004 1" solimpfriction="0.999 0.9999 0.0001 0.5 2"/>
|
| 49 |
<geom name="nail_shaft" type="cylinder" size="0.003 0.03" pos="0 0 0.0"
|
| 50 |
density="7850" contype="0" conaffinity="0" rgba="0.72 0.72 0.75 1"/>
|
| 51 |
<geom name="nail_head" type="cylinder" size="0.009 0.0025" pos="0 0 0.032"
|
assets/ycb/hammer/hammer.xml
CHANGED
|
@@ -5,7 +5,12 @@
|
|
| 5 |
textured.obj -> trimesh recenter (xy centered on AABB, base at z=0) -> visual mesh
|
| 6 |
+ CoACD convex-decomposed collision (7 parts, threshold=0.04) so the
|
| 7 |
concave shape is collision-true (cavity preserved / tool silhouette kept).
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
Recentered AABB (m): size=[0.1822, 0.3327, 0.0329].
|
| 10 |
License: YCB CC BY 4.0.
|
| 11 |
-->
|
|
@@ -28,25 +33,25 @@
|
|
| 28 |
<geom name="hammer_visual" type="mesh" mesh="hammer_mesh" material="hammer_mat"
|
| 29 |
group="2" contype="0" conaffinity="0" density="0" />
|
| 30 |
<geom name="hammer_collision0" type="mesh" mesh="hammer_col0"
|
| 31 |
-
density="
|
| 32 |
group="3" rgba="0 1 0 0" />
|
| 33 |
<geom name="hammer_collision1" type="mesh" mesh="hammer_col1"
|
| 34 |
-
density="
|
| 35 |
group="3" rgba="0 1 0 0" />
|
| 36 |
<geom name="hammer_collision2" type="mesh" mesh="hammer_col2"
|
| 37 |
-
density="
|
| 38 |
group="3" rgba="0 1 0 0" />
|
| 39 |
<geom name="hammer_collision3" type="mesh" mesh="hammer_col3"
|
| 40 |
-
density="
|
| 41 |
group="3" rgba="0 1 0 0" />
|
| 42 |
<geom name="hammer_collision4" type="mesh" mesh="hammer_col4"
|
| 43 |
-
density="
|
| 44 |
group="3" rgba="0 1 0 0" />
|
| 45 |
<geom name="hammer_collision5" type="mesh" mesh="hammer_col5"
|
| 46 |
-
density="
|
| 47 |
group="3" rgba="0 1 0 0" />
|
| 48 |
<geom name="hammer_collision6" type="mesh" mesh="hammer_col6"
|
| 49 |
-
density="
|
| 50 |
group="3" rgba="0 1 0 0" />
|
| 51 |
</body>
|
| 52 |
</worldbody>
|
|
|
|
| 5 |
textured.obj -> trimesh recenter (xy centered on AABB, base at z=0) -> visual mesh
|
| 6 |
+ CoACD convex-decomposed collision (7 parts, threshold=0.04) so the
|
| 7 |
concave shape is collision-true (cavity preserved / tool silhouette kept).
|
| 8 |
+
Mixed-material mass (hammer is a two-material tool; a single density would put the
|
| 9 |
+
centre of mass at the volume centroid): 531 g dense (implied 6663 kg/m^3 over the 79.6 cm^3 the scan texture reads as
|
| 10 |
+
bare metal, vs 7850 for solid steel) + 134 g light (750 kg/m^3 x 179.3 cm^3) -> mass 0.665 kg,
|
| 11 |
+
CoM [-0.0223, 0.089, 0.0166]. Per-geom density is an EFFECTIVE density over the
|
| 12 |
+
convex-hull part volume (361.3 cm^3 vs the scan's 258.9 cm^3), so it
|
| 13 |
+
reads lower than the material it stands for — do not "correct" it back to 7850.
|
| 14 |
Recentered AABB (m): size=[0.1822, 0.3327, 0.0329].
|
| 15 |
License: YCB CC BY 4.0.
|
| 16 |
-->
|
|
|
|
| 33 |
<geom name="hammer_visual" type="mesh" mesh="hammer_mesh" material="hammer_mat"
|
| 34 |
group="2" contype="0" conaffinity="0" density="0" />
|
| 35 |
<geom name="hammer_collision0" type="mesh" mesh="hammer_col0"
|
| 36 |
+
density="547.4" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 37 |
group="3" rgba="0 1 0 0" />
|
| 38 |
<geom name="hammer_collision1" type="mesh" mesh="hammer_col1"
|
| 39 |
+
density="4717.1" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 40 |
group="3" rgba="0 1 0 0" />
|
| 41 |
<geom name="hammer_collision2" type="mesh" mesh="hammer_col2"
|
| 42 |
+
density="2067.7" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 43 |
group="3" rgba="0 1 0 0" />
|
| 44 |
<geom name="hammer_collision3" type="mesh" mesh="hammer_col3"
|
| 45 |
+
density="4409.4" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 46 |
group="3" rgba="0 1 0 0" />
|
| 47 |
<geom name="hammer_collision4" type="mesh" mesh="hammer_col4"
|
| 48 |
+
density="4717.1" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 49 |
group="3" rgba="0 1 0 0" />
|
| 50 |
<geom name="hammer_collision5" type="mesh" mesh="hammer_col5"
|
| 51 |
+
density="4717.1" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 52 |
group="3" rgba="0 1 0 0" />
|
| 53 |
<geom name="hammer_collision6" type="mesh" mesh="hammer_col6"
|
| 54 |
+
density="4717.1" friction="2.0 0.1 0.01" solref="0.01 1" priority="2"
|
| 55 |
group="3" rgba="0 1 0 0" />
|
| 56 |
</body>
|
| 57 |
</worldbody>
|