A simple programmable rocket landing environment
  • PLSQL 99.7%
  • Python 0.3%
Find a file
2025-04-10 16:03:33 +02:00
assets docs: re-add thumbnail 2025-04-10 11:51:24 +02:00
python fix: return the decoded action 2025-04-10 14:44:13 +02:00
.gitattributes Initial commit 2024-10-27 18:38:36 +01:00
.gitignore feat: update gitignore 2025-04-09 12:39:57 +02:00
GRL.console.exe feat: impl PPO and wrapped with Gym + few bugfix 2025-04-08 15:05:26 +02:00
GRL.exe feat: new release with pck 2025-04-10 14:28:27 +02:00
GRL.pck feat: new release 2025-04-10 14:23:47 +02:00
GRL.sh feat: impl PPO and wrapped with Gym + few bugfix 2025-04-08 15:05:26 +02:00
GRL.x86_64 feat: impl PPO and wrapped with Gym + few bugfix 2025-04-08 15:05:26 +02:00
icon.svg Initial commit 2024-10-27 18:38:36 +01:00
LICENSE Initial commit 2024-10-27 18:38:36 +01:00
README.md fix: doc repalce --num-steps by --total-timesteps 2025-04-10 16:03:33 +02:00

GodotRocketLanding (GRL)

A simple programmable rocket landing environment

Lore

In 2147, Earth’s orbital elevators collapsed during a solar storm, severing all high-bandwidth connections to Mars. With a fleet of 1,000 automated rockets en route, each carrying critical resources, manual control from Earth became impossible. Only a narrow data channel remains, just enough to send one final program. You must design a landing algorithm capable of autonomously guiding every rocket through Mars atmosphere, without a single mistake. Failure isn’t an option. One mistake, and years of progress would crash and burn.

Usage

Python usage

# in your virtual env
pip install websockets
pip install gymnasium

# For simple handmade landing
python python/simple_landing.py

# For PPO learning landing, see
python python/simple_ppo.py --num-envs 10 --total-timesteps 100000
# then evaluate with
python python/enjoy.py --ckpt CHECKPOINT_PATH

# Or implement your own RL algo (DQ-learning, ...)

Rocket control

You can control only 3 Thrusters

{
    "main_thrust"     : float(0-1),
    "rcs_left_thrust" : float(0-1),
    "rcs_right_thrust": float(0-1)
}

Environment State

{
    ## Rocket State
    'position': tuple(x,y),          # Rocket position
    'linear_velocity': tuple(x,y),   # Rocket linear velocity in pixels per second
    'angular_velocity': float,       # La vitesse de rotation de Rocket en radians par seconde.
    'rotation': float(-pi - pi),     # Rocket's rotation in radians
    'num_frame_computed': int,       # Number of frame since start
    'rocket_integrity': float(0-1),  # Integrity of the rocket, at 0.05, BOOOOOM...
    'propellant': int,               # Proppellant remaining
    'temperature': float,            # Rocket's temperature, at somepoint it will melt
    'mass': float,                   # The total mass of the rocket, change according to propellant left.
    'left_leg_contact': bool,        # Rocket left  leg on ground ?
    'right_leg_contact': bool,       # Rocket right leg on ground ?

    ## Planet State
    'planet_radius': float,
    'planet_atmosphere_size': float,
    'planet_mass': str,
    'planet_position': tuple(x,y),

    ## Wind State
    'wind_force': tuple(x,y),
    'wind_direction': tuple(x,y),
}

Roadmap

  • Rocket control and state
  • Python controllable
    • Control by overriding GRL.process method
    • run in batch mode
  • Thruster and RCS
  • Propellant System
    • Propellant Tank
    • Mass updating
  • Wind System
  • Planet as sphere and dynamic gravity
  • Support Big Number
  • Atmospheric system
    • Visual Atmosphere (Shader)
    • Atmospheric damage
      • Hull stress damage
      • Thermal damage
    • Atmospheric drag
      • F_d​=\frac{1}{2} * ​C_d * ρ * v^2 * A
        • C_d​: Drag coefficient (depends on the rocket's shape and surface roughness)
        • ρ: Air density (varies with altitude)
        • v: Rocket velocity relative to the air
        • A: Cross-sectional area of the rocket
      • ρ=ρ_0 * ​exp(−\frac{h}{H​})
  • Add an emergency ejection with parachute
  • Levels
    • Level 1
    • Level 2
    • Level 3
    • Level 4
    • Random
      • easy
      • moderate
      • hard

Thanks