Skip to content

Mesh obstacles not detected by collision checker #597

@will-44

Description

@will-44

Environment

  • cuRobo version: v0.7.7
  • Python: 3.10
  • Installation: docker python

Problem

Hello,
I'm trying to add a mesh and inspect it but mesh obstacles are not detected by the collision checker, while cuboid obstacles at the same position work correctly.

This happens both when:

  • Mesh is included at MotionGen initialization
  • Mesh is added dynamically via update_world()

Minimal reproduction

from curobo.geom.types import WorldConfig
from curobo.geom.sdf.world import CollisionCheckerType
from curobo.wrap.reacher.motion_gen import MotionGen, MotionGenConfig, MotionGenPlanConfig
from curobo.types.math import Pose
from curobo.types.robot import JointState
import torch

# World with MESH obstacle
world_with_mesh = {
    "mesh": {
        "obstacle": {
            "file_path": "scene/nvblox/srl_ur10_bins.obj",
            "pose": [0.35, 0.0, 0.3, 1, 0, 0, 0],
        },
    },
}

# World with CUBOID at same position
world_with_cuboid = {
    "cuboid": {
        "obstacle": {
            "dims": [0.2, 0.2, 0.2],
            "pose": [0.35, 0.0, 0.3, 1, 0, 0, 0],
        },
    },
}

# Test both
for name, world in [("MESH", world_with_mesh), ("CUBOID", world_with_cuboid)]:
    mg = MotionGen(MotionGenConfig.load_from_robot_config(
        "franka.yml", world,
        collision_checker_type=CollisionCheckerType.MESH,
        collision_cache={"obb": 50, "mesh": 20},
        use_cuda_graph=False,
    ))
    mg.warmup()
    
    start = JointState.from_position(
        torch.tensor([[0.0, -0.5, 0.0, -2.0, 0.0, 1.5, 0.785]], device="cuda"),
        joint_names=[f"panda_joint{i}" for i in range(1, 8)],
    )
    goal = Pose.from_list([0.5, 0.0, 0.3, 1.0, 0.0, 0.0, 0.0])
    
    result = mg.plan_single(start, goal, MotionGenPlanConfig(max_attempts=10))
    print(f"{name}: {'Success' if result.success.item() else 'Failed'}")

Results

MESH: Success    ← Should be Failed (obstacle ignored!)
CUBOID: Failed   ← Correct behavior

Observations

  1. Mesh name appears in _env_mesh_names → mesh is registered
  2. Mesh appears in world_model.save_world_as_mesh() output → geometry is loaded
  3. But collision checker ignores it completely

Questions

  1. Is there additional configuration required for mesh collision detection?
  2. Are there specific mesh format requirements?
  3. Is this a known limitation or a bug?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions