$ show PlanSys2/ros2_planning_system
PlanSys2 is a ROS2-based PDDL planning and execution framework for robotics. It provides a complete stack: domain and problem experts for managing PDDL knowledge, a planner node that delegates to multiple solver plugins (POPF, Kairos), and an executor that converts plans into behavior trees for action execution. The system supports temporal planning, numeric fluents, derived predicates, PDDL3 constraints, and PDDL+ dynamics (processes/events). All core components are ROS2 lifecycle nodes with service-based APIs, and the framework includes a terminal interface, a TUI/CLI, and rqt plugins for monitoring. The architecture is modular with plugin-based solvers and BT builders, enabling extensibility. The codebase is well-tested with extensive unit and integration tests, and it supports multiple ROS2 distributions (Humble, Jazzy, Rolling). While primarily an application, it has research-grade features and a comprehensive PDDL test bank.
The LLM identified 5 files worth highlighting for reuse:
Core PDDL domain parser that converts PDDL text into an internal tree representation. Supports a wide range of PDDL requirements (strips, typing, numeric-fluents, durative-actions, derived-predicates, constraints, etc.). The parser is standalone and can be reused in any PDDL-based project. It demonstrates careful handling of PDDL syntax, type hierarchies, and expression trees.
Generic, robust ROS2 service call wrapper with retry, timeout, active-component awareness, and guarded callbacks. Encapsulates the common pattern of waiting for a lifecycle node to be active before calling a service, and handles lost answers gracefully. This is a reusable pattern for any ROS2 application that needs reliable service communication.
Generic directed graph for dependency resolution with Tarjan's strongly connected components (SCC) algorithm, depth-first traversal, subgraph extraction, and DOT export. Used for derived predicate stratification but applicable to any dependency analysis problem. Demonstrates clean graph abstraction and algorithm implementation.
Abstract base class for planner plugins. Provides a common interface for plan generation with process management (fork/exec), timeout, cancellation, and result parsing. The plugin architecture allows swapping planners (POPF, Kairos) without changing the rest of the system. This pattern is reusable for any system that needs to integrate multiple external solvers.
Abstract builder for converting a PDDL plan into a behavior tree XML string. Concrete implementations (SimpleBTBuilder, STNBTBuilder) handle different execution strategies (parallelism detection, temporal constraint propagation). The builder pattern decouples plan representation from execution logic, making it easy to add new execution strategies.