Chapter 18: Introductory Autonomy Concepts (Survey Only)
Lesson 3: Task-Level Planning Idea (no algorithms)
This lesson introduces task-level planning as a formal bridge between high-level mission specifications (e.g., “tidy the lab”) and low-level controllers (e.g., joint torques or wheel speeds). We develop mathematical models of tasks, trajectories, and hierarchical decompositions, but we deliberately avoid concrete planning algorithms, which belong to advanced courses.
1. From Control to Task-Level Planning
In earlier control courses you studied how to design feedback laws to stabilize or track a reference for a given dynamical system. Abstractly, a robot’s (discrete-time) dynamics can be written as
\[ x_{k+1} = f(x_k, u_k), \quad x_k \in \mathcal{X},\; u_k \in \mathcal{U},\; k = 0,1,\dots \]
Here \( \mathcal{X} \) is the state space (including pose, velocities, and possibly discrete modes like “gripper open/closed”), and \( \mathcal{U} \) is the space of admissible control inputs.
A trajectory over a finite horizon \(T\) is
\[ \mathbf{x}_{0:T} = (x_0, x_1, \dots, x_T), \qquad \mathbf{u}_{0:T-1} = (u_0, u_1, \dots, u_{T-1}), \]
such that the dynamics constraint \(x_{k+1} = f(x_k, u_k)\) is satisfied for all \(k = 0,\dots,T-1\).
From the perspective of autonomy, a task encodes which trajectories are acceptable. A minimal abstract definition is:
\[ \mathcal{T} \subseteq \mathcal{X}^{T+1} \times \mathcal{U}^{T}, \]
where \( \mathcal{T} \) is the set of all state–input trajectories that “complete the task correctly” (e.g., cleaned the room, no collisions).
Task-level planning is the problem of choosing, at a high level, which sequences of actions or skills should be executed so that the resulting closed-loop trajectory lies in \( \mathcal{T} \). The planner does not directly manipulate individual joint torques; it reasons over abstractions (rooms, objects, subgoals) that sit above the control layer.
2. Task Specifications as Constraints on Trajectories
To speak precisely about tasks, we impose constraints on trajectories. A simple and very common structure is:
\[ \mathcal{T} = \left\{ (\mathbf{x}_{0:T}, \mathbf{u}_{0:T-1}) \;\middle|\; \begin{array}{l} x_{k+1} = f(x_k, u_k), \; k = 0,\dots,T-1,\\[0.2em] g_i(x_k, u_k) \leq 0,\; i = 1,\dots,m,\; k = 0,\dots,T-1,\\[0.2em] h_j(\mathbf{x}_{0:T}) = 0,\; j = 1,\dots,p \end{array} \right\}. \]
The inequalities \(g_i \leq 0\) can encode state and input constraints such as joint limits, obstacle avoidance, or actuator saturation. The equalities \(h_j = 0\) can express endpoint conditions such as “end at a docking station” or “the total rotated angle is prescribed”.
From a task-level perspective it is often useful to reason in terms of logical propositions about the state. Let \(AP\) be a finite set of atomic propositions describing high-level facts, e.g., “in office”, “carrying object”, “charging”. We define a labeling function
\[ L : \mathcal{X} \to 2^{AP}, \]
which maps each state to the set of atomic propositions that are true in that state. A trajectory \( \mathbf{x}_{0:T} \) thereby induces a word over \(2^{AP}\):
\[ \mathbf{w}_{0:T} = \big(L(x_0), L(x_1), \dots, L(x_T)\big). \]
A high-level task can then be specified as a set \( \mathcal{W} \subseteq (2^{AP})^{T+1} \) of words that are acceptable. For instance:
- Reach-and-avoid: “Eventually reach the charging dock and never collide with an obstacle” can be expressed informally as: eventually “atDock” is in \(L(x_k)\) and “collision” is never in \(L(x_k)\) for all \(k\).
- Sequencing: “Visit room A, then room B, then room C” can be encoded as a requirement on the order in which propositions “inA”, “inB”, “inC” first appear along the word.
More formally, in temporal-logic-based approaches one introduces a specification language \( \Phi \) and a satisfaction relation \( \models \) between words and specifications:
\[ \mathbf{w}_{0:T} \models \varphi \quad\Longleftrightarrow\quad \text{the word } \mathbf{w}_{0:T} \text{ satisfies the formula } \varphi \in \Phi. \]
In this view, a task is the set of trajectories whose induced words satisfy the specification:
\[ \mathcal{T}_\varphi = \left\{ (\mathbf{x}_{0:T}, \mathbf{u}_{0:T-1}) \;\middle|\; \mathbf{w}_{0:T} = L(\mathbf{x}_{0:T}),\; \mathbf{w}_{0:T} \models \varphi \right\}. \]
Task-level planning then asks: Which sequences of high-level choices (skills, modes, subgoals) will produce trajectories in \( \mathcal{T}_\varphi \)? We will not design concrete algorithms for this in this course, but the formal view guides all later methods.
3. Skills, Modes, and Sequential Composition
In robotics practice, one rarely plans every control input at task level. Instead, we define skills (also called behaviors or modes) such as “go to waypoint”, “pick object”, or “dock”. Mathematically, a skill can be understood as a closed-loop controller together with an expected duration and pre/postconditions.
Let \( \Sigma = \{\sigma_1,\dots,\sigma_M\} \) be a finite set of skills. Each skill \( \sigma \in \Sigma \) is associated with:
- a controller \( \kappa_\sigma : \mathcal{X} \to \mathcal{U} \),
- a precondition set \( \text{Pre}(\sigma) \subseteq \mathcal{X} \),
- a postcondition set \( \text{Post}(\sigma) \subseteq \mathcal{X} \).
Intuitively, if the robot starts in a state \(x \in \text{Pre}(\sigma)\) and executes the controller \( \kappa_\sigma \) for a suitable amount of time, it should end in \( \text{Post}(\sigma) \), while respecting safety constraints. We can model the set of possible trajectories produced by skill \( \sigma \) as
\[ \mathcal{S}(\sigma) \subseteq \bigcup_{T \geq 1} \mathcal{X}^{T+1}. \]
A skill-level plan of length \(K\) is a word \( \pi = (\sigma_{i_1}, \dots, \sigma_{i_K}) \in \Sigma^K \). Executing this plan corresponds to concatenating the trajectories from each skill:
\[ \mathcal{S}(\pi) := \mathcal{S}(\sigma_{i_1}) \circ \mathcal{S}(\sigma_{i_2}) \circ \dots \circ \mathcal{S}(\sigma_{i_K}), \]
where \( \circ \) denotes concatenation of finite trajectories sharing matching boundary conditions.
For this sequential composition to be well-defined and physically realizable, we require compatibility conditions:
\[ \text{Post}(\sigma_{i_\ell}) \subseteq \text{Pre}(\sigma_{i_{\ell+1}}), \quad \ell = 1,\dots,K-1. \]
A central conceptual result is that, under suitable correctness assumptions on individual skills, these compatibility conditions guarantee correctness of the composed plan. A simple version is given below.
Theorem (Sequential composition for safety tasks).
Suppose there exists a safe set \(S_{\text{safe}} \subseteq \mathcal{X}\) such that for every skill \( \sigma \in \Sigma \):
\[ \text{Pre}(\sigma) \subseteq S_{\text{safe}},\quad \text{Post}(\sigma) \subseteq S_{\text{safe}}, \]
and every trajectory in \( \mathcal{S}(\sigma) \) remains in \(S_{\text{safe}}\) for all time. If a plan \( \pi = (\sigma_{i_1},\dots,\sigma_{i_K}) \) satisfies the compatibility conditions above and the initial state \(x_0 \in \text{Pre}(\sigma_{i_1})\), then every state along every execution of \( \pi \) remains in \(S_{\text{safe}}\).
Proof (sketch).
By assumption, when executing \( \sigma_{i_1} \) from \( x_0 \in \text{Pre}(\sigma_{i_1}) \subseteq S_{\text{safe}} \), all intermediate states lie in \(S_{\text{safe}}\), and the final state \(x^{(1)}\) lies in \( \text{Post}(\sigma_{i_1}) \subseteq S_{\text{safe}} \). Compatibility gives \( x^{(1)} \in \text{Post}(\sigma_{i_1}) \subseteq \text{Pre}(\sigma_{i_2}) \), so the same reasoning applies inductively to \( \sigma_{i_2} \), and so on through \( \sigma_{i_K} \). Induction on the sequence index completes the argument: all states remain in \(S_{\text{safe}}\).
This theorem illustrates a typical goal of task-level planning: reason about the correctness of complex behaviors using symbolic labels (skills and sets) without inspecting the continuous dynamics in detail at every step.
flowchart TD
R["Global task (e.g., tidy lab)"]
--> D1["Decompose into subtasks (navigate, pick, place)"]
D1 --> SK["Define skills with Pre/Post sets"]
SK --> PL["Compose skills into sequence sigma_i1,...,sigma_iK"]
PL --> CHK["Check compatibility: Post(sigma_i) subset of Pre(sigma_i+1)"]
CHK --> OK["If compatible and skills safe, composed behavior safe"]
4. Abstract Task Models and Symbolic State Spaces
As tasks become more complex, it is convenient to work with an abstract state space that summarizes only the high-level information relevant to the task. Let \( \mathcal{Q} = \{q_1,\dots,q_N\} \) be a finite set of abstract states, sometimes called locations or modes.
An abstraction is a surjective mapping
\[ \alpha : \mathcal{X} \to \mathcal{Q}, \]
which partitions the continuous state space into regions \(A_q := \alpha^{-1}(q)\), \(q \in \mathcal{Q}\). For example, a mobile robot environment might be partitioned into offices, corridors, and doorways.
On \( \mathcal{Q} \) we define an abstract transition relation
\[ \Delta \subseteq \mathcal{Q} \times \mathcal{Q}, \]
where \( (q,q') \in \Delta \) means that there exists at least one feasible low-level closed-loop behavior that drives the system from some state in region \(A_q\) to some state in region \(A_{q'}\) while obeying safety constraints. Formally, we can define
\[ (q,q') \in \Delta \quad\Longleftrightarrow\quad \exists T \geq 1,\; \exists (\mathbf{x}_{0:T},\mathbf{u}_{0:T-1})\in\mathcal{T} \text{ such that } x_0 \in A_q,\; x_T \in A_{q'}. \]
The triple \( \mathcal{M} = (\mathcal{Q}, \Delta, L_{\text{abs}}) \), together with an abstract labeling function \( L_{\text{abs}} : \mathcal{Q} \to 2^{AP} \), is often called an abstract task model or a symbolic model of the robot.
Once such a model is built, task-level planning conceptually reduces to reasoning over paths \(q_0,q_1,\dots,q_K\) in the directed graph \( (\mathcal{Q},\Delta) \) that satisfy the specification. The mapping \( \alpha \) then tells us which regions of the continuous state space each abstract step refers to, and skills implement the concrete motions between regions.
It is important to notice that this whole construction is independent of any particular algorithm for finding the path: we only need the notion of a graph \( (\mathcal{Q},\Delta) \) and the semantics of labels on its nodes.
flowchart TD
X["Continuous states X"]
--> P["Partition into regions A_q via alpha(x)"]
P --> Q["Abstract states Q = {q1,...,qN}"]
Q --> G["Abstract graph (Q,Delta) with labeled nodes"]
G --> TSK["Task spec over labels"]
TSK --> PLAN["Reason over paths q0,...,qK that satisfy spec"]
PLAN --> EXEC["Implement each abstract step using low-level skills"]
5. Task-Level Planning and Control Execution
Task-level planning interacts closely with the control layer. Suppose we have a linear discrete-time model, as encountered in linear control:
\[ x_{k+1} = A x_k + B u_k, \]
and a state-feedback controller
\[ u_k = K (x_k - x^\star), \]
which stabilizes the system at the target state \(x^\star\). For different values of \(x^\star\) (e.g., different waypoints in a building), we obtain different tracking skills. Task-level planning decides which target \(x^\star\) to track next, and when to switch from one target to another, in order to satisfy the high-level specification.
We can express a simple two-level architecture as follows. Let \( \mathcal{U}_{\text{LL}} \) denote low-level inputs (currents, torques, motor voltages), and \( \mathcal{U}_{\text{TL}} \) denote discrete task-level choices (which skill to invoke, which waypoint to track).
\[ \begin{aligned} x_{k+1} &= f\!\left(x_k, u^{\text{LL}}_k\right),\\ u^{\text{LL}}_k &= \gamma\!\left(x_k, u^{\text{TL}}_k\right), \end{aligned} \]
where \( \gamma \) is the skill implementation map that converts task-level decisions into low-level control signals. Task-level planning therefore operates by choosing a sequence \( u^{\text{TL}}_0, u^{\text{TL}}_1, \dots \) consistent with the specification, while the control layer ensures that the physical robot follows a trajectory close to the one predicted at the task level.
Reasoning about correctness (e.g., safety or liveness) then combines:
- Discrete reasoning on the abstract model \( (\mathcal{Q},\Delta,L_{\text{abs}}) \) and the specification \( \varphi \),
- Continuous reasoning on the dynamics \(x_{k+1} = f(x_k, u_k)\) and the properties of controllers, to validate that abstract transitions are feasible and safe.
This separation of concerns is one of the main ideas behind modern task-level planning for autonomous robotic systems.
6. Problems and Solutions
Problem 1 (Reach-and-avoid as a task set).
Consider a mobile robot moving in a planar workspace with state \(x_k \in
\mathbb{R}^2\). Let \(G \subset \mathbb{R}^2\) be a compact goal region
and \(O \subset \mathbb{R}^2\) an obstacle region. Define formally the set
\( \mathcal{T}_{\text{RA}} \) of all finite-horizon trajectories \(
\mathbf{x}_{0:T} \) that (i) never enter \(O\), and (ii) reach \(G\) at
least once before time \(T\). Assume dynamics feasibility \(x_{k+1} =
f(x_k,u_k)\) is already enforced elsewhere.
Solution.
Condition (i) “never enter \(O\)” means \(x_k \notin O\) for all \(k = 0,\dots,T\). Condition (ii) “reach \(G\) at least once” means there exists an index \(k^\star \in \{0,\dots,T\}\) with \(x_{k^\star} \in G\). Thus the task set is
\[ \mathcal{T}_{\text{RA}} = \left\{ \mathbf{x}_{0:T} \;\middle|\; \begin{array}{l} x_k \notin O,\; k = 0,\dots,T,\\[0.2em] \exists k^\star \in \{0,\dots,T\} \text{ such that } x_{k^\star} \in G \end{array} \right\}. \]
If one wants to include inputs, we can extend to pairs \( (\mathbf{x}_{0:T},\mathbf{u}_{0:T-1}) \) with the same state conditions; dynamics feasibility is then enforced separately.
Problem 2 (Sequential composition and invariance).
Let \(S_{\text{safe}} \subseteq \mathcal{X}\) be a set that is
forward invariant under every skill controller, in the sense that
whenever a trajectory starts in \(S_{\text{safe}}\), it remains in
\(S_{\text{safe}}\) while that skill is active. Assume the compatibility
conditions \( \text{Post}(\sigma_{i_\ell}) \subseteq
\text{Pre}(\sigma_{i_{\ell+1}}) \) of Section 3 hold. Prove more formally
the theorem that the execution of any such compatible plan starting in
\(S_{\text{safe}}\) remains in \(S_{\text{safe}}\) for all time.
Solution.
Let \( \pi = (\sigma_{i_1},\dots,\sigma_{i_K}) \) be a compatible plan and let the initial state \(x_0 \in \text{Pre}(\sigma_{i_1})\). By the assumptions in Section 3, we also have \( \text{Pre}(\sigma_{i_1}) \subseteq S_{\text{safe}} \), so \(x_0 \in S_{\text{safe}}\).
Execute the first skill \( \sigma_{i_1} \) from \(x_0\). By forward invariance of \(S_{\text{safe}}\) under \( \sigma_{i_1} \), every intermediate state lies in \(S_{\text{safe}}\). Let \(x^{(1)}\) denote the final state of this skill; then \(x^{(1)} \in \text{Post}(\sigma_{i_1}) \subseteq S_{\text{safe}}\).
Compatibility gives \( x^{(1)} \in \text{Pre}(\sigma_{i_2}) \), and by the same invariance argument all states during the execution of \( \sigma_{i_2} \) remain in \(S_{\text{safe}}\), and its final state \(x^{(2)}\) is also in \(S_{\text{safe}}\). Continuing this reasoning inductively through \( \sigma_{i_3},\dots,\sigma_{i_K} \), we obtain that every state visited during the entire plan lies in \(S_{\text{safe}}\). Thus the composed behavior is safe.
Problem 3 (Abstract model and feasibility).
Let \( \mathcal{Q} = \{q_1,q_2,q_3\} \) correspond to three rooms A, B, C
in an environment. Suppose that abstract transitions \( \Delta =
\{(q_1,q_2), (q_2,q_3)\} \) are known to be feasible in the sense of
Section 4. We wish to ensure the task “start in A and eventually reach C
while never leaving the union of A, B, C”. Describe:
- A logical specification \( \varphi \) over propositions “inA”, “inB”, “inC”.
- The set of acceptable abstract paths \(q_0,\dots,q_K\) in \( (\mathcal{Q},\Delta) \) assuming the robot starts in A.
Solution.
1. Let atomic propositions be \(AP = \{\text{inA},\text{inB},\text{inC}\}\), with an abstract labeling \(L_{\text{abs}}\) such that \(L_{\text{abs}}(q_1) = \{\text{inA}\}\), \(L_{\text{abs}}(q_2) = \{\text{inB}\}\), \(L_{\text{abs}}(q_3) = \{\text{inC}\}\). The informal requirement is “eventually inC, and always (inA or inB or inC)”. In a temporal logic with operators G (“always”) and F (“eventually”) this can be written as
\[ \varphi = \mathbf{G}(\text{inA} \lor \text{inB} \lor \text{inC}) \;\land\; \mathbf{F}(\text{inC}). \]
2. Since the only edges are \(q_1 \to q_2\) and \(q_2 \to q_3\), any path starting in \(q_1\) and staying within \( \{q_1,q_2,q_3\} \) that reaches \(q_3\) at least once will satisfy the specification. The shortest such path is \( (q_1,q_2,q_3) \). Longer paths may linger in \(q_1\) or \(q_2\) before moving onward, for example \( (q_1,q_1,q_2,q_2,q_3,q_3) \), as long as the edge constraints are respected and \(q_3\) appears at least once.
Problem 4 (Abstraction map and refinement).
Let \( \alpha : \mathcal{X} \to \mathcal{Q} \) be an abstraction map and
suppose that for each abstract transition \( (q,q') \in \Delta \) we have
designed a skill \( \sigma_{q,q'} \) that moves the robot from some state
in \(A_q\) to some state in \(A_{q'}\) while staying in a safe set
\(S_{\text{safe}}\). Show that if the task-level planner constructs an
abstract path \(q_0,\dots,q_K\) that satisfies a safety specification
expressed only in terms of \(L_{\text{abs}}\), then there exists a
corresponding concrete skill sequence whose execution remains in
\(S_{\text{safe}}\) (assuming the skills are correct).
Solution.
Let the abstract path be \(q_0,\dots,q_K\) with \( (q_k,q_{k+1}) \in \Delta \) for all \(k = 0,\dots,K-1\). For each edge \( (q_k,q_{k+1}) \) we have a skill \( \sigma_{q_k,q_{k+1}} \) that moves the robot from region \(A_{q_k}\) to region \(A_{q_{k+1}}\). By assumption, each such skill keeps the state in \(S_{\text{safe}}\).
Choose an initial state \(x_0 \in A_{q_0} \cap S_{\text{safe}}\). Executing \( \sigma_{q_0,q_1} \) from \(x_0\) yields a trajectory that stays in \(S_{\text{safe}}\) and ends in some \(x_1 \in A_{q_1} \cap S_{\text{safe}}\). Repeating this reasoning edge-by-edge gives a concatenated continuous trajectory that remains in \(S_{\text{safe}}\) and whose abstract image under \( \alpha \) follows the path \(q_0,\dots,q_K\). Since the safety specification depends only on \(L_{\text{abs}}\) and is satisfied by the abstract path, it is also satisfied by the continuous trajectory, under the assumption that \(L_{\text{abs}}(q)\) correctly summarizes the safety-relevant information of all states in \(A_q\).
Problem 5 (Hierarchical plan length bounds).
Suppose a global task is decomposed into \(K\) subtasks, each realized by
a skill sequence of maximum length \(L\). Give an upper bound on the
length (number of skills) of a fully flattened, non-hierarchical plan that
realizes the task. Discuss why, from a reasoning perspective, maintaining
the hierarchy is beneficial.
Solution.
In the worst case, each of the \(K\) subtasks uses a distinct skill sequence of length exactly \(L\). Flattening the hierarchy into a single sequence yields at most \(K L\) skills. Thus an upper bound on the total plan length is
\[ N_{\text{skills}} \leq K L. \]
From a reasoning perspective, keeping the decomposition organized into \(K\) subtasks allows us to prove properties locally and re-use them. For example, if each subtask is proven safe and the sequential composition conditions are satisfied (Section 3), then the whole plan is safe without re-proving safety for all \(K L\) individual skill invocations. This is conceptually similar to compositional design in control theory, where one proves stability of subsystems and then of their interconnection.
7. Summary
In this lesson we formalized the concept of task-level planning as reasoning over sets of acceptable trajectories and their symbolic abstractions. We introduced:
- Task sets \( \mathcal{T} \subseteq \mathcal{X}^{T+1} \times \mathcal{U}^T \) defined by constraints and logical specifications.
- Skills with pre/postconditions and the notion of sequential composition, together with a simple safety theorem.
- Symbolic abstractions \( (\mathcal{Q},\Delta,L_{\text{abs}}) \) that capture high-level robot behavior as paths in a labeled graph.
- The conceptual interface between task-level decisions and low-level control, without specifying particular planning algorithms.
These ideas provide the conceptual foundation for more advanced topics such as graph-based planners, temporal-logic motion planning, and learning-based task synthesis, which will appear in later courses.
8. References
- Lozano-Pérez, T. (1983). Spatial planning: A configuration space approach. IEEE Transactions on Computers, 32(2), 108–120.
- Latombe, J.-C. (1991). Robot Motion Planning. Kluwer Academic Publishers.
- Burridge, R. R., Rizzi, A. A., & Koditschek, D. E. (1999). Sequential composition of dynamically dexterous robot behaviors. International Journal of Robotics Research, 18(6), 534–555.
- Kress-Gazit, H., Fainekos, G. E., & Pappas, G. J. (2009). Temporal-logic-based reactive mission and motion planning. IEEE Transactions on Robotics, 25(6), 1370–1381.
- Tabuada, P. (2009). Verification and Control of Hybrid Systems: A Symbolic Approach. Springer.
- Baier, C., & Katoen, J.-P. (2008). Principles of Model Checking. MIT Press. (Chapters on temporal logics and labeled transition systems.)
- Nilsson, N. J. (1994). Teleo-reactive programs for agent control. Journal of Artificial Intelligence Research, 1, 139–158.
- Fainekos, G. E., & Pappas, G. J. (2009). Robustness of temporal logic specifications. International Journal of Robotics Research, 28(8), 979–994.