Generalized Task and Motion Planner is an algorithm for few-shot learning abstract policies from examples which generalize to new problem instances and accelerate discovery of continuous task and motion plans.
git clone https://github.com/generalizedtamp/GeneralizedTAMP.git
cd GeneralizedTAMP
git submodule update --init --recursive
python -m pip install -r requirements.txt
cd ..
This project has the following additional dependencies:
cd pddlstream/examples/pybullet/utils/pybullet_tools/ikfast/pr2
python setup.py
- The following dependencies require docker
2. QNP2FOND: A C++ library for converting qualitative numeric planning specifications to FOND planning problems
cd QNP2FOND
docker build -t <docker-username>/qnp2fond .
Then add the following to your .bashrc/.zshrc
qnp2fond() {
docker run --rm -v $(pwd):/GeneralizedTAMP -w /QNP2FOND/build <docker-username>/qnp2fond qnp2fond $*
}
cd FOND_PRP
docker build -t <docker-username>/fond_prp .
Then add the following to your .bashrc/.zshrc
prp() {
docker run --rm -v $(pwd):/GeneralizedTAMP -w /FOND_PRP/build <docker-username>/fond_prp prp $*
}
cd open-wbo
docker build -t <docker-username>/open-wbo .
Then add the following to your .bashrc/.zshrc
open-wbo() {
docker run --rm -v $(pwd):/GeneralizedTAMP -w /open-wbo/build <docker-username>/open-wbo open-wbo $*
}
CXX=/usr/local/Cellar/gcc@8/<gcc@8-version>/bin/g++-8 CC=/usr/local/Cellar/gcc@8/<gcc@8-version>/bin/gcc-8 ./pddlstream/FastDownward/build.py release64
CXX=/usr/local/Cellar/gcc@8/<gcc@8-version>/bin/g++-8 CC=/usr/local/Cellar/gcc@8/<gcc@8-version>/bin/gcc-8 ./downward/build.py release64
TODO: Merge the two downward builds into one
Then add the following to .bashrc/.zshrc
export PYTHONPATH=$PYTHONPATH:$HOME/GeneralizedTAMP/pddlstream/FastDownward/src/translate
export PYTHONPATH=$PYTHONPATH:$HOME/GeneralizedTAMP/pddlstream
export PYTHONPATH=$PYTHONPATH:$HOME/GeneralizedTAMP/pddlstream/pybullet_planning
export PYTHONPATH=$PYTHONPATH:$HOME/GeneralizedTAMP
What follows is a description of the layout of the codebase.
This file details all of the possible experiments you can run in this codebase. Each experiment consists of
- A set of small task and motion planning problems which can be solved in a reasonable amount of time by PDDLStream on the input domain.
- A set of larger task and motion planning problems for testing and evaluation
The experiment name (ex. stack_0) is used as an argument to every subsequent file in the pipeline
Running this file will call PDDLStream for each of the training problems in the specified environment and store the results in that tasks results folder
Running this file will generate a feature pool from the task's domain, and create an abstraction of the domain with respect to the training examples The abstraction is stored in the task results folder under the files
abstraction.qnp: The qualitative numeric planning specificationfeatures.txt/features.pkl: The human readable and object versions of the features associated with the abstraction
This file converts the qnp specification into a policy in three steps
- Converts the QNP specification to a fond planning specification
- Solves the FOND planning problem using PRP
- Visualizes the policy in a graphviz graph
The resulting policy visualization can by viewed by running xdot genqnp/tasks/<exp-name>/graph.dot
This file takes in the original domain file and the policy and outputs a new constrained task-specific domain file with the contraints of the policy embedded within it.
This file plans for each of the testing problem instances using the constrained domain and original domain The results are stored in the task results folder.
This file plots the most recent profiling results of a particular experiment