Python SDK for NimbusOS.
Project description
NimbusOS Python SDK
This is the first narrow Python SDK surface for NimbusOS pubsub.
V1 supports:
- Subscribe to
telemetry - Subscribe to
state - Subscribe to
camera - Publish
arm_state - Publish
guidance_request - Publish
waypoint_command
It does not expose raw pubsub publishing, all-topic subscription, legacy route messages, navigation request messages, or internal control topics.
Install
cd NimbusOS/sdk
uv sync
Local Development Without PyPI
Use this loop before publishing. It builds the SDK exactly as a package, then installs that local wheel into the sandbox environment.
cd /Users/davidcrabtree/projects/droneforge_mvp/NimbusOS/sdk
uv run python scripts/refresh_schema.py --check
uv build
Create the sandbox virtualenv if it does not already exist:
cd /Users/davidcrabtree/projects/NimbusOS-sdk-sandbox
uv venv --python 3.12
Install the local SDK wheel into that sandbox:
cd /Users/davidcrabtree/projects/droneforge_mvp/NimbusOS/sdk
uv run python scripts/install_local_wheel.py /Users/davidcrabtree/projects/NimbusOS-sdk-sandbox/.venv/bin/python
Run sandbox checks directly from .venv/bin after installing the local wheel:
cd /Users/davidcrabtree/projects/NimbusOS-sdk-sandbox
.venv/bin/python examples_v0/smoke_import.py
.venv/bin/nimbusos-subscribe --help
.venv/bin/nimbusos-arm --help
.venv/bin/nimbusos-guidance-request --help
.venv/bin/nimbusos-waypoint-command --help
Do not run uv sync between the local wheel install and the sandbox checks. The
sandbox dependency pin is for released packages, so syncing can replace the local
wheel with the PyPI version.
Release Process
- Bump
versioninpyproject.tomland refreshuv.lock. - Run
uv run python scripts/refresh_schema.py --check. - Run
uv build. - Install the built wheel into a clean environment with
scripts/install_local_wheel.py. - Run the import and CLI smoke checks above.
- Run the live sandbox examples against NimbusOS when the app/core is running.
- Publish to TestPyPI.
- Install from TestPyPI in a clean environment and repeat the smoke checks.
- Publish the same artifacts to PyPI.
- Update the sandbox package pin to the released version and run
uv sync.
Subscribe
cd NimbusOS/sdk
uv run nimbusos-subscribe telemetry
uv run nimbusos-subscribe state
uv run nimbusos-subscribe camera
Publish Arm State
cd NimbusOS/sdk
uv run nimbusos-arm
uv run nimbusos-arm --disarm
Python callers use the same arm_state message:
from nimbusos_sdk import NimbusClient
with NimbusClient() as client:
client.publish_arm_state(True)
Publish Guidance Requests
cd NimbusOS/sdk
uv run nimbusos-guidance-request go
uv run nimbusos-guidance-request land
uv run nimbusos-guidance-request return_home
Guidance can also request a relative waypoint:
cd NimbusOS/sdk
uv run nimbusos-guidance-request relative_waypoint --forward 1.5 --right 0.0 --down -1.0
Publish Waypoint Commands
cd NimbusOS/sdk
uv run nimbusos-waypoint-command --mode override --forward 1.5 --right 0.0 --down -1.0
uv run nimbusos-waypoint-command --mode queue --forward 1.0 --right 0.5 --down -1.0
Waypoint command fields match the core schema:
forward: meters forward/back in the drone's current body headingright: meters right/left in the drone's current body headingdown: absolute local-frame down targetmode=override: replace the active waypointmode=queue: append after the active waypoint
Endpoints
The client uses these defaults:
- publish:
tcp://127.0.0.1:7771 - subscribe:
tcp://127.0.0.1:7772
You can override them with:
DF_ZMQ_PUB_ENDPOINTDF_ZMQ_SUB_ENDPOINT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nimbusos_sdk-0.1.1.tar.gz.
File metadata
- Download URL: nimbusos_sdk-0.1.1.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eacdacfdd8da3026b021bf4a0ff06f2b8cf7f7224f228c9aa563729901012a2
|
|
| MD5 |
a2d8de3a2709ba1f7534fca909d869a3
|
|
| BLAKE2b-256 |
0cbd46e3faeb4b4831e320128312c14b33dec619b260c9d2fca0c6337ab2e067
|
File details
Details for the file nimbusos_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nimbusos_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
096a553d7afa35456ce70671f12cd0a336aaf8dff2c9846b5157d2bf4b03c30d
|
|
| MD5 |
1e2b1b7483866ce507e0ed4033154955
|
|
| BLAKE2b-256 |
1908a0ca5269737e4eca9ade4b9cde4057c86109b881942b4c20642d23a29b02
|