Skip to content

Commit

Permalink
Prepare Conference Release
Browse files Browse the repository at this point in the history
Correct python dependency

Log clock ratio offset

Add simple tof processing script

Fix json formatting

Also log RSSI

Use actual mac address

Set radio delays to 0 to log raw values

Add docker for building image and some refactoring

cro is now an int

Revert "Use actual mac address"

This reverts commit 6b0f994.

Increase initial delay

Add exemplary lille serial output

new processing script

WIP

Add matrix test

Implement basic round ranging

Working on drift compensation

Working on chain ranging

kind of working distance measurements

Half working ranging

Log values using json

WIP

Finish first working inference prototype

Ranging Refactoring

Another working prototype

working base inference

WIP

WIP measurements more logging

Extend readme

Add variant with integers instead of floats

Refactored tof calculation

Use generators

Add trento testbed configuration

log carrierintegrator vals and refactor testbed handling

add missing testbed scripts

Deploy on trento_a

Remove DS_Store

Commit missing base script

Add wip positioning

Test solvability

Add simple history

Add static estimation matrix

Add wip sim script

working on sim

Finish sim for now

Implement TDoA calibration approach

Create eval script and cache simulation results

Working on eval scripts

Working on eval

Preparing experiments

Working on evaluation...

Working on evaluation

Wip last things

Trying to fix variance calculation

Fix correct inclusion of measurements

More eval work

calculate mse and mae difference

export table

wip testbed layouts

finish testbed layout work

change protocol name

correct typo

Name update

Remove unused files

Fix ts overflow correction (off by 1 error)

This could result in a slightly skewed measurements, whenever the timings overflow (about every 17 seconds)

Remove outdated readme information
  • Loading branch information
prathje committed Sep 27, 2023
0 parents commit 96b9a88
Show file tree
Hide file tree
Showing 35 changed files with 6,545 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPORT_DIR="export"
CACHE_DIR="cache"
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/.idea
/build
.DS_Store
/scripts/testbed/__pycache__/trento_b.cpython-38.pyc
/scripts/testbed/__pycache__/trento_b.cpython-310.pyc
/scripts/testbed/__pycache__/trento_a.cpython-310.pyc
/scripts/testbed/__pycache__/lille.cpython-38.pyc
/scripts/testbed/__pycache__/lille.cpython-310.pyc
__pycache__
/scripts/.DS_Store
*.pyc
/cache
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr)
project(uwb_swarm_ranging)

target_sources(app PRIVATE src/main.c src/testbed.c src/nodes.c src/measurements.c src/estimation.c src/uart.c src/history.c)
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM --platform=linux/amd64 zephyrprojectrtos/zephyr-build:latest

# Switch to root for installations
USER root

# Setup essentials
RUN apt-get update -y
RUN apt-get install -y git nano build-essential

# Install dependencies
RUN apt-get install -y gcc-multilib g++-multilib fftw3-dev

WORKDIR /

RUN mkdir -p /app
RUN mkdir -p /zephyr

RUN chown -Rf user:user /app
RUN chown -Rf user:user /zephyr

USER user

WORKDIR /zephyr

ENV ZEPHYR_BASE=/zephyr/zephyr

ENV ZEPHYR_REVISION=v2.7.2
RUN west init --mr $ZEPHYR_REVISION
RUN west update
RUN west zephyr-export

# Switch back to app directory
WORKDIR /app
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ALADIn: Autonomous Linear Antenna Delay Inference on Resource-Constrained Ultra-Wideband Devices

This project contains the PoC for ALADIN: All-to-all Linear Antenna Delay Inference on Ultra-Wideband Devices. It is currently under revision and clean-up.


## Setup
Setup Zephyr and West as usual. As the Decawave Driver does not allow precise timings, we added some overrides which need to be manually applied (see override directory). As an alternative, you can checkout the related [Zephyr feature branch](https://github.com/prathje/zephyr/tree/feature/dwm_1001_ranging_api).
Tested based on commit 6d56b829423056819c4baaafd6c66957752e22f8, while commit eeb4434d2eb5f2c978c59a439688c1f3f46e8bf8 has been reverted due to scheduling exceptions (already included in the overrides).

## Build

Build the project for the Decawave DWM1001 module:

```bash
west build -b decawave_dwm1001_dev --pristine auto
```

You can then flash the boards one by one:
```bash
west flash
```

## Build With Docker

You can also use the included Dockerfile / docker compose file configuration to build (warning this might take a bit of time):

```commandline
docker compose up -d --build
docker compose exec -it build /bin/bash
cp -Rf /app/override/* /zephyr/zephyr/
west build -b decawave_dwm1001_dev --pristine auto
```


To run and deploy on Lille:
```commandline
scp ./build/zephyr/zephyr.elf USER@lille.iot-lab.info:~ && ssh USER@lille.iot-lab.info 'iotlab-experiment submit -d 5 -l lille,dwm1001,1-14,zephyr.elf'
```


In the container you can also easily install script dependencies as follows:
```commandline
pip3 install numpy pandas matplotlib
```
## Scripts

Evaluation scripts are in the scripts directory.


14 changes: 14 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
build:
build: .
volumes:
- ./:/app/
environment:
ZEPHYR_REVISION: "v3.2.0"
tty: true
# command:
# - /bin/sh
# - -c
# - |
# cp -Rf /app/override/* /zephyr/zephyr/
# west build -b decawave_dwm1001_dev --pristine always
Loading

0 comments on commit 96b9a88

Please sign in to comment.