Shared protocol definitions for the Localty system
Project description
localty-system-protocol
Localty システムにおけるロボット・GUI 間通信プロトコル仕様。
概要
localty-system-protocol は、Localty ロボット制御システムにおける
GUI ↔ ロボット間の通信仕様を定義するプロトコルリポジトリです。
本リポジトリは以下を目的とします:
- 通信仕様の単一ソース化
- 実装と仕様の乖離防止
- デバッグおよび拡張時の設計基準の提供
本READMEは Localty 通信仕様の正規ドキュメントであり、実装は本仕様に従って構築される。
構成
localty_protocol/
├─ command.py
├─ telemetry.py
├─ video.py
└─ version.py
localty_protocol.telemetry は、UDPポートとTelemetry JSONの共通定義を管理する。
UDP_PORTS: control / announce / video / telemetry_fast / telemetry_slow の一覧TELEMETRY_CHANNELS: FAST / SLOW channelと対応message typeの一覧*_payload(): Robot / Simulator が送信する既存JSON形状の生成encode_payload()/decode_payload(): JSON over UDP の共通encode/decode
UDPポート
UDPポートの正規定義は localty_protocol.telemetry.UDP_PORTS です。
README、各repoのdocs、Docker設定はこの一覧に合わせます。
| name | direction | port |
|---|---|---|
control |
GUI -> robot/simulator | 5005/udp |
announce |
robot/simulator -> GUI | 5006/udp |
video |
robot/simulator -> GUI | 5000/udp |
telemetry_fast |
robot/simulator -> GUI | 5010/udp |
telemetry_slow |
robot/simulator -> GUI | 5011/udp |
Telemetry channelの正規定義は localty_protocol.telemetry.TELEMETRY_CHANNELS です。
| channel | port | message types |
|---|---|---|
fast |
5010/udp |
heartbeat, distance, imu |
slow |
5011/udp |
gps, battery |
SimulatorのFault API 8080/tcp は、シミュレーター管理用であり共通UDP protocolには含めません。
通信モデル
GUI ⇄ UDP/TCP ⇄ Robot
- GUI: 操作・可視化
- Robot: 実機制御・センサ管理
- Protocol: データ構造・コマンド定義
パケット構造
| フィールド | 型 | 説明 |
|---|---|---|
| header | uint8 | パケット種別 |
| length | uint16 | データ長 |
| payload | bytes | 本体データ |
| checksum | uint16 | 整合性検証 |
コマンド一覧
Drive Commands
| コマンド | 説明 |
|---|---|
| MOVE | 移動制御 |
| STOP | 停止 |
| TURN | 旋回 |
Camera Commands
| コマンド | 説明 |
|---|---|
| START | 映像開始 |
| STOP | 映像停止 |
バージョニング方針
プロトコルは後方互換性を重視して管理する。
-
Major: 非互換変更
-
Minor: 互換追加
-
Patch: バグ修正
開発ポリシー
-
実装と仕様は常に一致させる
-
仕様変更は必ず Issue / PR で管理
-
README を最上位の仕様書とする
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 localty_system_protocol-0.1.0.tar.gz.
File metadata
- Download URL: localty_system_protocol-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca709825ffa9ec0442a85c16350faa8b24473770213c9c5bb9102b1fa8580ae0
|
|
| MD5 |
4c32cf895950b4f283c81caa47f60ac6
|
|
| BLAKE2b-256 |
4881f8050d86386796b691f43d6ea2f7992f05e312959b4b862e98bea4469c4f
|
Provenance
The following attestation bundles were made for localty_system_protocol-0.1.0.tar.gz:
Publisher:
publish.yml on inabako/localty-system-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
localty_system_protocol-0.1.0.tar.gz -
Subject digest:
ca709825ffa9ec0442a85c16350faa8b24473770213c9c5bb9102b1fa8580ae0 - Sigstore transparency entry: 1800622616
- Sigstore integration time:
-
Permalink:
inabako/localty-system-protocol@3b6efbe85df36e5e02d2209d4ea0195a34d98e22 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/inabako
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3b6efbe85df36e5e02d2209d4ea0195a34d98e22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file localty_system_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: localty_system_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad29ff6bc663de6f89739981ff99660bbc57273e1d9d3949bf6395b1bdb876c7
|
|
| MD5 |
b49107c3b57584f5363858a52670b2f3
|
|
| BLAKE2b-256 |
85b43dc3e407cb3f5b31562b1a3f42e6f126cc80448d76e2f39040b6653fe4c8
|
Provenance
The following attestation bundles were made for localty_system_protocol-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on inabako/localty-system-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
localty_system_protocol-0.1.0-py3-none-any.whl -
Subject digest:
ad29ff6bc663de6f89739981ff99660bbc57273e1d9d3949bf6395b1bdb876c7 - Sigstore transparency entry: 1800622656
- Sigstore integration time:
-
Permalink:
inabako/localty-system-protocol@3b6efbe85df36e5e02d2209d4ea0195a34d98e22 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/inabako
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3b6efbe85df36e5e02d2209d4ea0195a34d98e22 -
Trigger Event:
push
-
Statement type: