Official implementation of "Learning Forward Dynamics Model and Informed Trajectory Sampler for Safe Quadruped Navigation" (RSS 2022)

Overview

Intro

Official implementation of "Learning Forward Dynamics Model and Informed Trajectory Sampler for Safe Quadruped Navigation" Robotics:Science and Systems (RSS 2022)

[Project page] [Paper]

Dependencies

Set conda environment

conda create -n quadruped_nav python=3.8
conda activate quadruped_nav

Install torch(1.10.1), numpy(1.21.2), matplotlib, scipy, ruamel.yaml

conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
conda install numpy=1.21.2
conda install matplotlib
conda install scipy
pip install ruamel.yaml

Install wandb and login. 'wandb' is a logging system similar to 'tensorboard'.

pip install wandb
wandb login

Install required python packages to compute Dynamic Time Warping in Parallel

pip install dtw-python
pip install fastdtw
pip install joblib

Install OMPL (Open Motion Planning Library). Python binding version of OMPL is used.

Download OMPL installation script in https://ompl.kavrakilab.org/installation.html.
chmod u+x install-ompl-ubuntu.sh
./install-ompl-ubuntu.sh --python

Simulator setup

RaiSim is used. Install it following the installation guide.

Then, set up RaisimGymTorch as following.

cd /RAISIM_DIRECTORY_PATH/raisimLib
git clone [email protected]:awesomericky/complex-env-navigation.git
cd complex-env-navigation
python setup.py develop

Path setup

Configure following paths. Parts that should be configured is set with TODO: PATH_SETUP_REQUIRED flag.

  1. Project directory
    • cfg['path']['home'] in /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/raisimGymTorch/env/envs/test/cfg.yaml
  2. OMPL Python binding
    • OMPL_PYBIND_PATH in /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/raisimGymTorch/env/envs/train/global_planner.py

Train model

Set logging: True in /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/raisimGymTorch/env/envs/train/cfg.yaml, if you want to enable wandb logging.

Train Forward Dynamics Model (FDM).

  • Click 'c' to continue when pdb stops the code
  • To quit the training, click 'Ctrl + c' to call pdb. Then click 'q'.
  • Path of the trained velocity command tracking controller should be given with -tw flag.
  • Evaluations of FDM are visualized in /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/trajectory_prediction_plot.
python raisimGymTorch/env/envs/train/FDM_train.py -tw /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/data/command_tracking_flat/final/full_16200.pt

Download data to train Informed Trajectory Sampler (386MB) [link]

# Unzip the downloaded zip file and move it to required path.
unzip analytic_planner_data.zip
mv analytic_planner_data /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/.

Train Informed Trajectory Sampler (ITS)

  • Click 'c' to continue when pdb stops the code.
  • To quit the training, click 'Ctrl + c' to call pdb. Then click 'q'.
  • Path of the trained Forward Dynamics Model should be given with -fw flag.
python raisimGymTorch/env/envs/train/ITS_train.py -fw /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/data/FDM_train/XXX/full_XXX.pt

Run demo

Configure the trained weight paths (cfg['path']['FDM'] and cfg['path']['ITS']) in /RAISIM_DIRECTORY_PATH/raisimLib/complex-env-navigation/raisimGymTorch/env/envs/test/cfg.yaml. Parts that should be configured is set with TODO: WEIGHT_PATH_SETUP_REQUIRED flag.

Open RaiSim Unity to see the visualized simulation.

Run point-goal navigation with trained weight (click 'c' to continue when pdb stops the code)

python raisimGymTorch/env/envs/test/pgn_runner.py

Run safety-remote control with trained weight (click 'c' to continue when pdb stops the code)

python raisimGymTorch/env/envs/test/src_runner.py

To quit running the demo, click 'Ctrl + c' to call pdb. Then click 'q'.

Extra notes

  • This repository is not maintained anymore. If you have a question, send an email to [email protected].
  • We don't take questions regarding installation. If you install the dependencies successfully, you can easily run this.
  • For the codes in rsc/, ANYbotics' license is applied. MIT license otherwise.
  • More details of the provided velocity command tracking controller for quadruped robots in flat terrain can be found in this paper and repository.

Cite

