π Paper website: Towards Tight Convex Relaxations for Contact-Rich Manipulation
π Paper: arXiv
π You can find an introduction notebook to generate planar pushing trajectories here.
If you run into any problems, don't hesitate to reach out or create an issue.
π» The exact code used for generating the results in the paper can be found on the branch: rss24-towards-tight-convex.
The trajectories and data in the paper are generated with scripts/planar_pushing/create_plans.py
, see the user guide below.
However, if you are simply interested in using the code, it is recommended to use the updated code on the main
branch.
This repo uses Poetry for dependency management. To setup this project, first install Poetry and, make sure to have Python3.12 installed on your system.
Then, configure poetry to setup a virtual environment that uses Python 3.12:
poetry env use python3.12
Next, install all the required dependencies to the virtual environment with the following command:
poetry install -vvv
(the -vvv
flag adds verbose output).
For debug features to work, make sure to have graphviz installed on your computer. On MacOS, run the following command:
brew install graphviz
To activate the environment, run:
poetry shell
At the moment, this code relies on a customized version of Drake. To install, follow these instructions:
Navigate to a desired installation location and run:
git clone [email protected]:bernhardpg/drake.git
cd drake
git checkout towards-tight-convex-relaxations
To build Drake and the python bindings, run:
cd ../
mkdir drake-build
cd drake-build
cmake -DWITH_MOSEK=ON -DWITH_SNOPT=ON ../drake
make install
if you are a member of the RLG, run:
cd ../
mkdir drake-build
cd drake-build
cmake -DWITH_MOSEK=ON -DWITH_ROBOTLOCOMOTION_SNOPT=ON ../drake
make install
See the docs for more information on building Drake.
To tell the environment to use the customized Drake build, run:
export PYTHONPATH={DRAKE_BUILD_DIR_PATH}/install/lib/python3.11/site-packages:${PYTHONPATH}
where {DRAKE_BUILD_DIR_PATH}
should be replaced with the absolute path to the drake-build
directory above.
Currently, the main entrypoint for generating planar pushing plans is the following script:
python scripts/planar_pushing/create_plan.py
which takes a number of command line arguments. Add the flag --help
for a
description of these.
For instance, to generate 10 plans for a rectangular slider geometry, run
python scripts/planar_pushing/create_plan.py --body sugar_box --seed 0 --num 10
which will generate plans that look like this:
Before merging a branch to main
, make sure the unit test pass by running
pytest
(after activating the virtual environment).
Create a config file specifying the experiment in config
and run it using the
following command:
python3 scripts/planar_pushing/run_planar_pushing_experiment.py --config-name single_experiment
where single_experiment
should be replaced with your config name.