Collision detection is the algorithmic process of determining if the geometric volumes of two or more objects intersect in space. In robotics and task and motion planning (TAMP), it is a critical safety and feasibility check performed within a robot's configuration space (C-space) to ensure planned motions avoid contact with obstacles, itself, or other agents. Efficient collision queries are foundational to sampling-based planners like RRT and PRM, which rely on millions of such checks to build valid paths.
Glossary
Collision Detection

What is Collision Detection?
Collision detection is a fundamental computational geometry process in robotics and computer graphics that determines whether two or more objects intersect or are in contact.
The computational complexity stems from precisely modeling object geometries—often simplified with bounding volumes like axis-aligned bounding boxes (AABB) or oriented bounding boxes (OBB)—and performing fast intersection tests. For dexterous manipulation and grasp planning, detection extends to continuous collision checking across a swept volume to ensure the entire motion trajectory is safe. This process is tightly integrated with motion planning and trajectory optimization to generate physically executable actions for embodied intelligence systems.
Core Collision Detection Algorithms
The fundamental algorithms that determine if two or more geometric objects intersect, a critical safety and feasibility check in robotic motion planning.
Bounding Volume Hierarchy (BVH)
A tree data structure used to organize objects in space to accelerate collision queries. Instead of checking every object pair (an O(n²) operation), the BVH groups objects into nested bounding volumes (like boxes or spheres). The tree is traversed, and only volumes that overlap are tested further.
- Types: Common bounding volumes include Axis-Aligned Bounding Boxes (AABB), Oriented Bounding Boxes (OBB), and Spheres.
- Construction: Can be built top-down (divide space) or bottom-up (cluster objects).
- Use Case: Essential for real-time applications like physics simulation and rendering, where thousands of objects exist.
Separating Axis Theorem (SAT)
A fundamental theorem for detecting intersection between convex polygons or polyhedra. It states: Two convex shapes are disjoint if and only if there exists an axis onto which their projections do not overlap.
- Process: The algorithm tests a set of candidate axes derived from the shapes' edges or face normals.
- Efficiency: Highly efficient for pairs of convex shapes like boxes and polygons.
- Limitation: Only guaranteed for convex shapes; non-convex shapes must first be decomposed into convex parts.
Gilbert–Johnson–Keerthi (GJK) Algorithm
An iterative algorithm for computing the distance between two convex sets and detecting collision. It is renowned for its speed and simplicity in implementation.
- Core Concept: Uses Minkowski Difference to transform the collision problem into determining if the origin is inside the resulting shape.
- Support Function: The algorithm relies on a function that returns the farthest point in a given direction for each shape.
- Output: Returns a boolean for collision and, with the Expanding Polytope Algorithm (EPA), can provide the penetration depth and vector.
Sweep and Prune (Broad Phase)
A broad-phase algorithm that quickly identifies pairs of objects that are potentially colliding by sorting their projections onto coordinate axes. It exploits temporal coherence—the idea that objects move little between time steps.
- Mechanism: Maintains sorted lists of object start and end points along the X, Y, and Z axes. Overlapping intervals on all axes indicate a potential collision pair.
- Complexity: Reduces pair checks from O(n²) to O(n log n + k), where k is the number of overlapping pairs.
- Application: Almost universally used as the first step in physics engines and motion planners to cull obviously separate objects.
Continuous Collision Detection (CCD)
Also known as dynamic or time-continuous collision detection. Unlike discrete methods that check at fixed time steps (risking tunneling), CCD checks for collisions along the entire path an object travels between frames.
- Tunneling Problem: Fast-moving small objects can pass through thin obstacles between discrete checks.
- Methods: Often uses conservative advancement or computes the time of impact (TOI) by solving equations of motion.
- Critical For: High-speed robotics, bullet physics, and any simulation where discrete checks are insufficient for safety.
Voxel Grid & Spatial Hashing
Spatial partitioning techniques that divide the workspace into a uniform grid (voxels) or use a hash function to map object coordinates to grid cells.
- Voxel Grid: The environment is discretized into a 3D grid. Each object is associated with the voxels it occupies. Collision checks only occur between objects sharing voxels.
- Spatial Hashing: A more memory-efficient method where a hash function converts object bounding box coordinates into a hash table key. Objects in the same hash bucket are tested.
- Advantage: Extremely fast for large numbers of small, uniformly sized objects in a bounded space.
How Collision Detection Works in Robotics
Collision detection is a foundational computational geometry process in robotics that determines whether a robot's body or its planned path intersects with objects in its environment.
Collision detection is the algorithmic process of determining if two or more geometric bodies intersect or are in contact. In robotics, this is a critical safety and feasibility check performed in a robot's configuration space (C-space), where the robot's complex physical geometry is represented as a single point, and obstacles are expanded into forbidden regions. Efficient algorithms test for intersection between these simplified volumetric representations, such as bounding volumes or convex hulls, to provide a binary yes/no answer about potential contact.
The output of collision detection directly feeds motion planning and collision avoidance systems. For planning, it validates that every state in a proposed path lies within the free space. For real-time control, it triggers reactive maneuvers. Advanced methods, like those using the Gilbert–Johnson–Keerthi (GJK) algorithm, compute the minimum distance between convex shapes, enabling gradient-based optimization for trajectory optimization and Model Predictive Control (MPC). This ensures robots can move efficiently and safely in dynamic, unstructured environments.
Primary Applications in Robotics & AI
Collision detection is a foundational computational geometry process that determines whether two or more objects intersect. It is critical for safety, planning, and real-time interaction in physical systems.
Path & Motion Planning
Collision detection is the core safety check within sampling-based planners like RRT (Rapidly-exploring Random Tree) and PRM (Probabilistic Roadmap). These algorithms generate candidate robot configurations and must verify each one is in free space (collision-free) before adding it to a path. Efficient collision checking often consumes over 90% of a motion planner's computation time, making optimized geometric algorithms essential for real-time performance.
Real-Time Collision Avoidance
For dynamic environments with moving obstacles or humans (Human-Robot Interaction), collision detection shifts from pre-planning to a continuous, high-frequency loop. This involves:
- Proximity queries to compute minimum distances between the robot and obstacles.
- Velocity obstacles or model predictive control (MPC) to predict and evade potential future collisions.
- Integration with force/torque sensors for contact detection upon unexpected touch. Latency targets are often < 1 ms for critical control loops.
Simulation & Digital Twins
Physics engines like NVIDIA PhysX, Bullet, and MuJoCo rely on collision detection to simulate realistic physical interactions for Sim-to-Real Transfer Learning. This is used for:
- Training reinforcement learning policies safely in virtual environments.
- Testing thousands of robotic manipulation scenarios before hardware deployment.
- Validating plans via kinodynamic simulation to ensure they are dynamically feasible and collision-free.
Grasping & Manipulation
Grasp planning requires precise collision detection between a robot's gripper, the target object, and surrounding clutter. This involves:
- Computing antipodal contact points that yield force-closure grasps.
- Verifying the gripper's closing trajectory does not collide with the object or environment.
- In dexterous manipulation, continuous collision checking is needed for finger-object and object-object contacts during in-hand manipulation sequences.
Configuration Space Analysis
A fundamental technique is to transform the problem by mapping the robot's physical geometry into an abstract Configuration Space (C-Space). In this space:
- The robot is represented as a single point.
- Obstacles are expanded into forbidden regions called C-obstacles.
- Collision detection becomes a point-in-region test, which is often simpler and faster. This transformation is central to many classic motion planning algorithms.
Broad & Narrow Phase Processing
For computational efficiency, collision detection is typically a two-stage pipeline:
- Broad Phase: Quickly identifies pairs of objects that are potentially colliding using fast approximate volumes like Axis-Aligned Bounding Boxes (AABBs) or spatial partitioning structures (BVH trees, grids). This eliminates most object pairs from costly detailed checks.
- Narrow Phase: Performs exact geometric intersection tests on the candidate pairs from the broad phase using algorithms like Gilbert–Johnson–Keerthi (GJK) for convex shapes or Minkowski sums.
Collision Detection vs. Related Concepts
A technical comparison of collision detection and its adjacent algorithmic processes within the task and motion planning stack.
| Feature / Metric | Collision Detection | Collision Avoidance | Motion Planning |
|---|---|---|---|
Primary Objective | Determine geometric intersection between objects | Dynamically adjust trajectory to prevent intersection | Compute a valid path from start to goal |
Core Input | Object geometries & poses (static or dynamic) | Current robot state & local sensor stream | Start state, goal state, environment model |
Computational Phase | State verification / Boolean query | Real-time reactive control | Pre-execution deliberation / global planning |
Output | Boolean result (collision / no-collision) or penetration depth | Immediate corrective velocity or force command | A sequence of states or a time-parameterized trajectory |
Typical Frequency | Discrete checks (e.g., per planning cycle) | High-frequency loop (e.g., 100+ Hz) | Single computation or intermittent replanning |
Key Algorithms | Bounding volume hierarchies (BVH), GJK, SAT | Artificial potential fields, velocity obstacles | A*, RRT*, trajectory optimization |
Use of Configuration Space (C-Space) | Maps obstacles to forbidden regions in C-Space for efficient checking | Often operates in workspace or velocity space for speed | Explicitly searches or samples within the C-Space |
Relation to Execution | A safety check used within planning, simulation, and monitoring | A low-level control layer that modifies execution in real-time | Generates the nominal plan that execution and avoidance layers follow |
Frequently Asked Questions
Collision detection is a fundamental computational geometry process in robotics and simulation. This FAQ addresses core concepts, algorithms, and implementation challenges for engineers building safe, autonomous systems.
Collision detection is the computational process of determining whether two or more geometric objects intersect or are in contact within a given space. It works by mathematically representing objects as volumes (like bounding boxes or convex hulls) and performing intersection tests between these volumes. The core algorithmic flow involves a broad phase, which quickly filters out object pairs that are far apart using spatial data structures like BVHs (Bounding Volume Hierarchies) or spatial hashing, followed by a narrow phase, which performs precise geometric intersection calculations on the remaining candidate pairs using algorithms like the Gilbert–Johnson–Keerthi (GJK) or Separating Axis Theorem (SAT).
For a robot arm, this means continuously checking if its links (represented as collections of geometric primitives) intersect with any obstacles in the environment or with itself (self-collision). The output is a boolean result (collision/no collision) and often additional data like penetration depth and contact points, which are critical for collision response and path planning.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Collision detection is a foundational component within a larger algorithmic ecosystem for robotic autonomy. These related concepts define the planning, representation, and control frameworks it operates within.
Motion Planning
The overarching algorithmic process of computing a sequence of valid configurations for a robot to move from a start to a goal state. Collision detection is the core geometric subroutine that validates each candidate configuration and path segment, ensuring they lie within the free space. Algorithms like RRT and PRM rely on millions of collision checks to build their roadmaps and trees.
Configuration Space (C-Space)
A fundamental mathematical abstraction where every possible pose of a robot is mapped to a single point. Physical 3D obstacles are transformed into forbidden regions within this abstract space. Collision detection is the operation that tests whether a given point (configuration) lies within these C-obstacles. This transformation simplifies planning to searching a point through an empty region.
Hierarchical Task Network (HTN)
A high-level planning formalism that decomposes complex goals into networks of subtasks. While HTN handles the symbolic "what," its primitive actions must be validated by the geometric "how." Collision detection is invoked during the refinement of these primitive actions into executable motions, ensuring the symbolic plan has a physically feasible instantiation.
Trajectory Optimization
The process of computing a smooth, time-parameterized path that minimizes a cost function (e.g., energy, time). The optimization constraints must include collision avoidance. Here, collision detection provides the gradient or penalty signal—indicating how far a candidate trajectory penetrates an obstacle—which the solver uses to iteratively adjust the path into the free space.
Model Predictive Control (MPC)
An online control technique that repeatedly solves a finite-horizon trajectory optimization problem. For robots in dynamic environments, the model's predictions must account for future collisions. Collision detection is embedded within the MPC's receding-horizon optimization loop, enabling real-time reactive collision avoidance by constantly re-planning safe trajectories based on the latest sensor data.
Execution Monitoring & Replanning
The supervisory process that observes a robot during plan execution. Collision detection is a critical sensor in this loop. If an unexpected obstacle is detected within the robot's safety margin, it triggers a replanning event. The system must then call the motion planner—and its collision detection core—again from the current state to generate a new, safe path to the goal.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us