---
kind: concept
slug: motion-primitives
title: Motion primitives
summary: >-
  Short pieces that carry a system from one state to the next. Constant-input pieces with a closed-form cost form graph edges for quadrotor A* planning; learned pieces are conditioned on a partial observation for humanoid teleoperation; parameterised skills are checked inside an LLM planner. Results are author-reported.
tags: [motion-planning, graph-search, trajectory-generation, quadrotor, movement-primitives, teleoperation, humanoid, llm-planning, robot-manipulation]
papers: ["1709.05401", "2411.01014", "2303.12153"]
related: [a-star-search, model-predictive-control, quadratic-programming, teleoperation, time-optimal-control, llm-planning, out-of-distribution-detection]
status: draft
updated_at: 2026-10-31
---

## Overview

A motion primitive is a reusable piece of motion that a planner or controller
combines with others. The three cards so far use the term for different
designs, and the designs do not share their mathematics.

- **Graph edges for search.** A finite set of constant controls, each applied
  for a fixed time, gives pieces that a planner chains into a route.
- **Learned movement templates.** A distribution over trajectories is fitted to
  demonstrations, then conditioned on the first part of a new motion.
- **Parameterised skills for language planners.** A small library of learned
  skills, each with a parameter that is optimised for every use, is sequenced
  by a language model and checked for feasibility [arxiv:2303.12153 §3.1].

For the first design, each primitive applies one constant control input for a
fixed duration τ, as in the planner of [arxiv:1709.05401 §3.1]. The end state
follows from the system's closed-form solution, so no numerical integration is
needed at search time.

Every control in a finite set, applied from every reachable state, gives a
graph. Search then finds a route through it [arxiv:1709.05401 §3.2] [arxiv:1709.05401 §3.3].
The common invariant is that the primitives are the only moves the planner
makes, so any route it returns is a chain of feasible pieces. The paper's
claim that the planned trajectory is dynamically feasible rests on this
construction, with each edge checked against the bounds [arxiv:1709.05401 §3.5].

The learned design does not enumerate moves. It fits a Gaussian over the
weights of a basis-function trajectory model, and it updates that Gaussian
with the operator's observed motion [arxiv:2411.01014 §2.1] [arxiv:2411.01014 §2.4].
The paper does not state a feasibility argument for the conditioned trajectory.
Its tracking controller is described only in structure, with no gains or limits
[arxiv:2411.01014 §2.8].

Three papers with a card cover this concept so far: [Liu et al., 2017](/papers/1709.05401)
for the lattice, [Penco et al., 2024](/papers/2411.01014) for the learned
design, and [Lin et al., 2023](/papers/2303.12153) for the skill-based planner.
They share the name, not the method, so compare variants only within one
design.

## Variants

### Constant-input lattice with an LQMT heuristic

The control set is a lattice of M = (2μ+1)³ constant inputs, with spacing
u_max / μ per axis [arxiv:1709.05401 §3.1]. Figure 6 shows 9 primitives in 2-D and
27 in 3-D, which implies μ = 1; the paper does not state μ in the text
[arxiv:1709.05401 fig. 6].
Each primitive has the cost (‖u‖² + ρ)τ [arxiv:1709.05401 §3.1].

Edges are kept only if the primitive's geometric path is collision-free and
its derivatives stay within bounds. The checks use closed-form extrema, and
positions are checked at sampled times on an occupancy grid
[arxiv:1709.05401 §3.5].

The A* heuristic is either a minimum-time bound or the optimal cost of the
linear quadratic minimum-time (LQMT) problem with the constraints dropped
[arxiv:1709.05401 §3.4.1] [arxiv:1709.05401 §3.4.2]. The paper reports that the
LQMT heuristic expands fewer nodes on one query [arxiv:1709.05401 fig. 5].
Its closed forms are given for velocity and acceleration control only
[arxiv:1709.05401 §3.4.2].

The paper refines the lattice route afterwards with a QP that minimises the
integral of the squared n-th derivative [arxiv:1709.05401 §4]. Refinement is
a separate step, and the paper says the result may be unsafe or infeasible
[arxiv:1709.05401 §4].

### Learned probabilistic primitives with conditioning and affordance blending

