Skip to main content

flysplat

A small single-drone quadrotor simulator combining RotorPY dynamics with gsplat Gaussian-splat camera rendering, exposed through a gymnasium.Env API.

Install

.venv/bin/pip install -e . plyfile imageio

(The venv is expected to already contain rotorpy, gsplat, torch, gymnasium.)

Usage

import numpy as np
from flysplat import FlySplatEnv

env = FlySplatEnv(
    scene_path="scene.ply",         # 3DGS .ply (INRIA / nerfstudio export); or pass scene=Scene.synthetic()
    obs_mode="dict",                # "dict" | "image" | "state"
    control_mode="cmd_motor_speeds",
    image_size=(50, 80),            # (H, W)
    fov_deg=90.0,                   # horizontal FOV; or pass camera_intrinsics={fx,fy,cx,cy}
    sim_rate=100,                   # Hz
    max_episode_steps=500,
    initial_state="hover",          # "hover" | "random" | dict
)

obs, info = env.reset(seed=0)
for _ in range(100):
    obs, reward, terminated, truncated, info = env.step(env.action_space.sample())
    if terminated or truncated:
        break
env.close()

Examples

.venv/bin/python examples/view_scene.py                # orbit a synthetic scene -> orbit.gif
.venv/bin/python examples/random_policy.py             # full env rollout with rendering -> rollout.gif
.venv/bin/python examples/random_policy.py --scene path/to/scene.ply

Conventions

  • Drone world frame: ENU (+X east, +Y north, +Z up) — RotorPY native.
  • Body frame: FLU (+X forward, +Y left, +Z up).
  • Camera frame: OpenCV (+X right, +Y down, +Z forward) — what gsplat consumes.
  • Default camera mounting points the camera along body +X. Override via body_to_camera.
  • For most pretrained scenes, the .ply world frame won't match ENU; calibrate scene_transform (a 4×4 ENU→scene mapping) once per scene.

Layout

flysplat/
  env.py        FlySplatEnv (gymnasium.Env)
  dynamics.py   RotorPY Multirotor adapter (normalized [-1,1] actions)
  renderer.py   gsplat rasterization + .ply / synthetic loader
  frames.py     coordinate-frame transforms
  rewards.py    default hover reward
examples/       view_scene.py, random_policy.py
tests/          test_frames.py, test_env.py

Metadata

Release files for hypersplat 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hypersplat 0.0.1
File Size Uploaded
hypersplat-0.0.1.tar.gz 27.6 kB Details

Release files / hypersplat-0.0.1.tar.gz

Download URL hypersplat-0.0.1.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
36eba5474aefbe6413d72940a4fd47de0ea165ccea2ae26bd17e6e7d3f0d3b16
BLAKE2b-256 checksum
How to use checksums
cce015820c03769b2d32dea2f1b74d7d7ac5b8edec49d07a64791d9caeadf376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page