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
This is the face keypoint train code of project face-detection-project

face-key-point-pytorch 1. Data structure The structure of landmarks_jpg is like below: |--landmarks_jpg |----AFW |------AFW_134212_1_0.jpg |------AFW_

I‘m X 3 Nov 27, 2022
Teaching end to end workflow of deep learning

Deep-Education This repository is now available for public use for teaching end to end workflow of deep learning. This implies that learners/researche

Data Lab at College of William and Mary 2 Sep 26, 2022
PyTorch implementation of Histogram Layers from DeepHist: Differentiable Joint and Color Histogram Layers for Image-to-Image Translation

deep-hist PyTorch implementation of Histogram Layers from DeepHist: Differentiable Joint and Color Histogram Layers for Image-to-Image Translation PyT

Winfried Lötzsch 10 Dec 06, 2022
Companion repository to the paper accepted at the 4th ACM SIGSPATIAL International Workshop on Advances in Resilient and Intelligent Cities

Transfer learning approach to bicycle sharing systems station location planning using OpenStreetMap Companion repository to the paper accepted at the

Politechnika Wrocławska - repozytorium dla informatyków 4 Oct 24, 2022
Cooperative Driving Dataset: a dataset for multi-agent driving scenarios

Cooperative Driving Dataset (CODD) The Cooperative Driving dataset is a synthetic dataset generated using CARLA that contains lidar data from multiple

Eduardo Henrique Arnold 124 Dec 28, 2022
A framework for Quantification written in Python

QuaPy QuaPy is an open source framework for quantification (a.k.a. supervised prevalence estimation, or learning to quantify) written in Python. QuaPy

41 Dec 14, 2022
TensorFlow port of PyTorch Image Models (timm) - image models with pretrained weights.

TensorFlow-Image-Models Introduction Usage Models Profiling License Introduction TensorfFlow-Image-Models (tfimm) is a collection of image models with

Martins Bruveris 227 Dec 20, 2022
Code for NAACL 2021 full paper "Efficient Attentions for Long Document Summarization"

LongDocSum Code for NAACL 2021 paper "Efficient Attentions for Long Document Summarization" This repository contains data and models needed to reprodu

56 Jan 02, 2023
PyTorch implementation of EfficientNetV2

[NEW!] Check out our latest work involution accepted to CVPR'21 that introduces a new neural operator, other than convolution and self-attention. PyTo

Duo Li 375 Jan 03, 2023
(CVPR2021) Kaleido-BERT: Vision-Language Pre-training on Fashion Domain

Kaleido-BERT: Vision-Language Pre-training on Fashion Domain Mingchen Zhuge*, Dehong Gao*, Deng-Ping Fan#, Linbo Jin, Ben Chen, Haoming Zhou, Minghui

250 Jan 08, 2023
NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.

NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.

Xintao 593 Jan 03, 2023
xitorch: differentiable scientific computing library

xitorch is a PyTorch-based library of differentiable functions and functionals that can be widely used in scientific computing applications as well as deep learning.

24 Apr 15, 2021
Repo for "Benchmarking Robustness of 3D Point Cloud Recognition against Common Corruptions" https://arxiv.org/abs/2201.12296

Benchmarking Robustness of 3D Point Cloud Recognition against Common Corruptions This repo contains the dataset and code for the paper Benchmarking Ro

Jiachen Sun 168 Dec 29, 2022
PyTorch Code for NeurIPS 2021 paper Anti-Backdoor Learning: Training Clean Models on Poisoned Data.

Anti-Backdoor Learning PyTorch Code for NeurIPS 2021 paper Anti-Backdoor Learning: Training Clean Models on Poisoned Data. Check the unlearning effect

Yige-Li 51 Dec 07, 2022
Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR)

This is the official implementation of our paper Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR), which has been accepted by WSDM2022.

Yongchun Zhu 81 Dec 29, 2022
Spatial color quantization in Rust

rscolorq Rust port of Derrick Coetzee's scolorq, based on the 1998 paper "On spatial quantization of color images" by Jan Puzicha, Markus Held, Jens K

Collyn O'Kane 37 Dec 22, 2022
YOLOv7 - Framework Beyond Detection

🔥🔥🔥🔥 YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥

JinTian 3k Jan 01, 2023
This is a repo of basic Machine Learning!

Basic Machine Learning This repository contains a topic-wise curated list of Machine Learning and Deep Learning tutorials, articles and other resource

Ekram Asif 53 Dec 31, 2022
All the code and files related to the MI-Lab of UE19CS305 course in sem 5

Machine-Intelligence-Lab-CS305 The compilation of all the code an drelated files from MI-Lab UE19CS305 (of batch 2019-2023) offered by PES University

Arvind Krishna 3 Nov 10, 2022
An University Project of Quera Web Crawling.

WebCrawlerProject An University Project of Quera Web Crawling. خزشگر اینستاگرام در این پروژه شما باید با استفاده از کتابخانه های زیر یک خزشگر اینستاگر

Mahdi 3 Aug 12, 2022