Giter Site home page Giter Site logo

rdf's Introduction

Reachability-based Trajectory Design with Neural Implicit Safety Constraints

Project Page | Paper | Dataset

Introduction

We present Reachability-based Signed Distance Functions (RDFs) as a neural implicit representation for robot safety. RDF, which can be constructed using supervised learning in a tractable fashion, accurately predicts the distance between the swept volume of a robot arm and an obstacle. RDF’s inference and gradient computations are fast and scale linearly with the dimension of the system; these features enable its use within a novel real-time trajectory planning framework as a continuous-time collision-avoidance constraint. The planning method using RDF is compared to a variety of state-of-the-art techniques and is demonstrated to successfully solve challenging motion planning tasks for high-dimensional systems faster and more reliably than all tested methods.

Paper: Reachability-based Trajectory Design with Neural Implicit Safety Constraints. [Arxiv]

Dependency

  • Run pip install -r requirements.txt to collect all python dependencies.
  • IPOPT is required to run the planning experiments.
  • Gurobi is optionally required if the users would like to generate datasets. Generated datasets are also available at Google Drive.
  • WANDB is optionally required if the users would like to train the RDF models. Pretrained RDF models are available in trained_models/.
  • CORA 2021 is optionally required for users to compute JRS in reachability/joint_reachable_set/gen_jrs_trig with MATLAB script.

Reproducing Results

Building Datasets

Datasets are available at Google Drive. After downloading the datasets, put them under dataset/.

Users who would like to run building dataset on their own can run bash scripts/generate_datasets.sh in the repo home directory (i.e., rdf/).

Note that building the datasets generally takes days of time. To collect the datasets more efficiently, the paper chose to launch dataset collecting program (*.py in generate_dataset/) with multiple processes using different random seeds, then combine these sub-datasets together.

Users can follow similar practice by modifying the provided script and launching dataset collecteing programs in parallel or across different machines.

Training RDF Models

Pretrained models are available in trained_models/.

If the users would like to run training on their own, an example script to train a 3D7Links Manipulator is provided in scripts/train_rdf_model.sh. Note that WANDB is used to monitor training and is thus a dependency to run training.

Users can follow the guide from WANDB to install it, and then run bash scripts/train_rdf_model.sh to launch training with the provided hyperparameters in the training script. Users are free to tune the hyperparameters for model performance. The hyperparameters we used to obtain the pre-trained models are present in the same directory as the models.

Run Planning Experiments

IPOPT is required to run the planning experiments as the framework to solve non-linear programming optimization problems.

To reproduce the 2D planning experiments, run bash scripts/run_2d_planning.sh.

To reproduce the 3D planning experiments, run bash scripts/run_3d_planning.sh.

The results will be in planning_results/ as generated by the planning program.

Other Experiments

Here are the procedures to reproduce the other experiments in the paper.

  1. Compare RDF with SDF
cd experiments
bash run_compare_rdf_and_sdf.sh
  1. Compare RDF with QP
cd experiments
bash run_compare_time_with_QP.sh
  1. Evaluate RDF models on testset

Download the testsets from Google Drive and create a directory named test_dataset/ under the repo home directory (i.e., rdf/). Put the datasets in rdf/test_dataset/.

Then run

cd experiments
bash run_evaluate_model_on_testset.sh

Credits

  • reachability/ referred some part of CORA.
  • environments/robots/urdf_parser_py is extracted from urdf_parser_py and modified to our end.

Citation

The paper with an overview of the theoretical and implementation details is published in Robotics: Science and Systems (RSS 2023). If you use RDF in an academic work, please cite using the following BibTex entry:

@misc{michaux2023reachabilitybased,
      title={Reachability-based Trajectory Design with Neural Implicit Safety Constraints}, 
      author={Jonathan Michaux and Qingyi Chen and Yongseok Kwon and Ram Vasudevan},
      year={2023},
      eprint={2302.07352},
      archivePrefix={arXiv},
      primaryClass={cs.RO}
}

rdf's People

Contributors

qingyichen avatar

Stargazers

 avatar MENG Fei avatar  avatar joonhyung-lee avatar ZhouHang avatar  avatar  avatar RunqiQiu avatar Yixuan Wang avatar Andy Park avatar 韩志超 avatar grasp use  kinova avatar ChengYang Li avatar Long Xu avatar Joonyeol Sim avatar Tingrui Zhang avatar Jin Rui avatar  avatar  avatar Kwesi Rutledge avatar Jon Michaux avatar  avatar Liu Jianheng avatar NEU-Junshun avatar Manan Tayal avatar Tim avatar Yue Pan  avatar cc avatar

Watchers

Yu Zhang avatar  avatar Tingrui Zhang avatar

rdf's Issues

pip install cyipopt error

Excellent work! When installing pkgs in requirements.txt, I got following error:

(rdf) ➜ RDF pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting cyipopt==1.2.0 (from -r requirements.txt (line 1))
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4c/34/180b14dc521ae6a393c98d74d59afc79a7edc19a18721b69571843bfc495/cyipopt-1.2.0.tar.gz (46 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.4/46.4 kB 549.6 kB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
ERROR: Could not find a version that satisfies the requirement cython>=0.26 (from versions: none)
ERROR: No matching distribution found for cython>=0.26
/tmp/pip-install-p4_rrps6/cyipopt_f7db36761fa84ed88120fe6fc01ac0fc/setup.py:26: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************
  
  !!
    dist.Distribution().fetch_build_eggs(SETUP_REQUIRES)
  Traceback (most recent call last):
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
      subprocess.check_call(cmd)
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/home/wt/anaconda3/envs/rdf/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpnw438pev', '--quiet', 'cython>=0.26']' returned non-zero exit status 1.
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-p4_rrps6/cyipopt_f7db36761fa84ed88120fe6fc01ac0fc/setup.py", line 26, in <module>
      dist.Distribution().fetch_build_eggs(SETUP_REQUIRES)
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/setuptools/dist.py", line 662, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/pkg_resources/__init__.py", line 829, in resolve
      dist = self._resolve_dist(
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/pkg_resources/__init__.py", line 865, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1135, in best_match
      return self.obtain(req, installer)
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1147, in obtain
      return installer(requirement)
    File "/home/wt/anaconda3/envs/rdf/lib/python3.8/site-packages/setuptools/installer.py", line 103, in _fetch_build_egg_no_warn
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['/home/wt/anaconda3/envs/rdf/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpnw438pev', '--quiet', 'cython>=0.26']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

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.