No project description provided
Project description
Plstab = plane-stabilization envirnoment
This is a simple env. based on OpenAI Gym library. Envirnoment for training reinforcement learning (RL) agents.
Example of code to launch enviroment
import plstab
import numpy as np
import gymnasium as gym
env = gym.make('PlaneStab-v0', render_mode='human', wind_mode=3) # create env
obs, info = env.reset(seed=42)
for _ in range(100):
action = np.zeros(2) # sample action
obs, reward, terminated, truncated, info = env.step(action) # step env
if terminated or truncated: # reset if episode ends
obs, info = env.reset()
env.render()
env.close()
args:
name or arg | available value | default value |
---|---|---|
render_mode | "human", None | None |
wind_mode | $ {0, 1, 2, 3} $ | 0 |
wind_mag | $x \in [0, \infty ]$ | 4.0 |
reward_fn | lambda X, Vx, Y, Vy, Phi, Omega: ... | None |
wind mode provides to 1 of 4 wind models:
- 0: off (zero windspeed)
- 1: no_gust (wind without randonmness)
- 2: simple (simple gust model)
- 3: dryden (dryden's turbulence model)
Observation space:
8-dim numpy vector which contains: [X, Vx, Y, Vy, Phi, Omega, Wx, Wy], where
- X - x-component of pos
- Vx - x-component of velocity
- Y - y-component of pos
- Vy - y-component of velocity
- Phi - pitch angle of airplane
- Omega - derivative of Phi
- Wx - x-component of wind speed
- Wy - y-component of wind speed
Action space:
Actions are:
- rate of propeler [-1, 1] -> [0, max]
- angle of elevator [-1, 1] -> [-15, 15] (degrees)
Rewards:
By defalt:
-(Phi ** 2 + 0.1 * Omega ** 2 + 0.01 * alpha ** 2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plstab-0.1.0.tar.gz
(68.4 kB
view details)
Built Distribution
plstab-0.1.0-py3-none-any.whl
(62.4 kB
view details)
File details
Details for the file plstab-0.1.0.tar.gz
.
File metadata
- Download URL: plstab-0.1.0.tar.gz
- Upload date:
- Size: 68.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.8.0-76060800daily20240311-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa9caa1e4ae2739bf30688976a35685267a0fe5e1ddf45ced7894deaa62e80d |
|
MD5 | e18fb5930e816a8972385657d94f3afa |
|
BLAKE2b-256 | 9e319e7e3757e697e7d65236468aac783461dec2f1ff43edb701abaec04eb49e |
File details
Details for the file plstab-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: plstab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 62.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.8.0-76060800daily20240311-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa1f4f578ea695c1fe4e2572a3b3eda5ad88bd7439377321bb4aede576dfd6a |
|
MD5 | d2ec586c3fdcacc1daedaffa69328d66 |
|
BLAKE2b-256 | 51bc3be4b7bb502cf29ba2fbad95a9dfe2fe7cb9969f425319fac5cc34f6ac56 |