Giter Club home page Giter Club logo

ood-control's Introduction

OoD-Control: Out-of-Distribution Generalization for Flight Control

We implement our algorithm and baseline algorithms on two models: inverted pendulum and quadrotor.

Environment preparation

Recommended environment

Environment:
    Python: 3.9.13
    Pytorch: 1.13.0
    NumPy: 1.26.0
    matplotlib: 3.8.0
    bayesian-optimization: 1.4.3
    tqdm: 4.65.0
    rowan: 1.3.0.post1

Inverted pendulum

cd pendulum for inverted pendulum experiment.

To simply run the experiment under a certain setting, just run run.py for the complete training and testing task. You can also run the experiment under different settings. Examples:

# simply run
python run.py
# assign a wind condition
python run.py --wind breeze
# do not keep the log:
python run.py --logs 0

After the logs are created, you can run plot_result.py to plot the results in ./pics.

Quadrotor

cd quadrotor for quadrotor experiment.

Similarly, run run.py for simple start. More settings are shown in following examples.

# simply run
python run.py
# do not keep the log
python run.py --logs 0
# assign a trajectory
python run.py --trace fig8
# assign a wind condition
python run.py --wind strong_breeze

Trajectory can be chosen from {fig8, hover, sin, spiral}. After the logentry is created, you can run plot_result.py --trace {fig8, hover, sin, spiral} to create 3D traces in ./traces and 2D projection in ./projections.

For both experiments, the argument parse --wind {breeze, strong_breeze, gale} is used to determine the wind velocity in the experiment.

ood-control's People

Contributors

ulricall avatar zlatanwilliams avatar

Stargazers

 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.