You can choose to locally install this repository and its dependencies, or use our Docker based workflow.
Dependencies: Ubuntu 18.04, Python 3.6, Git
-
Install
pb_robot
using the instructions below, not the ones in the repo's README- Install pb_robot dependencies
pip3 install numpy pybullet recordclass catkin_pkg IPython networkx scipy numpy-quaternion
pip3 install git+https://github.com/mike-n-7/tsr.git
- Clone pb_robot
- Compile the IKFast library for the panda
cd pb_robot/src/pb_robot/ikfast/franka_panda
python3 setup.py build
(for errors, see troubleshooting below)
- Install pb_robot dependencies
-
Install stacking
- Clone this repo
- Install dependencies
cd stacking
xargs -n1 pip3 install < requirements.txt
- NOTE: I got the following errors for the following lines in requirements.txt (although everything afterwards still worked...)
-e git://github.com/hauptmech/odio_urdf.git@1f9ecb4e7833957c11cc707fa4c1b781ceb70ae8#egg=odio_urdf
-->-e option requires 1 argument
tsr @ git+https://github.com/mike-n-7/tsr.git@aa92079b215fddf58075b71fc07a0ddb17e309af
-->ERROR: Invalid requirement: '@'
-
Install
pddlstream
- follow installation instructions there
-
Create a symlink to required repos (this assumes you cloned pb_robot and pddl_stream to your home directory). Run these commands from the top directory of this repo.
ln -s ~/pb_robot/src/pb_robot .
ln -s ~/pddlstream/pddlstream .
If you plan to interface with the robot and/or use the multi-node planning and execution mode, you will additionally need to set up Robot Operating System (ROS).
Speficially, we use ROS Melodic. For more detailed instructions, look at the stacking_ros
README.
To run Docker containers with graphics (Gazebo, RViz, GPU support, etc.), first install the NVIDIA Container Toolkit.
We recommend creating a top-level folder and cloning this repo inside of it. For example:
mkdir my_project
cd my_project
git clone https://github.com/Learning-and-Intelligent-Systems/stacking.git
cd stacking
To build the Docker image, run
make build
To get access to display capabilities (like PyBullet, etc.), you will need to run this once every time you log in to your machine:
make xhost-activate
Once the image is built, you can start the container with
make term
Note that this Docker image will mount the Catkin generated build files to build
, devel
, and logs
folders on your host so you don't need to rebuild the Catkin workspace every time and you can modify the Python code from your host machine. If at some point you need to do a clean rebuild, ensure to remove these folders.
cd ..
sudo rm -r build/ devel/ logs/
Refer to the Makefile
and Dockerfile
for more information or to modify things as necessary.
Update: This repo will now work by default with Python3.7. This troubleshooting may still be useful for setting up the repo using a different Python version.
On macOS Catalina using a Python3.7 virtualenv, building pb_robot with python setup.py build
failed with the following error
./ikfast.h:41:10: fatal error: 'python3.6/Python.h' file not found
The compiler can't find the appropriate python header. The solution is to first locate the header:
$ find /usr/local/Cellar/ -name Python.h
/usr/local/Cellar//python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h
/usr/local/Cellar//python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/include/python3.8/Python.h
which prints the python include directories. I wanted to use 3.7, so then I set the environment variable
export CPLUS_INCLUDE_PATH=/usr/local/Cellar//python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/
and finally modify pb_robot/src/pb_robot/ikfast/ikfast.h
by changing
#include "python3.6/Python.h" -> #include "python3.7m/Python.h"