Skip to content

Object fixes: collision geometry, coordinate frames, mesh alignment #6

Description

@siddhss5

Convention

  • Origin at bottom center (canonical resting pose, Z-up)
  • dimensions[2] is always the resting height
  • Collision geom aligned with visual mesh
  • Visual mesh centered at origin in mesh file (no pos/euler offsets in XML)

Verification Status

Object Collision Geom Coll/Render Align Coord Frame Mesh Z Notes
can
cracker_box mesh re-centered
fuze_bottle mesh re-centered
gelatin_box mesh re-centered + rotated
herring_tin 🔧 🔧 🔧 🔧 box+2cyl collision, dims swapped to resting frame
lunchbox 🔧 🔧 rotated to flat pose, collision fits main body
notebook 🔧 mesh re-centered
plastic_bowl 🔧 🔧 🔧 mesh collision + solref/solimp for nesting
plastic_glass 🔧 🔧 🔧 cylinder collision with pos offset
plastic_plate 🔧 🔧 🔧 mesh collision + solref/solimp for stacking
pocky_box
pop_tarts mesh re-centered + rotated
potted_meat_can mesh re-centered
recycle_bin n/a primitives only
sugar_box 🔧 🔧 🔧 rotated to flat pose
wicker_tray hollow tray primitives
yellow_tote 🔧 hollow tote primitives, mesh shifted

Legend: ✅ verified, 🔧 needs fix

Objects needing work

  • herring_tin — all 4 criteria
  • plastic_bowl — collision, alignment, coord frame
  • plastic_glass — collision, alignment, coord frame
  • plastic_plate — collision, alignment, coord frame
  • sugar_box — alignment, coord frame, mesh Z
  • lunchbox — coord frame, mesh Z
  • notebook — alignment
  • yellow_tote — alignment

Useful scripts (already in repo)

  • scripts/validate_objects.py — check all 6 criteria
  • scripts/inspect_object.py — visual inspection with collision overlay + axes
  • scripts/recenter_mesh.py — re-center mesh origin to centroid
  • scripts/viz_all_objects.py — grid view with collision overlays
  • scripts/viz_stacking_demo.py — physics demo with stacked dishes

Workflow

  1. uv run python scripts/validate_objects.py <object>
  2. uv run python scripts/inspect_object.py <object>
  3. uv run python scripts/recenter_mesh.py path/to/mesh.obj --apply
  4. Re-validate and visually verify

Key lessons

  • dimensions[2] must be the resting height (thin dimension for flat objects like herring_tin)
  • Mesh must be centered at centroid; use body pos for z-offset, not mesh origin
  • Don't use pos/euler on visual geoms — fix the mesh file directly
  • Tall thin objects (glass) work better with cylinder primitive than mesh collision
  • Mesh collision for nesting (bowls, plates) needs solref="0.004 1" solimp="0.95 0.99 0.001"
  • When primitive collision has its own pos, keep body pos="0 0 0"
  • Physics stacking demos need integrator="implicitfast" and viscosity="2.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions