Giter Site home page Giter Site logo

mpot_rearmour's Introduction

Install

Install poetry

git clone https://github.com/TomCC7/mpot_rearmour && cd mpot_rearmour
git submodule update --init
poetry install
poetry shell
pip install torch

run script

python scripts/mpot_rearmour_exp_kinova.py

Original README

Accelerating Motion Planning via Optimal Transport

This repository implements Motion Planning via Optimal Transport mpot in PyTorch. The philosophy of mpot follows the Monte Carlo methods' argument, i.e., more samples could discover more better modes with high enough initialization variances. In other words, within the multi-modal motion planning scope, mpot enables better brute-force planning with GPU vectorization. This enhances robustness against bad local minima, a common issue in optimization-based motion planning.

For those interested in standalone Sinkhorn Step as a general-purpose batch gradient-free solver for non-convex optimization problems, please check out ssax.

Paper Preprint

This work has been accepted to NeurIPS 2023. Please find the pre-print here:

Installation

Simply activate your conda/Python environment, navigate to mpot root directory and run

pip install -e .

mpot algorithm is specifically designed to work with GPU. Please check if you have installed PyTorch with the CUDA option.

Examples

Please find in examples/ folder the demo of vectorized planning in planar environments with occupancy map:

python examples/mpot_occupancy.py

and with signed-distance-field (SDF):

python examples/mpot_sdf.py

We also added a demo with vectorized Panda planning with dense obstacle environments (SDF):

python examples/mpot_panda.py

Every run is associated with a different seed. The resulting optimization visualizations are stored at your current directory. Please refer to the example scripts for playing around with options and different goal points. Note that for all cases, we normalize the joint space to the joint limits and velocity limits, then perform Sinkhorn Step on the normalized state-space. Changing any hyperparameters may require tuning again.

Tuning Tips: The most sensitive parameters are:

  • polytope: for small state-dimension that is less than 10, cube is a good choice. For much higer state-dimension, the sensible choices are orthoplex or simplex.
  • step_radius: the step size.
  • probe_radius: the probing radius, which projects towards polytope vertices to compute cost-to-go. Note, probe_radius >= step_radius.
  • num_probe: number of probing points along the probe radius. This is critical for optimizing performance, usually 3-5 is enough.
  • epsilon: decay rate of the step/probe size, usually 0.01-0.05.
  • ent_epsilon: Sinkhorn entropy regularization, usually 1e-2 to 5e-2 for balancing between optimal coupling's sharpness and speed.
  • Various cost term weightings. This depends on your applications.

Troubleshooting

If you encounter memory problems, try:

export 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512'

to reduce memory fragmentation.

Acknowledgement

The Gaussian Process prior implementation is adapted from Sasha Lambert's mpc_trajopt.

Citation

If you found this repository useful, please consider citing these references:

@inproceedings{le2023accelerating,
  title={Accelerating Motion Planning via Optimal Transport},
  author={Le, An T. and Chalvatzaki, Georgia and Biess, Armin and Peters, Jan},
  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
  year={2023}
}

mpot_rearmour's People

Contributors

tomcc7 avatar anindex avatar

Watchers

 avatar

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.