Open Source Robotics

A curated collection of high-quality open source robotics projects, tools, and software to propel the robotics community forward.

Signal Temporal Logic

  • Also called: STL
  • Category: Planning & manipulation › Task-level
  • Tags: formal-methods, temporal-logic, task-specification, control, planning

A formal language for writing time-bounded requirements over real-valued signals, such as robot trajectories, with a robustness score that says how strongly a trajectory satisfies them.

Definition

Signal temporal logic (STL) is a formal specification language for properties of continuous, real-valued signals over time. It was introduced by Oded Maler and Dejan Nickovic in 2004 as an extension of metric interval temporal logic, aimed at monitoring signals from continuous and hybrid systems. In robotics the signal is usually a trajectory of states, and STL lets an engineer write requirements such as "reach region A within 10 seconds, stay there for at least 2 seconds, and never come within 0.5 meters of the obstacle" as one precise formula.

An STL formula is built from predicates of the form μ(x) ≥ 0, where μ is a function of the state such as a distance to a goal, combined with Boolean operators (not, and, or) and temporal operators that carry explicit time intervals: always G[a,b] (the formula holds at every time in the interval), eventually F[a,b] (it holds at some time in the interval) and until U[a,b]. Because the predicates are real-valued, STL has quantitative semantics as well as a true/false meaning. The robustness of a trajectory with respect to a formula, as defined by Fainekos and Pappas and by Donzé and Maler, is a signed number: positive means the formula is satisfied, negative means it is violated, and its magnitude says by how much the signal could be perturbed before the verdict changes.

Robustness turns specification into optimization. Planners can maximize robustness directly, encode the formula as constraints in a mixed-integer program, or use smooth approximations of the min and max operators so that gradient-based trajectory optimization and learning methods can be applied. STL is also used at runtime to monitor whether a system is meeting its requirements, and to falsify controllers by searching for disturbances that drive robustness negative. The main practical costs are computational: nested temporal operators and long horizons make the resulting optimization problems large, and the non-smooth min/max structure complicates gradient methods.

Why it matters

Many robot tasks have deadlines, ordering and safety requirements that are awkward to express as a single cost function or reward. STL gives these requirements an exact meaning that can be checked, monitored and optimized, and its robustness score gives controllers a margin to work with rather than a binary pass or fail.

Key applications

  • Task specification with deadlines and ordering for mobile robots and drones
  • Model predictive control that maximizes specification robustness
  • Runtime monitoring of safety and timing requirements
  • Falsification and testing of controllers, including automotive systems
  • Shaping rewards or constraints for learned policies
  • Multi-robot coordination with time-bounded joint objectives

In practice

A team building a warehouse robot writes the task as an STL formula: eventually within 30 seconds reach the pickup zone, then within the next 20 seconds reach the drop-off zone, while always staying at least 0.3 meters from shelves and people. They model the robot as a double integrator, encode the formula over a receding horizon as mixed-integer constraints, and solve it in a model predictive control loop that maximizes robustness. When a person steps into the aisle, the obstacle predicate changes, the solver replans, and the logged robustness value shows how close the robot came to violating the clearance requirement. The same formula is run as an offline monitor over recorded trajectories during testing.

Common misconceptions

  • STL here is the same as the STL 3D-model file format — the abbreviation also names the stereolithography mesh format used in CAD and 3D printing, which is unrelated to signal temporal logic
  • STL only gives a yes/no answer — its quantitative robustness semantics give a signed margin of satisfaction that controllers and optimizers can use
  • Maximizing robustness always produces natural behavior — standard robustness depends only on the worst-case point in time, so optimizers can produce trajectories that just meet the margin at one instant and ignore the rest
  • STL is the same as linear temporal logic (LTL) — LTL reasons over discrete propositions without explicit time bounds, while STL uses real-valued predicates and timed intervals

Who should know this

  • Motion planning and control engineers working with formal task specifications
  • Verification and safety engineers for autonomous systems
  • Researchers combining formal methods with learning
  • Multi-robot and drone mission designers

Related technologies

  • Linear Temporal Logic
  • Metric Interval Temporal Logic
  • Mixed-Integer Programming Solvers
  • Model Predictive Control
  • Control Barrier Functions
  • Runtime Verification

Related terms

  • Control Barrier Function
  • Model Predictive Control
  • Mixed-Integer Programming
  • Task Planning
  • Trajectory Planning
  • Double Integrator

Related projects

  • Drake: MIT robotics toolbox for model-based dynamics, optimization, and control system design
  • MuJoCo MPC: DeepMind's interactive real-time model predictive control framework for MuJoCo
  • PyPose: PyTorch library for differentiable robotics with deep learning and Lie group optimization
  • ros2_control: Hardware abstraction framework for ROS 2 enabling portable robot control code
  • safe-control-gym: Benchmark suite for safe learning-based control: RL and MPC under one API
  • OpEn (Optimization Engine): Embedded nonconvex optimization solver in Rust for real-time MPC on robots

This website requires JavaScript to function properly. Please enable JavaScript to explore our collection of open source robotics projects.