Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Armandpl/starship-landing-gym
Browse files Browse the repository at this point in the history
  • Loading branch information
Armandpl committed Feb 25, 2022
2 parents 1afcf15 + e30f24f commit f84902a
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 173 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
linting:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v1
with:
python-version: "3.9"
- name: flake8 Lint
uses: py-actions/flake8@v1
test:
needs: linting
runs-on: "ubuntu-latest"
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.9
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest tests/
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starship Landing Gym
# Starship Landing Gym [![tests](https://github.com/Armandpl/starship-landing-gym/actions/workflows/tests.yml/badge.svg)](https://github.com/Armandpl/starship-landing-gym/actions/workflows/tests.yml)
A Gym env for rocket landing.

<p align="center">
Expand All @@ -7,4 +7,27 @@ A Gym env for rocket landing.
<i> Successfull Rocket Landing </i>
</p>

`pip install starship-landing-gym`
The task is the to bring the rocket above the landing pad with a speed inferior to 5m/s.

This is inspired by and based on Thomas Godden's ["Starship Landing Trajectory Optimization" blog post.](http://thomasgodden.com/starship-trajopt.html)

## Installation

`pip install starship-landing-gym`

## Usage

```python
import gym
import starship_landing_gym

env = gym.make("StarshipLanding-v0")

done = False
while not done:
action = ... # Your agent code here
obs, reward, done, info = env.step(action)
env.render()
```

todo: describe observation, reward, need for history wrapper, need for her
Binary file added images/landing.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f84902a

Please sign in to comment.