A probabilistic movement primitive (ProMP) writes a trajectory as a linear
basis-function model with weights w, and the weights are Gaussian
[arxiv:2411.01014 §2.1] [arxiv:2411.01014 eq. 1]. Each demonstration gets its
own weight vector by ridge regression, and the mean and covariance of the
weights are the sample statistics over the demonstrations
[arxiv:2411.01014 §2.2] [arxiv:2411.01014 eq. 2] [arxiv:2411.01014 eq. 3].
The paper's demonstrations were recorded in simulation, fewer than 30 in
general [arxiv:2411.01014 §2]. Each ProMP models one body part, and it is
learned in the object's frame [arxiv:2411.01014 §2.2].

Recognition picks the learned ProMP whose mean is closest to the first
observed samples, using a sum of norms over a window that the paper sets to
about a quarter or a third of the motion [arxiv:2411.01014 §2.3]
[arxiv:2411.01014 eq. 4]. Conditioning then applies Bayes' rule to the weight
distribution, using the observed target and its noise [arxiv:2411.01014 §2.4]
[arxiv:2411.01014 eq. 5] [arxiv:2411.01014 eq. 8]. The paper says this is what
adapts the motion to the operator's own way of doing the task
[arxiv:2411.01014 §2.4].

Where an affordance exists, the conditioned output is blended into the first
sample of the affordance trajectory with a logistic weight that rises from 0 to
1 [arxiv:2411.01014 §2.7] [arxiv:2411.01014 eq. 9] [arxiv:2411.01014 eq. 10].
The paper gives no values for the blending coefficients [arxiv:2411.01014 §2.7].
Object poses come from ArUco markers, which the authors describe as a temporary
solution [arxiv:2411.01014 §2.5].

### Parameterised skills checked inside an LLM planner

Here a primitive is one parameterised action, not a timed trajectory piece. The
skill library has four skills: Pick, Place, Pull and Push. Each has a policy, a
parameterised primitive whose parameters are grasp or placement poses, or the
start, direction and distance of a pull or push, and an ensemble of Q-functions
and a dynamics model [arxiv:2303.12153 §3.1] [app. A.1].

A language model proposes skill sequences [arxiv:2303.12153 §4.2] [arxiv:2303.12153 §4.3].
Each candidate is then optimised for its parameters with geometric feasibility
planning, which picks parameters that maximise the expected product of step
reward probabilities over predicted states [arxiv:2303.12153 §3.3]
[arxiv:2303.12153 eq. 4]. The candidate's feasibility is scored with the
Q-value at its optimised parameter [arxiv:2303.12153 eq. 12]. A candidate is
rejected when the variance of its Q-ensemble is at or above a per-skill
threshold [arxiv:2303.12153 §4.5] [arxiv:2303.12153 eq. 13].

The paper's planner alternates between two modes. Shooting asks for whole
sequences in one query, and greedy search adds one skill per step
[arxiv:2303.12153 §4.4] [arxiv:2303.12153 alg. 3]. A plan ends when a goal that
the language model predicted holds in a predicted state [arxiv:2303.12153 §4.1]
[arxiv:2303.12153 eq. 6]. The paper uses K = 5 candidates per query
[arxiv:2303.12153 app. A.3]. The [Lin et al. card](/papers/2303.12153) has the
paper's own pseudocode.

## When to use which

The designs answer different questions, so the rows below are chosen by
constraint. Where the table gives numbers, they come from the card cited.

