Pause, Resume and Cancel in Robot Task Trees

A plain-language guide to pausing, resuming and cancelling robot tasks with a behavior tree and ROS 2 actions, including internal versus external pause and background trees.

In this article

  • The problem: tasks are long, and the world interrupts them
  • Where the tree sits in the system
  • Cancel: the easy one
  • Pause and resume: the part actions do not give you
  • Two kinds of pause: internal and external
  • Two trees: one for tasks, one for the machine
  • One hardware-state topic keeps things simple
  • Letting the tree XML do the small logic
  • Why a behavior tree rather than a state machine here
  • Trade-offs
  • Checklist