Home

Awesome

pddlstream

PDDLStream is a planning framework comprised of an action language and suite of algorithms for Artificial Intelligence (AI) planning in the presence of sampling procedures. PDDLStream extends Planning Domain Definition Language (PDDL) by introducing streams, declarative specifications of sampling procedures. PDDLStream algorithms are domain independent and solve PDDLStream problems with only a blackbox description of each sampler. The motivating application of PDDLStream was for general-purpose robot Task and Motion Planning (TAMP).

The default pddlstream branch (main) is the newest stable "release" of pddlstream. The downward pddlstream branch is the most recent and advanced version of pddlstream but also is somewhat experimental.

<!--https://www.markdownguide.org/basic-syntax/--> <!--https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet-->

Publications

<!--* [STRIPStream: Planning In Infinite Domains](https://arxiv.org/abs/1701.00287)-->

Citation

Caelan R. Garrett, Tomás Lozano-Pérez, Leslie P. Kaelbling. PDDLStream: Integrating Symbolic Planners and Blackbox Samplers via Optimistic Adaptive Planning, International Conference on Automated Planning and Scheduling (ICAPS), 2020.

Contact

Caelan Garrett: [username]@csail.mit.edu

History

PDDLStream is the "third version" of the PDDLStream/STRIPStream planning framework, intended to supersede previous versions:

  1. https://github.com/caelan/stripstream
  2. https://github.com/caelan/ss

PDDLStream makes several representational and algorithmic improvements over these versions. Most notably, it adheres to PDDL conventions and syntax whenever possible and contains several new algorithms.

<!--An implementation of STRIPStream that uses PDDL for the specifiation of actions and streams.--> <!--https://github.com/caelan/pddlstream/compare/master...stable-->

Installation

<!--$ git clone --recursive --branch main https://github.com/caelan/pddlstream.git-->
$ git clone --recursive --branch main git@github.com:caelan/pddlstream.git
$ cd pddlstream
pddlstream$ git submodule update --init --recursive
pddlstream$ ./downward/build.py
<!--``` $ git clone --recursive https://github.com/caelan/pddlstream.git If building fails, install FastDownward's dependencies using your package manager: * APT (Linux): `$ sudo apt-get install cmake g++ g++-multilib make python` <!--* Homebrew (OS X): TBD * MacPorts (OS X): TBD * N/A (Windows): install each dependency manually-->

If necessary, see FastDownward's documentation for more detailed installation instructions.

<!--My FastDownward "fork" is several years old. If you have trouble compiling FastDownward on a newer machine, try installing the experimental [downward](https://github.com/caelan/pddlstream/tree/downward) PDDLStream branch.-->

PDDLStream actively supports python2.7 as well as the most recent version of python3.

<!--(many robotics applications still require python2.7)-->

Make sure to recursively update pddlstream's submodules when pulling new commits.

pddlstream$ git pull --recurse-submodules

Examples

This repository contains several robotic and non-robotic PDDLStream example domains.

PyBullet

Install PyBullet on OS X or Linux using:

$ pip install pybullet numpy scipy

Examples:

<!--* Turtlebot NAMO: `pddlstream$ python -m examples.pybullet.namo.run`--> <!-- * Turtlebot Multi-Robot: `pddlstream$ python -m examples.pybullet.turtlebots.run` Requires Temporal FastDownward - https://github.com/caelan/TemporalFastDownward --> <!--[![Kuka IIWA](https://img.youtube.com/vi/3HJrkgIGK7c/0.jpg)](https://www.youtube.com/watch?v=3HJrkgIGK7c)-->

<img src="https://img.youtube.com/vi/Uc0fogLsPMI/0.jpg" height="200"><img src="https://img.youtube.com/vi/HVD8SpmguYs/0.jpg" height="200"><img src="https://img.youtube.com/vi/oWr6m12nXcM/0.jpg" height="200"> <img src="images/pybullet_belief.png" height="150"><img src="https://img.youtube.com/vi/XcxsU0VuRUI/0.jpg" height="200"><img src="https://img.youtube.com/vi/3HJrkgIGK7c/0.jpg" height="200">

See https://github.com/caelan/pybullet-planning for more information about my PyBullet planning primitives library.

Python TKinter

Install numpy and Python TKinter on Linux using:

$ sudo apt-get install python-tk
$ pip install numpy

Examples:

<img src="images/discrete_tamp.png" height="100"><img src="images/continuous_tamp.png" height="100"><img src="images/motion.png" height="100">

Pure Python

Simple examples that can be run without additional dependencies:

<!--* Discrete Belief: `pddlstream$ python -m examples.table_obs.run` * Discrete Belief Space: `pddlstream$ python -m examples.discrete_belief.run` `$ pip install numpy scipy`-->

Advanced Functionality

Test cases or advanced (and undocumented) functionality:

International Planning Competition (IPC)

Unmodified PDDL IPC examples solved using PDDLStream's modified translator:

Applications

External projects that make use of PDDLStream:

<!--https://github.com/rachelholladay/ftamp-->

Algorithms

PDDLStream is a planning framework comprised of a single planning language but multiple planning algorithms. Some of the algorithms are radically different than others (e.g. Incremental vs Focused) and thus the planning time can also substantially vary. The Adaptive algorithm typically performs best for domains with many possible sampling pathways, such as robot manipulation domains.

<!--For domains with few sampling pathways, the **Incremental** algorithm typically performs best (link to specific examples)-->

The meta procedure solve(...) allows the user to toggle between avaliable algorithms using the keyword argument algorithm={}.

Property descriptions:

<!--* **Subroutine**: TBD--> <!--* **Semantic attachments (SA)**: TBD-->

Adaptive

<!--* **Semantic attachments (SA)**: TBD-->

Binding

<!--* **Semantic attachments (SA)**: TBD-->

Focused

<!--* **Semantic attachments (SA)**: TBD-->

Incremental

<!--* **Semantic attachments (SA)**: TBD-->

Search Subroutines

Many (but not all) pddlstream algorithms have a discrete planning phase that can be implemented using any finite state-space search algorithm, such as Breadth-First Search (BFS) and Uniform-Cost Search (UCS). However, because pddlstream extends PDDL, this planning phase can also be implemented by state-of-the-art classical planning algorithms, which leverage the factored structure of action languages such as PDDL to vastly improve empirical planning efficiency. Best-first heuristic search algorithms, which automatically derive heursitics in a domain-independent manner, are one example class of these algorithms.

FastDownward

pddlstream comes pre-packaged with FastDownward, a prolific library that contains many best-first heuristic search PDDL planning algorithms. I've preconfigured a small number of effective and general search algorithms in SEARCH_OPTIONS, which can be toggled using the keyword argument planner=?. I've roughly ranked them in order of least lazy (lowest cost) to most lazy (lowest runtime):

The runtime of the discrete planning phase varies depending on the selected search algorithm. For many non-adversarial problems, these algorithms will either solve a problem instantenously or, if they aren't greedy enough, not terminate within 10 minutes. I recommend starting with a greedier configuration and moving torward a less greedy one if desired.

Other PDDL Planners

Any PDDL planning algorithm could be used in the place of FastDownward; however, a caveat is that some of these planners are only implemented to support a limited set of representational features (e.g. no conditional effects, no derived predicates, etc.), which can make both modeling more difficult and ultimately planning less efficient in many real-world (non-IPC) planning domains. While I heavily recommend FastDownward, some PDDL planners that I've interfaced with in the past with some success include:

Classical Planners

<!--* [pyperplan](https://github.com/aibasel/pyperplan)--> <!-- https://github.mit.edu/caelan/stripstream/tree/master/stripstream/algorithms/search --> <!-- https://github.mit.edu/caelan/ss/tree/master/ss/algorithms -->

Numeric Planners:

Temporal Planners:

Diverse Planners:

<!-- International Planning Competition (IPC) -->

Resources

<!--* [PDDLStream Tutorial](https://web.mit.edu/caelan/www/presentations/6.881_TAMP.pdf)-->

Retired

"Retired" folders indicate code that no longer is continuously supported and thus is likely outdated.

Drake

Install Drake on OS X or Ubuntu by following the following instructions: http://drake.mit.edu/installation.html.

Alternatively, install Drake through docker by following the following instructions: http://manipulation.csail.mit.edu/install_drake_docker.html. Use the appropriate docker_run_bash script with docker tag drake-20181128.

Examples:

<!--[![Kuka IIWA](https://img.youtube.com/vi/3HJrkgIGK7c/0.jpg)](https://www.youtube.com/watch?v=3HJrkgIGK7c)--> <img src="images/drake_kuka.png" height="150">

Additional PDDLStream + Drake examples can be found at: https://github.com/RobotLocomotion/6-881-examples.

<!--https://drake.mit.edu/gallery.html#task-and-motion-planning-->