| Situation | Use | Why |
|---|---|---|
| Vehicle has a dynamics model that is a chain of integrators, and you need constraints on the state and input | Lattice primitives with a closed-form solution | The paper builds its primitives on this model, with position and its derivatives as the state [arxiv:1709.05401 §2] [arxiv:1709.05401 eq. 2] |
| You need a good heuristic for search, and velocity or acceleration control is enough | LQMT heuristic h2 | On one start state it expanded 376 nodes, against 2707 for Dijkstra and 1282 for the minimum-time bound [arxiv:1709.05401 fig. 5] |
| You need re-planning while moving, with jerk control in 3-D | Expect a slower planner | Author-reported mean planning time is 2.98 s for 3-D jerk control, against 0.094 s for 3-D acceleration control [arxiv:1709.05401 tab. 1] |
| You need a route that is smooth and ready to fly | Add a refinement step and check the result yourself | The paper's refinement can be unsafe or infeasible, and no safety check is described [arxiv:1709.05401 §4] |
| No closed form exists for your control order | Use the minimum-time heuristic or another bound | The paper gives closed forms only for velocity and acceleration control [arxiv:1709.05401 §3.4.2] |
| You have a few demonstrations of a task and must adapt to a partly observed motion | Learned ProMP with conditioning | The paper learns from fewer than 30 simulated demonstrations [arxiv:2411.01014 §2]. Conditioning on about a third of a punch gave 2.35 cm RMS left-hand error [arxiv:2411.01014 tab. 1] |
| The task has a physical affordance, such as a door handle, to be grasped | Blend the ProMP into the affordance at the grasp | In an eight-person door study, completion was 100% with assistance and 58–75% without [arxiv:2411.01014 tab. 2] |
| The operator's speed changes during live input | Plan for a separate speed-adaptation step | The learned design cannot respond to speed changes, and the paper names Interaction Primitives as a remedy [arxiv:2411.01014 §5] |
| You need a checked, feasible trajectory | Add your own check for either design | The lattice refinement may be infeasible [arxiv:1709.05401 §4]. The learned design's controller is not specified numerically [arxiv:2411.01014 §2.8] |
| A language model must sequence actions over a library of learned skills, and some actions may be geometrically infeasible | Parameterised skills with a feasibility planner and Q-ensemble rejection | On six simulated tabletop tasks with 10 seeds each, the author-reported success rate is 82%, against 13% for prior language planners [arxiv:2303.12153 §1] [arxiv:2303.12153 §5.5] |
| Plans are long, or the scene hides a needed step, such as a hook | Use the hybrid of shooting and greedy steps, not shooting alone | Shooting succeeded in 0% of runs on the two partial-perception tasks 5 and 6, and the combined planner accounts for 86% to 100% of successful plans on tasks 4 to 6 [arxiv:2303.12153 §6.2] [arxiv:2303.12153 tab. 1] |
| You plan to use a hosted language model whose version you cannot pin | Expect to re-tune the prompts and the rejection thresholds | The paper's models have no snapshot dates, and its rejection thresholds are fixed per skill and calibrated to its own ensemble [arxiv:2303.12153 §5.2] [arxiv:2303.12153 app. A.2] |

The timing figures are author-reported. They use the paper's own hardware and
code, which the paper does not fully specify [arxiv:1709.05401 tab. 1].
Re-planning in the paper ran at 3 Hz in simulation with a 3 m/s speed limit
[arxiv:1709.05401 §5.3].

The learned design's evidence is also small. Its feasibility study has eight
participants, and no significance tests are reported [arxiv:2411.01014 §4.2].
Its punching evaluation used ten test trajectories and compared against no
baseline [arxiv:2411.01014 §4.1].

## Implementation sketch

Language-agnostic outline of the lattice successor step, its heuristic hook,
and the learned design's conditioning step. The paper pseudocode is in
[arxiv:1709.05401 alg. 1] and [arxiv:2411.01014 §2.4]; the sketch below is our
own wording.

```pseudocode
# Build the outgoing edges of one state from a finite set of controls
# Input:  state (position and derivatives), controls (M values), tau, rho
# Output: successor states and their edge costs

def successors(state, controls, tau, rho):
    result = []
    for u in controls:
        # Reject the primitive if its path leaves free space or breaks a bound
        # [arxiv:1709.05401 §3.5]
        if not primitive_is_valid(state, u, tau):
            continue
        # End state of the constant-input piece  [arxiv:1709.05401 §3.1]
        next_state = propagate(state, u, tau)
        # Cost of applying u for tau  [arxiv:1709.05401 §3.1]
        cost = (dot(u, u) + rho) * tau
        result.append((next_state, cost))
    return result
```

```pseudocode
# Heuristic hook for A*: a lower bound on the cost-to-go
# Input:  state, goal, rho
# Output: admissible estimate

def heuristic(state, goal, rho):
    # Minimum-time bound from the position gap  [arxiv:1709.05401 §3.4.1]
    # A tighter LQMT bound from the same state is in [arxiv:1709.05401 §3.4.2]
    return rho * linf_distance(state.position, goal.position) / v_max
```

