Durin control system
This repository contains Python code that interfaces with the robot Durin, built by the Neurocomputing Systems group at the KTH Royal Instititute of Technology. Please note that this is only the reference implementation for our interface. See below.
Installation
We require a working Python installation with access to pip. After that, installation is straight-forward:
pip install durin
Usage
The interface is meant to be used via Python. More examples can be found in the durin/examples folder.
from durin import *
# The ip address to Durin is 172.16.223.9X, where X is the number of the robot (1, 2, or 5).
durin_ip = "172.16.223.91"
# This connects to durin and displays a user interface (UI)
with DurinUI(durin_ip) as durin:
while True:
# Get observation
(obs, dvs, cmd) = durin.read()
# Do clever things...
# Move durin 100 units left with 0 forward/backward motion and 0 rotation
command = Move(100, 0, 0)
# Send a command to Durin
durin(command)
# ... this loop continues forever!
# You can exit it on your computer by pressing CTRL+C
Sensory data
The durin.read() method will give you access to
- An
Observationfrom the robot sensors object containing.tofTime of Flight sensors.chargeBattery charge
- A 640x480 DVS PyTorch tensor
- This tensor has buffered/stacked events since the last
.read()command. - Note that this is only available if the Durin has a DVS sensor installed
- This tensor has buffered/stacked events since the last
- Replies from the robot, following any
Pollcommands- This is specified in the protocol datasheet below - feel free to ignore
Commands
The most important command is Move(x, y, rotation). the x, y, rotation values should be in the interval between [-500, 500].
Custom implementation
You can interface to the microcontroller (sensor + wheel actuation) and DVS microcamera with TCP and UDP. A complete specification is available via Google Drive: https://docs.google.com/spreadsheets/d/11jD30J00-03ygZ6zJaVTnjJRQKfczT-wMIdBdpYMxD4/edit?usp=sharing
Each robot has two IP addresses - one for the microcontroller and one for the DVS controller.
The robots are numbered 1, 2, or 5. Insert those numbers where X is written below:
172.16.223.9X: Microcontroller for sensory data and motor commands172.16.223.10x: Raspberry Pi for streaming DVS data
Contact
Reach out to Juan or Jens if you need anything.
Metadata
Release files for durin 0.0.84
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| durin-0.0.84.tar.gz | 205.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| durin-0.0.84-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 416.1 kB
Release files / durin-0.0.84.tar.gz
| Download URL | durin-0.0.84.tar.gz |
|---|---|
| Size | 205.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ced8980bdd5f92e7ab543c3d4a5dcb312fddf3c618d382137e35d2dfcd2d2261
|
|
BLAKE2b-256 checksum How to use checksums |
0e9b19ca2613fde0998324accf7cd48ca9183143c901d21ff819d5ba8904a6f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / durin-0.0.84-py3-none-any.whl
| Download URL | durin-0.0.84-py3-none-any.whl |
|---|---|
| Size | 210.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e11a8c971765619040fc13d6c859985f63ba27d990527ad9a4bfb51f11d4426
|
|
BLAKE2b-256 checksum How to use checksums |
60965f04f1ce673cfe158ccb6b6a2ce6a318b63eb50b55c6240680fa6e23d768
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|