This repository holds Python scripts, examples, and automation for PteroSim: RL loops, tooling, and utilities that use the gRPC Python SDK (pterosim).
Get the simulator from PteroSim v0.1.0 open beta (GitHub Release) — download the build for your OS and read the release notes there.
pterosim packageVirtual environment is required for smooth usage. Create one in this repo and activate it before every session.
Windows — PowerShell
cd your\path\to\PteroSimScripts
python -m venv pterosim-venv
.\pterosim-venv\Scripts\Activate.ps1
If activation is blocked by execution policy:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Linux / macOS — bash
cd your/path/to/PteroSimScripts
python3 -m venv pterosim-venv
source pterosim-venv/bin/activate
Deactivate when finished:
deactivate
To remove the virtual environment (e.g. recreate from scratch or reclaim disk space), run deactivate first if the venv is still active (your prompt shows (pterosim-venv)). Then delete the pterosim-venv folder:
Windows — PowerShell
cd your\path\to\PteroSimScripts
Remove-Item -Recurse -Force pterosim-venv
Linux / macOS — bash
cd your/path/to/PteroSimScripts
rm -rf pterosim-venv
pterosim packageThe Python package ships inside the unpacked simulator archive:
Windows — PowerShell
cd your\path\to\Pterosim\Plugins\PteroSimScripting\SDK\python
python -m pip install -U pip
python -m pip install -e .
Linux / macOS — bash
cd your/path/to/Pterosim/Plugins/PteroSimScripting/SDK/python
python3 -m pip install -U pip
python3 -m pip install -e .
python -m pip install numpy
PteroSim.exe. Linux: run PteroSim.sh.You need a running sim so the gRPC server in PteroSimScripting is listening.
With the virtual environment activated and PteroSim running:
from pterosim import PteroSim
sim = PteroSim("localhost:10010")
Remote machine: use "192.168.1.10:10010" (host running the simulator) instead of localhost, and allow TCP on that port through the firewall.
Lint/format rules live in a single place — .pre-commit-config.yaml (ruff + ruff-format, plus whitespace/EOF/YAML/TOML/AST checks). CI runs the exact same rules via pre-commit run --all-files, so what passes locally passes in CI.
Install the hook once (with the venv activated):
python -m pip install pre-commit
pre-commit install
From then on, git commit runs the checks automatically. To run them manually across the whole repo:
pre-commit run --all-files
This repository holds Python scripts, examples, and automation for PteroSim: RL loops, tooling, and utilities that use the gRPC Python SDK (pterosim).
Get the simulator from PteroSim v0.1.0 open beta (GitHub Release) — download the build for your OS and read the release notes there.
pterosim packageVirtual environment is required for smooth usage. Create one in this repo and activate it before every session.
Windows — PowerShell
cd your\path\to\PteroSimScripts
python -m venv pterosim-venv
.\pterosim-venv\Scripts\Activate.ps1
If activation is blocked by execution policy:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Linux / macOS — bash
cd your/path/to/PteroSimScripts
python3 -m venv pterosim-venv
source pterosim-venv/bin/activate
Deactivate when finished:
deactivate
To remove the virtual environment (e.g. recreate from scratch or reclaim disk space), run deactivate first if the venv is still active (your prompt shows (pterosim-venv)). Then delete the pterosim-venv folder:
Windows — PowerShell
cd your\path\to\PteroSimScripts
Remove-Item -Recurse -Force pterosim-venv
Linux / macOS — bash
cd your/path/to/PteroSimScripts
rm -rf pterosim-venv
pterosim packageThe Python package ships inside the unpacked simulator archive:
Windows — PowerShell
cd your\path\to\Pterosim\Plugins\PteroSimScripting\SDK\python
python -m pip install -U pip
python -m pip install -e .
Linux / macOS — bash
cd your/path/to/Pterosim/Plugins/PteroSimScripting/SDK/python
python3 -m pip install -U pip
python3 -m pip install -e .
python -m pip install numpy
PteroSim.exe. Linux: run PteroSim.sh.You need a running sim so the gRPC server in PteroSimScripting is listening.
With the virtual environment activated and PteroSim running:
from pterosim import PteroSim
sim = PteroSim("localhost:10010")
Remote machine: use "192.168.1.10:10010" (host running the simulator) instead of localhost, and allow TCP on that port through the firewall.
Lint/format rules live in a single place — .pre-commit-config.yaml (ruff + ruff-format, plus whitespace/EOF/YAML/TOML/AST checks). CI runs the exact same rules via pre-commit run --all-files, so what passes locally passes in CI.
Install the hook once (with the venv activated):
python -m pip install pre-commit
pre-commit install
From then on, git commit runs the checks automatically. To run them manually across the whole repo:
pre-commit run --all-files