A collision mesh is the simplified geometric representation of a robot link or object that physics engines and motion planners use to detect contact and compute collision responses, as opposed to the detailed visual mesh used for rendering. In robotics simulation, it determines what the simulated world considers solid, so its quality directly affects contact dynamics, grasping and collision checking.
Robot description formats make this separation explicit. URDF, SDFormat and MJCF each let a model declare a visual geometry and a separate collision geometry for every link, and simulators such as Gazebo, MuJoCo, PyBullet and Isaac Sim rely on that distinction.
Why simulators separate collision and visual geometry
Collision detection runs hundreds or thousands of times per simulated second, often for many pairs of bodies, so its cost grows quickly with geometric detail. A visual mesh exported from CAD may contain hundreds of thousands of triangles, while a well-built collision mesh for the same link usually needs only a few dozen to a few thousand.
Simplification also improves numerical stability. Thin features, tiny fillets and internal faces create many short-lived contact points that make solvers jitter or produce interpenetration. A clean, closed and coarse collision shape gives the solver fewer, more consistent contacts.
The table below contrasts the two kinds of geometry that a robot model normally carries.
| Property | Visual mesh | Collision mesh |
|---|---|---|
| Purpose | Rendering and camera simulation | Contact detection and response |
| Typical triangle count | Thousands to millions | Tens to a few thousand |
| Detail level | Fine features, textures, colors | Coarse, functional outer shape |
| Topology requirement | Any, may be open | Closed and often convex |
| Main performance impact | Rendering frame rate | Physics step time and stability |
Types of collision geometry
Collision geometry ranges from analytic primitives to full triangle meshes. Primitives such as boxes, spheres, cylinders and capsules have closed-form contact tests, which makes them the fastest and most robust option whenever they fit the shape reasonably well.
Many physics engines handle convex shapes far better than concave ones, because algorithms such as GJK and EPA find contacts between convex bodies efficiently. Concave objects are therefore commonly split into several convex pieces through convex decomposition, using tools that implement approximate methods such as V-HACD or CoACD.
The following table summarizes the common geometry types and their typical use.
| Geometry type | Speed | Accuracy | Typical use |
|---|---|---|---|
| Primitive shapes | Very fast | Approximate | Robot links, simple tools, boxes |
| Single convex hull | Fast | Overestimates concave parts | Compact parts without cavities |
| Convex decomposition | Moderate | Good for concave shapes | Cups, bins, grippers, handles |
| Triangle mesh | Slow | High | Static environment such as floors and walls |
| Signed distance field | Fast queries after precomputation | High | Planning, contact-rich manipulation |
Building a good collision mesh
A good collision mesh is as simple as possible while preserving the surfaces that matter for the task. For a mobile robot chassis, a box may be enough; for a gripper finger that must grasp small parts, the contact surfaces need much more care.
- Start from the CAD or visual mesh and remove internal and hidden geometry.
- Decide which surfaces must be accurate, such as fingertips, handles and mating faces.
- Replace simple regions with primitives and decompose the rest into convex pieces.
- Check that each piece is closed and correctly oriented, with consistent normals.
- Verify scale, origin and units against the visual mesh in the simulator.
- Test contacts in simulation and inspect penetration and jitter before deployment.
Collision margins deserve attention as well. Many engines add a small contact margin or skin, often a few millimeters, around shapes to detect contact early and stabilize stacking. Planners may deliberately inflate collision geometry by a safety padding so that planned paths keep clearance from obstacles in the real world.
Collision meshes in planning versus physics simulation
The same robot model often feeds two consumers with different priorities. Physics simulation needs stable contact forces for grasping and locomotion, while motion planning and collision checking need fast yes-or-no and distance queries along thousands of candidate configurations.
Because of this, teams sometimes maintain separate collision sets for each purpose, as summarized below.
| Use case | Main requirement | Recommended geometry |
|---|---|---|
| Motion planning | Fast queries with safety clearance | Padded primitives or capsules |
| Grasp simulation | Accurate contact surfaces | Convex decomposition of fingers and objects |
| Locomotion | Stable foot-ground contact | Spheres or boxes on feet, flat terrain mesh |
| Reinforcement learning at scale | Throughput across many environments | Very coarse primitives |
| Digital twin validation | Geometric fidelity | Detailed convex sets or distance fields |
Common mistakes and their effects
Most collision problems in robot simulators trace back to the geometry rather than the solver. Typical errors include using the visual mesh directly, which slows simulation dramatically, and leaving non-watertight meshes that cause objects to fall through each other or explode apart at contact.
Other frequent mistakes are wrong units, such as a millimeter-scale mesh loaded as meters, convex hulls that silently fill a cup’s cavity, and self-collision between adjacent links that was never disabled. Such errors can make a policy trained in simulation fail on hardware, so collision geometry deserves the same review as kinematic parameters.
In everyday language
A collision mesh is the invisible, simplified shape a simulator uses to decide when things touch. The robot may look detailed on the screen, but underneath, the computer often treats it as a set of boxes, cylinders and rounded blocks.
This is like packing furniture into a moving van. Nobody measures every carved detail of a chair; people treat it as a rough block to see whether it fits. Simple shapes make the calculation fast and reliable, as long as the important edges are still in the right place.
Seen in the real world
A logistics company trains a bin-picking policy in simulation, running thousands of parallel environments. Its first robot model reuses the CAD visual meshes for collision, and the simulation reaches only a few steps per second while grasped boxes jitter and sink into the gripper.
The simulation engineers rebuild the collision geometry. The arm links become capsules, the gripper fingers become a handful of convex pieces with accurate contact pads, and the bin walls become simple boxes. Each link now uses fewer than 200 triangles in its collision representation.
The result is a large speed-up in simulation throughput and stable grasps without interpenetration. When the trained policy moves to the physical robot, grasp behavior matches simulation closely, because the surfaces that actually make contact were kept accurate while everything else was simplified.