The Timed Elastic Band (TEB) is a local trajectory optimization method that deforms an initial, kinematically feasible path in real-time using gradient-descent techniques. It optimizes a multi-objective cost function that simultaneously enforces smoothness, maintains a safe distance from obstacles, and adheres to the robot's dynamic constraints and temporal requirements. This makes it a core algorithm for reactive, online motion planning in dynamic environments like warehouses.
Glossary
Timed Elastic Band (TEB)

What is Timed Elastic Band (TEB)?
A local trajectory optimization method for autonomous mobile robots.
The method represents a trajectory as a sequence of poses (positions and orientations) connected by timed transitions, forming an 'elastic band' that can be stretched and bent. By optimizing the pose sequence and the time intervals between them, TEB directly accounts for velocity and acceleration limits. It is closely related to Model Predictive Control (MPC) and is often used in conjunction with global planners like A* or RRT* to provide a smooth, locally optimal, and executable path.
Key Features of the TEB Algorithm
The Timed Elastic Band (TEB) algorithm is a local trajectory optimization method that deforms an initial path by solving a nonlinear optimization problem. Its power lies in its ability to simultaneously optimize for spatial smoothness, temporal efficiency, and constraint satisfaction in real-time.
Elastic Band Representation
The core data structure is an elastic band, a discrete sequence of robot poses (x, y, θ) connected by springs and damping elements. This representation allows the algorithm to 'stretch' and 'bend' the initial path.
- Springs penalize the distance between consecutive poses, encouraging path shortening.
- Damping elements penalize changes in velocity between poses, promoting smooth motion.
- The band is deformed via gradient descent to minimize a total cost function, balancing path length, smoothness, and obstacle clearance.
Explicit Time Optimization
Unlike purely geometric planners, TEB incorporates time as a first-class optimization variable. Each pose in the elastic band has an associated time stamp ΔT_i.
- This allows TEB to directly optimize for kinodynamic feasibility, ensuring the planned velocities and accelerations between poses respect the robot's dynamic limits.
- The optimizer can trade off spatial path length against traversal time, enabling time-optimal planning.
- Temporal constraints, such as maximum velocity or desired arrival time, are naturally integrated into the cost function.
Multi-Objective Cost Function
TEB performs a weighted optimization across several competing objectives. The total cost is a sum of individual penalty terms:
- Path Length: Minimizes the total Euclidean distance traveled.
- Smoothness: Penalizes high curvature and abrupt changes in velocity/acceleration.
- Obstacle Clearance: Uses a repulsive potential field or minimum distance constraint to keep the band away from obstacles.
- Kinematic/Dynamic Constraints: Hard or soft constraints on maximum velocity, acceleration, and turning radius.
- Time Optimality: Penalizes total traversal time. The weights allow engineers to prioritize, e.g., smoothness over speed for a delicate payload.
Gradient-Based Nonlinear Optimization
TEB formulates trajectory deformation as a Nonlinear Programming (NLP) problem. It uses efficient gradient-based solvers like Levenberg-Marquardt or Gauss-Newton from libraries such as g2o or Ceres Solver.
- The solver iteratively adjusts all poses and time stamps to minimize the total cost.
- Sparsity in the problem's Jacobian matrix (each pose only affects a local neighborhood) is exploited for real-time performance.
- This approach allows TEB to handle complex, non-convex constraints that are difficult for graph-search methods.
Integration with Global Planners
TEB is primarily a local planner. It requires a kinematically feasible initial guess, typically provided by a global planner (e.g., A*, Dijkstra, RRT*).
- The global planner finds a topologically correct, coarse path from start to goal.
- TEB then locally optimizes this path, smoothing it, adding time information, and adapting it to dynamic obstacles.
- This hybrid architecture combines the global foresight of graph search with the local, constraint-aware optimization of TEB.
Dynamic Obstacle Avoidance
TEB supports real-time replanning in dynamic environments by incorporating moving obstacle predictions.
- Obstacle trajectories (position over time) are modeled and added as time-dependent constraints to the optimization problem.
- The solver can deform the elastic band in both space and time to find a collision-free trajectory, potentially slowing down or speeding up to avoid conflicts.
- This is a key advantage over purely reactive methods like Dynamic Window Approach (DWA), as TEB plans a consistent, look-ahead trajectory rather than just selecting the next velocity.
How the Timed Elastic Band Algorithm Works
The Timed Elastic Band (TEB) is a local trajectory optimization method for mobile robots that deforms an initial path to produce a smooth, safe, and temporally feasible plan.
The Timed Elastic Band algorithm represents a robot's planned trajectory as a sequence of pose-time pairs connected by flexible "bands." It treats this sequence as an elastic structure that can be deformed. The core optimization process uses a gradient-descent method to minimize a weighted multi-objective cost function. Key objectives include path smoothness, adherence to kinodynamic constraints (like maximum velocity), and maintaining a safe distance from obstacles. This formulation allows TEB to efficiently adjust the path and its associated timing in real-time.
TEB is fundamentally a local planner, requiring an initial, globally feasible path from a planner like A* or RRT*. It excels in dense, dynamic environments because its optimization is reactive to new sensor data. By explicitly modeling time, TEB can optimize for speed and generate trajectories that respect the robot's acceleration limits. This makes it a popular choice for differential-drive and car-like robots in applications like warehouse logistics and autonomous navigation, where frequent, smooth adjustments are critical.
TEB vs. Other Local Planners and Controllers
A feature and performance comparison of the Timed Elastic Band (TEB) local planner against other common local planning and reactive control algorithms used in mobile robotics.
| Feature / Metric | Timed Elastic Band (TEB) | Dynamic Window Approach (DWA) | Model Predictive Control (MPC) |
|---|---|---|---|
Core Methodology | Gradient-based trajectory deformation | Reactive velocity space search | Finite-horizon optimal control |
Explicit Time Optimization | |||
Holonomic & Non-Holonomic Support | Non-holonomic (primary) | Non-holonomic | Both (model-dependent) |
Kinodynamic Constraints | |||
Global Optimality Guarantee | Local within horizon | ||
Replanning Frequency | 10-100 Hz | 10-50 Hz | 5-50 Hz |
Typical Computation Load | Medium-High | Low | High |
Multi-Agent Reciprocal Avoidance | Requires extension (e.g., ORCA) | No (ego-centric only) | Yes (via coupled constraints) |
Handles Dynamic Obstacles | Yes (predictive) | Yes (reactive) | Yes (predictive) |
Path Smoothness Output | High (explicitly optimized) | Low-Medium | High (optimization objective) |
Warm-Start Capability | |||
Primary Use Case | Local trajectory refinement for car-like robots | Reactive obstacle avoidance for differential drives | Precise, constrained control for high-dynamics systems |
Common Use Cases and Applications
The Timed Elastic Band (TEB) algorithm is a cornerstone for local trajectory optimization in dynamic environments. Its primary applications center on enabling safe, smooth, and temporally-aware navigation for autonomous systems that must react in real-time.
Autonomous Guided Vehicle (AGV) & Forklift Control
For industrial vehicles with more complex kinematics (e.g., car-like Ackermann steering or differential-drive forklifts), TEB provides precise trajectory control.
- It respects the vehicle's specific non-holonomic constraints, preventing commands that would require sideways sliding.
- Optimizes for time-efficient docking and precise loading/unloading maneuvers.
- Incorporates temporal constraints to synchronize with conveyor belts or other automated systems in a just-in-time manufacturing workflow.
This application is critical for automated storage and retrieval systems (AS/RS) and flexible manufacturing lines.
Dynamic Obstacle Avoidance in Crowded Spaces
Unlike purely geometric planners, TEB's optimization framework explicitly incorporates predictions of moving agents.
- By modeling dynamic obstacles within its cost function, TEB can compute velocities that proactively steer clear of predicted collision points.
- It performs local re-planning at high frequency (10-100 Hz), allowing it to react to sudden changes, such as a person stepping into the path.
- This makes it ideal for last-mile delivery robots navigating sidewalks and airport baggage carts moving among passengers.
Formation Control for Multi-Robot Systems
TEB can be extended for coordinating small groups of robots that must maintain a specific spatial formation while navigating.
- A virtual structure approach defines the formation relative to a leader or a virtual reference point.
- Individual TEB instances for each robot optimize their local trajectories while incorporating additional cost terms to penalize deviations from their assigned position in the formation.
- This is used for applications like convoying in logistics yards or coordinated sensor deployment in search and rescue scenarios.
Integration with Predictive Control Frameworks
TEB functions as the trajectory generator within a larger Model Predictive Control (MPC) or Receding Horizon Control architecture.
- A higher-level planner or policy sets the intermediate goals (the 'band's' end-point).
- TEB rapidly solves the local optimization problem over the short-term horizon, providing a feasible, optimized trajectory.
- The first segment of this trajectory is executed, and the process repeats. This hybrid approach combines the reactivity of TEB with the long-horizon reasoning of MPC, used in complex scenarios like autonomous valet parking.
Person-Following and Teleoperation Assistance
TEB enables smooth and natural following behaviors for robots that accompany humans.
- The goal pose for the TEB optimizer is continuously updated based on the tracked position of the person, maintaining a set following distance.
- The optimization ensures the robot's motion remains predictable and non-threatening to the human, avoiding sudden accelerations or sharp turns.
- Similarly, in shared control teleoperation, TEB can smooth and correct a human operator's joystick commands to ensure kinematic feasibility and obstacle avoidance, enhancing safety and ease of use.
Frequently Asked Questions
The Timed Elastic Band (TEB) is a core algorithm for real-time, local trajectory optimization in robotics. This FAQ addresses common technical questions about its operation, applications, and relationship to other planning methods.
The Timed Elastic Band (TEB) is a local trajectory optimization method that deforms an initial, kinematically feasible path in real-time using gradient descent, optimizing for smoothness, safety, and adherence to temporal constraints.
It works by representing a planned trajectory as a sequence of robot poses (position & orientation) and the time intervals between them, forming an 'elastic band'. This band is subject to various 'forces' modeled as optimization objectives and constraints:
- Internal Forces: Minimize path length and curvature for smoothness.
- External Forces: Repel the band from obstacles based on proximity.
- Temporal Constraints: Optimize time intervals to satisfy maximum velocities, accelerations, and achieve desired overall speed.
The solver iteratively adjusts the poses and timings to minimize a total cost function, producing a locally optimal, executable trajectory that dynamically reacts to sensor updates.
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
The Timed Elastic Band (TEB) algorithm operates within a broader ecosystem of real-time planning and control methods. These related concepts define the constraints, frameworks, and complementary algorithms that shape modern robotic navigation.
Dynamic Window Approach (DWA)
A reactive collision avoidance algorithm that selects optimal robot velocities by evaluating a dynamic window of admissible speeds over a short time horizon. It directly considers the robot's kinematic constraints (max velocity, acceleration) and immediate obstacle proximity.
- Core Mechanism: Simulates short-term trajectories for sampled velocity pairs (v, ω), scores them based on goal heading, clearance, and speed, and selects the highest-scoring command.
- Contrast with TEB: DWA is purely reactive and short-sighted, while TEB performs local optimization over a longer, deformable trajectory, balancing smoothness and global path adherence.
Model Predictive Control (MPC)
An advanced control paradigm where a dynamic model of the system is used to predict future states and solve a finite-horizon optimization problem at each control step to determine optimal actions. The first action is executed, and the process repeats (receding horizon control).
- Mathematical Foundation: Solves a constrained optimization problem at each timestep, minimizing a cost function (e.g., tracking error, control effort) subject to system dynamics and constraints.
- Relation to TEB: TEB is a specific instance of MPC applied to local trajectory deformation. It uses a parameterized band (the elastic band) as its prediction model and optimizes its control points.
Kinodynamic Planning
The problem of finding a trajectory that satisfies both kinematic constraints (e.g., non-holonomic wheeled motion) and dynamic constraints (e.g., acceleration, torque limits). It moves beyond pure geometric path planning to generate physically executable motions.
- Key Challenge: The search space includes full state (pose, velocities) and is subject to differential constraints derived from physics.
- TEB's Role: TEB is a kinodynamic planner. Its optimization explicitly incorporates velocity and acceleration terms, ensuring the deformed trajectory respects the robot's dynamic capabilities.
Velocity Obstacles (VO) & ORCA
Geometric frameworks for collision avoidance among moving agents. Velocity Obstacles defines the set of relative velocities that would cause a collision within a time window. Optimal Reciprocal Collision Avoidance (ORCA) is a decentralized, reactive algorithm where agents independently select velocities from mutually collision-free sets.
- Reactive vs. Optimizing: VO/ORCA are instantaneous velocity selectors. TEB is a trajectory optimizer that can incorporate similar collision constraints over its entire planning horizon, leading to smoother, more anticipatory avoidance.
Control Barrier Function (CBF)
A mathematical tool from control theory used to synthesize controllers that provably keep a dynamical system within a safe set. A CBF defines a constraint on the system's derivatives that, if enforced, guarantees forward invariance of the safe region.
- Formal Safety Guarantees: Provides a framework for certifiable safety, unlike heuristic methods.
- Integration with TEB: CBFs can be incorporated as hard constraints within the TEB optimization problem, transforming soft penalty terms for obstacle proximity into formally verified safety constraints.
Motion Primitive
A short, kinematically and dynamically feasible trajectory segment that serves as a building block for complex paths. Primitives are often precomputed and stored in a library for use in lattice-based planners.
- Usage: Planners search over sequences of primitives to connect start and goal states.
- Contrast with TEB: TEB does not use a discrete library of primitives. Instead, it continuously deforms a parameterized trajectory. However, the initial guess provided to TEB is often generated by a planner that may use motion primitives.

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