```pseudocode
# Condition a learned ProMP on observed samples  [arxiv:2411.01014 §2.4]
# Input:  mu_w, sigma_w of the chosen ProMP; phi_obs (basis at observed times);
#         y_obs (observed targets); sigma_obs (observation noise)
# Output: posterior mean and covariance of the weights

def condition(mu_w, sigma_w, phi_obs, y_obs, sigma_obs):
    # Gain: how strongly each observation moves the weights  [arxiv:2411.01014 eq. 8]
    # Shapes follow the paper's notation, which is not consistent; see Contradictions
    gain = sigma_w @ phi_obs @ inverse(sigma_obs
                                       + phi_obs.T @ sigma_w @ phi_obs)
    # Shift the mean by the prediction error  [arxiv:2411.01014 eq. 6]
    mu_post = mu_w + gain @ (y_obs - phi_obs.T @ mu_w)
    # Shrink the covariance by the same gain  [arxiv:2411.01014 eq. 7]
    sigma_post = sigma_w - gain @ phi_obs.T @ sigma_w
    return mu_post, sigma_post
```

## Contradictions

Between papers, none known: the three cards use the term for different objects.
Within and between the paper and its code, these disagree:

- **Task labels in the skill-based paper.** The Figure 4 caption, the appendix
  table and the results text assign different property labels to tasks 3 to 6
  [arxiv:2303.12153 fig. 4] [arxiv:2303.12153 app. B] [arxiv:2303.12153 §6.2].
  Check any per-task comparison against the figure.
- **Partial-perception share in the skill-based paper.** The text says over 90%
  of solutions to those tasks combine both planners [arxiv:2303.12153 §6.3].
  The table gives 86% for task 4 [arxiv:2303.12153 tab. 1].
- **Usefulness score in the skill-based paper.** Equations 9 and 10 define a
  probability, the text describes a sum of token log-probabilities
  [arxiv:2303.12153 §4.3], and the appendix describes a softmax log-probability
  damped by β = 0.3, without the damping formula [arxiv:2303.12153 app. A.3].
- **Algorithm return in the skill-based paper.** The hybrid loop returns the
  shooting result without the greedy prefix, so the plan it returns is not
  joined to the steps before it [arxiv:2303.12153 alg. 3].
- **Heuristic in code.** The paper presents the LQMT heuristic h2 as the tighter
  bound and uses it to speed up search [arxiv:1709.05401 §5.1]. The code's
  default ignores the dynamics, so the default heuristic is the minimum-time
  bound h1 [code: include/mpl_planner/common/env_base.h#L368].
- **Eq. 12 sign.** The condition on the sample count is printed with ≥, while the
  text needs the spacing to be at most R [arxiv:1709.05401 eq. 12]
  [arxiv:1709.05401 §3.5]. The code uses the ≤ reading
  [code: include/mpl_planner/env/env_map.h#L95-L98]. Read the printed condition
  with that in mind.
- **Blending function.** The text requires the blend weight to be 0 at the start
  and 1 at the end [arxiv:2411.01014 §2.7], but the logistic form in eq. 10 has
  range (0, 1) for finite coefficients [arxiv:2411.01014 eq. 10]. The paper
  gives no coefficient values to resolve this.
- **Transposes.** The basis matrix appears with different transposes in eq. 1,
  eq. 4 and eq. 6 [arxiv:2411.01014 eq. 1] [arxiv:2411.01014 eq. 4]
  [arxiv:2411.01014 eq. 6]. Check the shapes before implementing.

## Papers

- [Liu et al., 2017](/papers/1709.05401): plans quadrotor trajectories by A* over a lattice of constant-input primitives, with a closed-form LQMT heuristic.
- [Penco et al., 2024](/papers/2411.01014): conditions learned ProMPs on the operator's first motion and blends them into affordance templates for humanoid teleoperation.
- [Lin et al., 2023](/papers/2303.12153): an LLM proposes skill sequences over learned Pick, Place, Pull and Push skills, each checked by geometric feasibility planning and Q-ensemble rejection, with a hybrid of whole-plan and step-wise search.
