Code Monkey home page Code Monkey logo

planning-through-contact's Introduction

Planning Through Contact

RSS 2024: Towards Tight Convex Relaxations for Contact-Rich Manipulation

๐ŸŒ Paper website: Towards Tight Convex Relaxations for Contact-Rich Manipulation

๐Ÿ“‹ Paper: arXiv

Demo triangle Demo convex object Demo T

๐Ÿ“˜ 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.

Paper results

๐Ÿ’ป 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.


โš ๏ธ Note: This repo is under active development changes to the code may occur. โš ๏ธ

๐Ÿš€ Installation (Linux and MacOS)

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

Activating the environment

To activate the environment, run:

poetry shell

Installing customized Drake version

โš ๏ธ At the moment, the code relies on a custom build of Drake. This will only be the case for another week or so, meaning that this step will not be necessary very soonโš ๏ธ

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.


Generating planar pushing plans

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:

Demo triangle

Developers

Before merging a branch to main, make sure the unit test pass by running

pytest

(after activating the virtual environment).

Other (experimental)

Running a single hardware experiment

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.