Skip to main content

An application that connects to a robot for advanced controls and visualization of data.

Project description

DaedalusLink

PyPI version License Python Version


DaedalusLink is a lightweight Python library for building robot control GUIs over WebSockets.
Robots can expose a JSON-based interface, and DaedalusLink automatically maps it into GUI elements (buttons, sliders, joysticks, etc.).

Features

  • Simple WebSocket-based protocol (no heavy dependencies)
  • JSON → GUI auto-generation
  • Supports buttons, sliders and joysticks
  • Heartbeat signal to detect connection issues

Installation

pip install daedaluslink

Quick example

from daedaluslink import DaedalusLink

gui = DaedalusLink(name="R2D2", link_id=1)

gui.add_button("forward", command="MOVE_FORWARD", position=[0, 2], size=[4, 1])
gui.add_button("backward", command="MOVE_BACKWARD", position=[4, 2], size=[4, 1])
gui.add_joystick("move", axes=["X", "Y"], command="move", position=[2, 7], size=[6, 6])
gui.add_slider("Joint 1", command="j1", position=[0, 3], size=[1, 9])
gui.add_slider("Joint 2", command="j2", position=[1, 3], size=[1, 9])

@gui.on("MOVE_FORWARD")
def forward(pressed: bool):
    if pressed:
        print("forward pressed")
    else:
        print("forward released")

@gui.on("MOVE_BACKWARD")
def backward(pressed: bool):
    if pressed:
        print("backward pressed")
    else:
        print("backward released")

@gui.on("move")
def on_move(x: int, y: int):
    print(f"Joystick moved → x={x}, y={y}")

@gui.on("j1")
def sliderj1(x: int):
    print(f"slider j1 moved → {x}")

@gui.on("j2")
def sliderj2(x: int):
    print(f"slider j2 moved → {x}")

gui.run(port=8081)

Message Protocol

  • Button press → "MOVE_FORWARD" -> handler gets true
  • Button release → "!MOVE_FORWARD" -> handler gets false
  • Joystick → "move 120,-30" → handler gets (120, -30)
  • Slider → "slider 42" → handler gets 42
  • Heartbeat → Client sends {"type":"ack"}, server responds with ack

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

daedaluslink-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

daedaluslink-0.1.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

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