koebelt-link 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Koebel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ # The tests read the shared vectors in protocol/, outside the package.
2
+ prune tests
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: koebelt-link
3
+ Version: 1.0.0
4
+ Summary: Connect drones, robots and test rigs to the koebelt/dash app.
5
+ Author-email: Thomas Koebel <contact@koebelt.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/koebelt/koebelt_dash
8
+ Project-URL: Source, https://github.com/koebelt/koebelt_dash/tree/main/libs/python
9
+ Project-URL: Protocol, https://github.com/koebelt/koebelt_dash/blob/main/protocol/PROTOCOL.md
10
+ Project-URL: Issues, https://github.com/koebelt/koebelt_dash/issues
11
+ Keywords: robotics,drone,rover,telemetry,raspberry-pi,koebelt
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: System :: Hardware
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Provides-Extra: serial
24
+ Requires-Dist: pyserial>=3.5; extra == "serial"
25
+ Provides-Extra: ble
26
+ Requires-Dist: bless>=0.2.6; extra == "ble"
27
+ Provides-Extra: camera
28
+ Requires-Dist: opencv-python-headless>=4.5; extra == "camera"
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7; extra == "dev"
31
+ Requires-Dist: pyyaml>=6; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # koebelt-link (Python)
35
+
36
+ Connect a Raspberry Pi, a Jetson or any computer-driven robot to koebelt/dash.
37
+
38
+ ```bash
39
+ pip install koebelt-link # Wi-Fi (UDP) only, no dependencies
40
+ pip install "koebelt-link[serial,ble]" # USB serial and radios (pyserial), BLE peripheral (bless)
41
+ pip install "koebelt-link[camera]" # dev.camera(): live video through OpenCV
42
+ ```
43
+
44
+ ```python
45
+ from koebelt_link import Device, Vec3
46
+
47
+ dev = Device("Mule-2", kind="rover")
48
+ dev.connect(wifi=True) # or ble=True, serial="/dev/ttyUSB0", radio=("/dev/ttyAMA0", "sik")
49
+ dev.failsafe(timeout=1.8, action="hold")
50
+ max_spd = dev.param("MAX_SPD", 4, min=0.5, max=8, unit="m/s")
51
+
52
+ @dev.on_control
53
+ def drive(c):
54
+ motors.set(speed=c.ry * max_spd.value, turn=c.lx)
55
+
56
+ @dev.on_stop
57
+ def stop():
58
+ motors.brake()
59
+
60
+ while True:
61
+ dev.publish("imu", accel=Vec3(*imu.accel()), gyro=Vec3(*imu.gyro()))
62
+ dev.publish("lidar", points=lidar.scan()) # Nx3, metres
63
+ dev.tick(hz=50)
64
+ ```
65
+
66
+ - Channels: `imu`, `att`, `pos`, `vel`, `gps`, `bat`, `rssi`, `joints`, `tool`,
67
+ `ft`, `thrust`, `rpm`, `temp`, `throttle`, `rocket`, `lidar`, `tracks`, and
68
+ custom channels via `dev.channel(...)`. Each built-in one also has a
69
+ shortcut named like the Arduino and Rust ones (`dev.position(x, y, z)`,
70
+ `dev.rocket_state(...)`…).
71
+ - Links: `wifi`, `ble`, `serial`, `radio` (SiK, LoRa, HC-12, XBee or other:
72
+ rates follow the shared radio profile), and `fallback={"radio": (...)}` for
73
+ a second link that takes over telemetry when the first goes quiet.
74
+ - Bluetooth serial modules: `module=("/dev/serial0", 9600)` for an HM-10 or
75
+ HC-05 on a UART; telemetry follows the baud rate.
76
+ - Video: `dev.camera(0, label="Front")` streams a webcam or Pi camera, or
77
+ serve your own frames with `MjpegServer` and declare it with `dev.video(srv.url)`.
78
+ - Callbacks: `on_control`, `on_mode`, `on_arm`, `on_stop`, `on_reset`, `on_jog`,
79
+ `on_cart`, `on_command`, `on_params_written`, `on_connect`.
80
+ - Pairing: `dev.pair("XXX-XXX")` once. The key and saved parameters live in
81
+ `~/.config/koebelt-link/<id>.json` (override with `KOEBELT_LINK_HOME`).
82
+
83
+ ## Simulator
84
+
85
+ `koebelt-link-sim --kind rover|drone [--pair CODE]` runs a simulated device on
86
+ UDP 47800. It is a reference firmware loop and a way to test the app's real network path.
87
+
88
+ ```bash
89
+ python -m venv .venv && .venv/bin/pip install -e ".[dev]" && .venv/bin/python -m pytest
90
+ ```
@@ -0,0 +1,57 @@
1
+ # koebelt-link (Python)
2
+
3
+ Connect a Raspberry Pi, a Jetson or any computer-driven robot to koebelt/dash.
4
+
5
+ ```bash
6
+ pip install koebelt-link # Wi-Fi (UDP) only, no dependencies
7
+ pip install "koebelt-link[serial,ble]" # USB serial and radios (pyserial), BLE peripheral (bless)
8
+ pip install "koebelt-link[camera]" # dev.camera(): live video through OpenCV
9
+ ```
10
+
11
+ ```python
12
+ from koebelt_link import Device, Vec3
13
+
14
+ dev = Device("Mule-2", kind="rover")
15
+ dev.connect(wifi=True) # or ble=True, serial="/dev/ttyUSB0", radio=("/dev/ttyAMA0", "sik")
16
+ dev.failsafe(timeout=1.8, action="hold")
17
+ max_spd = dev.param("MAX_SPD", 4, min=0.5, max=8, unit="m/s")
18
+
19
+ @dev.on_control
20
+ def drive(c):
21
+ motors.set(speed=c.ry * max_spd.value, turn=c.lx)
22
+
23
+ @dev.on_stop
24
+ def stop():
25
+ motors.brake()
26
+
27
+ while True:
28
+ dev.publish("imu", accel=Vec3(*imu.accel()), gyro=Vec3(*imu.gyro()))
29
+ dev.publish("lidar", points=lidar.scan()) # Nx3, metres
30
+ dev.tick(hz=50)
31
+ ```
32
+
33
+ - Channels: `imu`, `att`, `pos`, `vel`, `gps`, `bat`, `rssi`, `joints`, `tool`,
34
+ `ft`, `thrust`, `rpm`, `temp`, `throttle`, `rocket`, `lidar`, `tracks`, and
35
+ custom channels via `dev.channel(...)`. Each built-in one also has a
36
+ shortcut named like the Arduino and Rust ones (`dev.position(x, y, z)`,
37
+ `dev.rocket_state(...)`…).
38
+ - Links: `wifi`, `ble`, `serial`, `radio` (SiK, LoRa, HC-12, XBee or other:
39
+ rates follow the shared radio profile), and `fallback={"radio": (...)}` for
40
+ a second link that takes over telemetry when the first goes quiet.
41
+ - Bluetooth serial modules: `module=("/dev/serial0", 9600)` for an HM-10 or
42
+ HC-05 on a UART; telemetry follows the baud rate.
43
+ - Video: `dev.camera(0, label="Front")` streams a webcam or Pi camera, or
44
+ serve your own frames with `MjpegServer` and declare it with `dev.video(srv.url)`.
45
+ - Callbacks: `on_control`, `on_mode`, `on_arm`, `on_stop`, `on_reset`, `on_jog`,
46
+ `on_cart`, `on_command`, `on_params_written`, `on_connect`.
47
+ - Pairing: `dev.pair("XXX-XXX")` once. The key and saved parameters live in
48
+ `~/.config/koebelt-link/<id>.json` (override with `KOEBELT_LINK_HOME`).
49
+
50
+ ## Simulator
51
+
52
+ `koebelt-link-sim --kind rover|drone [--pair CODE]` runs a simulated device on
53
+ UDP 47800. It is a reference firmware loop and a way to test the app's real network path.
54
+
55
+ ```bash
56
+ python -m venv .venv && .venv/bin/pip install -e ".[dev]" && .venv/bin/python -m pytest
57
+ ```
@@ -0,0 +1,12 @@
1
+ """koebelt/link: connect drones, robots and test rigs to the koebelt/dash app."""
2
+
3
+ __version__ = "1.0.0"
4
+
5
+ from .device import Channel, Control, Device, Param, Vec3 # noqa: E402
6
+ from .protocol import RADIO_PROFILES, decode, decode_points, encode, encode_points # noqa: E402
7
+ from .transports import LineTransport, RadioTransport, SerialTransport, SocketTransport, Transport, UdpTransport # noqa: E402
8
+ from .video import MjpegServer # noqa: E402
9
+
10
+ __all__ = ["Device", "Vec3", "Control", "Param", "Channel", "Transport", "UdpTransport", "SerialTransport", "RadioTransport",
11
+ "LineTransport", "SocketTransport", "MjpegServer", "RADIO_PROFILES", "encode", "decode", "encode_points", "decode_points",
12
+ "__version__"]