Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localty_system_protocol-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localty_system_protocol-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

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

Hashes for localty_system_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca709825ffa9ec0442a85c16350faa8b24473770213c9c5bb9102b1fa8580ae0
MD5 4c32cf895950b4f283c81caa47f60ac6
BLAKE2b-256 4881f8050d86386796b691f43d6ea2f7992f05e312959b4b862e98bea4469c4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for localty_system_protocol-0.1.0.tar.gz:

Publisher: publish.yml on inabako/localty-system-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file localty_system_protocol-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for localty_system_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad29ff6bc663de6f89739981ff99660bbc57273e1d9d3949bf6395b1bdb876c7
MD5 b49107c3b57584f5363858a52670b2f3
BLAKE2b-256 85b43dc3e407cb3f5b31562b1a3f42e6f126cc80448d76e2f39040b6653fe4c8

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page