An open API service indexing awesome lists of open source software.

https://github.com/yandexdataschool/satellite-collision-avoidance

RL for optimal satellite collision avoidance maneuvres
https://github.com/yandexdataschool/satellite-collision-avoidance

Last synced: 2 months ago
JSON representation

RL for optimal satellite collision avoidance maneuvres

Awesome Lists containing this project

README

        

# Satellite Collision Avoidance

## Motivation

Since 2004 the number of space launches has been gradually increasing. Currently, there are more than 100 satellites launched into space every year. This number could grow rapidly due to such projects as the constellation providing worldwide internet access internet by OneWeb. The increasing amount of objects in space leads to a higher probability of their collision.

Most conjunction events are currently processed manually. In this project, we employ state-of-the-art **reinforcement learning** methods to create a system for **automatic maneuver optimization** in order to avoid collisions.

|![](data/images/stuffin_space.png)|
|:--:|
|Space debris reconstrucion from [Stuffin Space project](http://stuffin.space)|

## Flow overview

![](data/images/Space_Navigator_scheme.png)

**1** and **2**: Space objects are monitored by ROSCOSMOS

**3**: ROSCOSMOS computes conjunction events

**4**: Space Navigator gets data from ROSCOSMOS

**5**: Environment is solved with RL

**6**: Space Navigator returns optimal collision avoidance maneuver

## Installation

### Step 1

To set up the project first copy the repo to your local machine:

```
git clone https://github.com/yandexdataschool/satellite-collision-avoidance.git
```

### Step 2

After cloning the repo, install **requirements**:

```
pip install -r requirements.txt
```

We use **Python 3.6.5** and following libraries:
> * Pykep
> * Pandas
> * Matplotlib
> * Numpy
> * Scipy
> * Torch
> * tqdm

If you have problems with Pykep installation, you could use [this link](https://esa.github.io/pykep/documentation/index.html).

### Step 3

Install the package:
```
python setup.py install
```

or use for development:
```
python setup.py develop
```

### Run Examples

Now you can run examples of space simulator.

#### Example 1: test fight

Run following code:
```
python examples/test_flight.py -p true
```

If evereything is correct, you should get such plot:

![](data/images/test_flight.png)

And output:
```
Start time: 6000.0 End time: 6000.01 Simulation step:1e-06

...
Space objects description
...

Simulation ended in 0.0050948 sec.

Maneuvers table:
no maneuvers.

Collisions (distance <= 2000 meters):
no collisions without maneuvers.

Parameters table:
...
```

#### Example 2: maneuvers for random generated collision situation

Run following code to generate collision situation environment with 5 dangerous debris objects in the time interval from 6601 to 6601.1 ([mjd2000](http://www.solarsystemlab.com/faq.html)) and save it to data/environments/generated_collision_5_debr.env:
```
python generation/generate_collision.py \
-save_path data/environments/generated_collision_5_debr.env \
-n_d 5 -start 6601 -end 6601.1 -before 0.1
```

Then, to calculate the maneuvers using the Cross Entropy method and save them to training/agents_tables/CE/action_table_CE_for_generated_collision_5_debr.csv, run:
```
python training/CE/CE_train_for_collision.py \
-env data/environments/generated_collision_5_debr.env -print true \
-save_path training/agents_tables/CE/action_table_CE_for_generated_collision_5_debr.csv \
-r false -n_m 1
```

Finally, to run the simulator for generated environment and obtained maneuvers:
```
python examples/collision.py -env data/environments/generated_collision_5_debr.env \
-model training/agents_tables/CE/action_table_CE_for_generated_collision_5_debr.csv
```

## Running the tests

Currently there are only tests for api module. Run it with command:
```
python tests/test_api.py
```

## Documentation and tutorials

Tutorial on environment setup and simulator:
* [Simulator](examples/Notebooks/tutorials/Simulator_tutorial.ipynb)

Tutorial on learning an agent:
* [Baseline](examples/Notebooks/tutorials/Baseline_tutorial.ipynb)
* [Collinear Grid Search](examples/Notebooks/tutorials/Collinear_GS_tutorial.ipynb)
* [Cross-Entropy method](examples/Notebooks/tutorials/CE_tutorial.ipynb)

## RL Methods description

1. [Baseline](space_navigator/models/baseline/README.md)
2. [Collinear Grid Search](space_navigator/models/collinear_GS/README.md)
3. [Cross-Entropy method](space_navigator/models/CE/README.md)

## Analysis and Experiments

* [The comparison of models on the generated sample of environments](examples/Notebooks/analysis_and_experiments/README.md)

## Useful links

* For space simulation and calculations we use **pykep** library. [[Pykep](https://esa.github.io/pykep/)]
* http://stuffin.space/