Giter Club home page Giter Club logo

anyloop's Introduction

anyloop

Simple, extensible, plugin-based feedback loop software, with a primary focus on supporting adaptive optics applications.

For now, anyloop aims to support:

  • Linux (though it may be compatible with other POSIX systems)
  • x86-64 and AArch64
  • GCC and Clang

Anyloop is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not distributed with this repository, you can obtain one at http://mozilla.org/MPL/2.0/.

Installing

You will need the following packages to compile and run anyloop from source:

  • meson
  • pkgconf
  • json-c
  • gsl

For example:

# archlinux (TODO: AUR package)
sudo pacman -S --asdeps meson pkgconf json-c gsl
# alpine
doas pkg add meson pkgconf json-c json-c-dev gsl gsl-dev
# raspbian
sudo apt install meson pkgconf libjson-c5 libjson-c-devel libgsl25 libgsl-devel

Once you have satisfied dependencies, build anyloop with meson:

meson setup build
meson compile -C build
sudo meson install -C build

Uninstalling

Soon, anyloop will at least be an AUR package so those using Archlinux can simply uninstall via pacman. If you installed with meson, manually wipe the /opt/anyloop directory and the binary at the path returned by which anyloop.

How it works

Inspired by multimedia frameworks like PipeWire and GStreamer, anyloop implements a pipeline. Unlike those more complex frameworks, anyloop is much simpler and more generic. Devices (elements of the pipeline) are arranged and processed linearly, each of them reading and writing to the data currently in the pipeline state.

See conf.md for documentation on how to configure anyloop's pipeline, and devices.md for information on how devices work.

anyloop's People

Contributors

imyxh avatar wooosh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

anyloop's Issues

clamp device

Some hardware (cough, Alpao) might be very unhappy if values that are supposed to be AYLP_U_MINMAX are actually greater than 1 in magnitude.

We should add a device that clamps values within given bounds. Make sure to check the compiled code, and possibly special-case clamping to ±1 for optimization.

Alternatively, maybe this is an aylp_asdk_dm issue, and we should just do the check there. Comes down to the performance comparison and how often we expect to want to clamp things.

unit testing

I just pushed some very simple unit testing (written in sh). However, it just crossed my mind that we should really migrate to Julia's Test library for this; it'd be much simpler and more powerful!

multiple states and faster ipc

So, two related things:

  1. Sometimes a loop might want to have multiple vectors/matrices/etc.; for example, maybe device A wants to output two things which are then read by devices B and C, or maybe device D wants to send something to device F, but without replacing the main pipeline state because device E needs it too.
  2. The current paradigm for doing IPC between anyloop and e.g. a plotting program in Julia is to use a named pipe. However, this has two disadvantages:
    1. named pipes have a limited buffer size, so Julia will eventually start blocking anyloop
      • this is good for applications where we don't want to miss data, but not for e.g. a realtime view of a matrix
    2. named pipes involve copying to kernel space and back, which can be slow.

My current proposal is to fix both of these issues by using proper mmaped shared memory. There are a few considerations for this, however:

  1. We can't use pointers in shared memory.
  2. Care will have to be taken with regards to allocating GSL objects to make their underlying data reside in shared memory.
  3. We probably want mutexes too.
  4. Julia will need a package or something.

optionally remove piston from von Kármán stream

I bet piston is eating a ton of our stroke when running turbulence simulation, which is not very useful.

We should add an option to remove piston from the stream, or perhaps add a device that can remove piston from the global state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.