There are two parts to this repository:
- The website to run it locally in folder:
iss-sim.spacex.com
- The python interface to the website is the python package
website_interface
The latter requires a webdriver.
A usage example is provided: iss_docking_env.py
sets up an RL environment using the interface.
Currently, main.py
uses the example RL environment.
- Requires a chromedriver executable. Download the appropriate one from: https://chromedriver.chromium.org/downloads
selenium
: python interaction with the website
docking_interface.py
: This is the main interface to the package.- Defines the DockingInterface class to interact with states, actions and the website.
- Defines a function to fetch the
browser
object and theDockingInterface
object. - Defines a context manager so that the interface can be used with the
with (...) as x:
syntax.
web_elements.py
: Defines the ID of each website elementunit_parser.py
: Parses the information received from strings to some floats or ints.states.py
: Finds the state web elements and adds methods to fetch the statesactions.py
: Finds the action web elements and adds methods to click the buttonswebsite_buttons.py
: Finds other website buttons and adds methods to interact with them.
git clone https://github.com/Speterius/iss-docking-interface.git
cd iss-docking-interface
python -m venv venv
Activate with
venv\scripts\activate
or the Unix eqquivalent
pip install -r requirements.txt
Start the local server
cd spacex-iss-sim
python3 -m http.server 5555
Navigate to: http://localhost:5555/iss-sim.spacex.com