@INPROCEEDINGS{Kim-RSS-22, 
    AUTHOR    = {Yunho Kim AND Chanyoung Kim AND Jemin Hwangbo}, 
    TITLE     = {Learning Forward Dynamics Model and Informed Trajectory Sampler for Safe Quadruped Navigation}, 
    BOOKTITLE = {Proceedings of Robotics: Science and Systems}, 
    YEAR      = {2022}, 
    ADDRESS   = {New York, USA}, 
    MONTH     = {June}
} 
Owner
Yunho Kim
Yunho Kim
[Nature Machine Intelligence' 21] "Advancing COVID-19 Diagnosis with Privacy-Preserving Collaboration in Artificial Intelligence"

[UCADI] COVID-19 Diagnosis With Federated Learning Intro We developed a Federated Learning (FL) Framework for global researchers to collaboratively tr

HUST EIC AI-LAB 30 Dec 12, 2022
Doge-Prediction - Coding Club prediction ig

Doge-Prediction Coding Club prediction ig Basically: Create an application that

1 Jan 10, 2022
Compares various time-series feature sets on computational performance, within-set structure, and between-set relationships.

feature-set-comp Compares various time-series feature sets on computational performance, within-set structure, and between-set relationships. Reposito

Trent Henderson 7 May 25, 2022
Temporal-Relational CrossTransformers

Temporal-Relational Cross-Transformers (TRX) This repo contains code for the method introduced in the paper: Temporal-Relational CrossTransformers for

83 Dec 12, 2022
Deep generative modeling for time-stamped heterogeneous data, enabling high-fidelity models for a large variety of spatio-temporal domains.

Neural Spatio-Temporal Point Processes [arxiv] Ricky T. Q. Chen, Brandon Amos, Maximilian Nickel Abstract. We propose a new class of parameterizations

Facebook Research 75 Dec 19, 2022
Team nan solution repository for FPT data-centric competition. Data augmentation, Albumentation, Mosaic, Visualization, KNN application

FPT_data_centric_competition - Team nan solution repository for FPT data-centric competition. Data augmentation, Albumentation, Mosaic, Visualization, KNN application

Pham Viet Hoang (Harry) 2 Oct 30, 2022
This repository is for our EMNLP 2021 paper "Automated Generation of Accurate & Fluent Medical X-ray Reports"

Introduction: X-Ray Report Generation This repository is for our EMNLP 2021 paper "Automated Generation of Accurate & Fluent Medical X-ray Reports". O

no name 36 Dec 16, 2022
Several simple examples for popular neural network toolkits calling custom CUDA operators.

Neural Network CUDA Example Several simple examples for neural network toolkits (PyTorch, TensorFlow, etc.) calling custom CUDA operators. We provide

WeiYang 798 Jan 01, 2023
KinectFusion implemented in Python with PyTorch

KinectFusion implemented in Python with PyTorch This is a lightweight Python implementation of KinectFusion. All the core functions (TSDF volume, fram

Jingwen Wang 80 Jan 03, 2023
Multi-Task Temporal Shift Attention Networks for On-Device Contactless Vitals Measurement (NeurIPS 2020)

MTTS-CAN: Multi-Task Temporal Shift Attention Networks for On-Device Contactless Vitals Measurement Paper Xin Liu, Josh Fromm, Shwetak Patel, Daniel M

Xin Liu 106 Dec 30, 2022
Python implementation of Bayesian optimization over permutation spaces.

Bayesian Optimization over Permutation Spaces This repository contains the source code and the resources related to the paper "Bayesian Optimization o

Aryan Deshwal 9 Dec 23, 2022
Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CVPR 2021)

Semi-supervised Semantic Segmentation with Directional Context-aware Consistency (CAC) Xin Lai*, Zhuotao Tian*, Li Jiang, Shu Liu, Hengshuang Zhao, Li

Jia Research Lab 137 Dec 14, 2022
My usage of Real-ESRGAN to upscale anime, some test and results in the test_img folder

anime upscaler My usage of Real-ESRGAN to upscale anime, I hope to use this on a proper GPU cuz doing this on CPU is completely shit 😂 , I even tried

Shangar Muhunthan 29 Jan 07, 2023
This tool uses Deep Learning to help you draw and write with your hand and webcam.

This tool uses Deep Learning to help you draw and write with your hand and webcam. A Deep Learning model is used to try to predict whether you want to have 'pencil up' or 'pencil down'.

lmagne 169 Dec 10, 2022
NeuralDiff: Segmenting 3D objects that move in egocentric videos

NeuralDiff: Segmenting 3D objects that move in egocentric videos Project Page | Paper + Supplementary | Video About This repository contains the offic

Vadim Tschernezki 14 Dec 05, 2022
Baseline and template code for node21 detection track

Nodule Detection Algorithm This codebase implements a baseline model, Faster R-CNN, for the nodule detection track in NODE21. It contains all necessar

node21challenge 11 Jan 15, 2022
A setup script to generate ITK Python Wheels

ITK Python Package This project provides a setup.py script to build ITK Python binary packages and infrastructure to build ITK external module Python

Insight Software Consortium 59 Dec 14, 2022
Code for NeurIPS 2021 paper: Invariant Causal Imitation Learning for Generalizable Policies

Invariant Causal Imitation Learning for Generalizable Policies Ioana Bica, Daniel Jarrett, Mihaela van der Schaar Neural Information Processing System

Ioana Bica 17 Dec 01, 2022
Code for "Training Neural Networks with Fixed Sparse Masks" (NeurIPS 2021).

Code for "Training Neural Networks with Fixed Sparse Masks" (NeurIPS 2021).

Varun Nair 37 Dec 30, 2022
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP

Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se

Daniil Pakhomov 134 Dec 19, 2022