Giter Site home page Giter Site logo

tamago117 / mppi_playground Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kohonda/mppi_playground

0.0 0.0 0.0 6.27 MB

Model Predictive Path Integral Control (MPPI) with PyTorch

License: MIT License

Python 94.38% Makefile 1.20% Dockerfile 4.42%

mppi_playground's Introduction

MPPI Playground

This repository contains an implementation of Model Predictive Path Integral Control (MPPI) with PyTorch to accelerate computations on the GPU.

Tested Native Environment

  • Ubuntu Focal 20.04 (LTS)
  • NVIDIA Driver 510 or later due to PyTorch 2.x

Dependencies

  • cuda 11.8
  • Python 3.10
  • PyTorch 2.0
Docker Setup

Install Docker

Installation guide

# Install from get.docker.com
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo groupadd docker
sudo usermod -aG docker $USER

Setup GPU for Docker

Installation guide

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list 

sudo apt-get update

sudo apt-get install -y nvidia-container-toolkit nvidia-container-runtime

sudo nvidia-ctk runtime configure --runtime=docker

sudo systemctl restart docker

Installation

with Docker (Recommend)

# build container
make build

# Open remote container via Vscode (Recommend)
# 1. Open the folder using vscode
# 2. Ctrl+P and select 'devcontainer rebuild and reopen in container'
# Then, you can skip the following commands

# Or Run container via terminal
make bash

with venv

python3 -m venv .venv
source .venv/bin/activate
pip3 install -e .[dev]

Examples

Navigation 2D

python3 app/navigation2d.py

navigation2d

Pendulum

python3 app/pendulum.py

pendulum

Cartpole

python3 app/cartpole.py

cartpole

Mountain car

python3 app/mountaincar.py

mountaincar

Reference

mppi_playground's People

Contributors

kohonda 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.