Inferensys

Glossary

Timed Elastic Band (TEB)

Timed Elastic Band (TEB) is a local trajectory optimization method that deforms a kinematically feasible initial path to optimize for smoothness, safety, and adherence to temporal constraints.
Performance engineer optimizing AI latency on laptop, latency charts visible, technical optimization session.
REAL-TIME REPLANNING ENGINES

What is Timed Elastic Band (TEB)?

A local trajectory optimization method for autonomous mobile robots.

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.

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.

CORE MECHANICS

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.

01

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.
02

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.
03

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.
04

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.
05

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.
06

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.
REAL-TIME REPLANNING ENGINES

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.

COMPARISON

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 / MetricTimed 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

REAL-TIME REPLANNING ENGINES

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.

02

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.

03

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.
04

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.
05

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.
06

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.
TIMED ELASTIC BAND (TEB)

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.

Prasad Kumkar

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.