Git Product home page Git Product logo

lava-peripherals's Introduction

Lava Peripherals

Lava-peripherals is a library to the open-source framework Lava that adds support for peripheral devices such as cameras or robotic actuators. Lava enables users to develop neuro-inspired applications and map them to neuromorphic hardware. It provides tools and abstractions to develop applications that fully exploit the principles of neural computation.

Content

  • Dynamic Vision Cameras
    • Metavision
    • Inivation (coming soon)
  • Intel RealSense cameras
  • Robotic actuators (to be planned)

Dependencies

Lava-peripherals currently requires Linux and does not support Windows or MacOS.

Third-party dependencies

Lava-peripherals is flexible with the dependency on the libraries for the peripheral hardware and requires only those to be installed which are used.

PropheseeCamera

The PropheseeCamera Process, requires the metavision-sdk v4.0.0 or newer to be installed.

RealSense

The RealSense Process, requires the Intel® RealSense™ SDK v2.0 and the Python wrapper pyrealsense2 to be installed.

Python dependencies

Lava-peripherals requires Python version 3.9 or newer; for installation either pip or poetry is required.

Installation

Linux

cd $HOME
curl -sSL https://install.python-poetry.org | python3 -
git clone https://github.com/lava-nc/lava-peripherals.git
cd lava-peripherals
poetry config virtualenvs.in-project true
poetry install

# in order to find metavision-sdk
sed -i "s/include-system-site-packages\ =\ false/include-system-site-packages\ =\ true/g" .venv/pyvenv.cfg

source .venv/bin/activate
pytest

## See FAQ for more info: https://github.com/lava-nc/lava/wiki/Frequently-Asked-Questions-(FAQ)#install

More information

For more information visit http://lava-nc.org or the Lava-nc on GitHub. ​

Stay in touch

To receive regular updates on the latest developments and releases of the Lava Software Framework please subscribe to our newsletter.

lava-peripherals's People

Contributors

dependabot[bot] avatar mgkwill avatar philippplank avatar weidel-p avatar hexu33 avatar gkarray avatar seowwj avatar

Stargazers

Tim Kersey avatar  avatar

Watchers

 avatar Tim Shea avatar Mathis Richter avatar E. Paxon Frady avatar Risbud, Sumedh avatar  avatar  avatar Yan Meng avatar  avatar

lava-peripherals's Issues

Stream audio from a microphone peripheral

As an application developer, I want to be able to stream audio efficiently to Lava processes from a microphone attached to my PC.

Conditions

  • A process called Microphone or StreamingMicrophone or something like that exists.
  • The process can accept parameters for the device id, sampling rate, bit format, etc.
  • A PyProcessModel for the process exists that will start recording audio using an existing, well-designed audio library such as PyAudio. The selected audio library must work on Ubuntu, and ideally should also work on Windows and Mac. Properly configuring the audio library may be considered out of scope for this issue, although it should not be excessively difficult to do so.
  • The PyProcessModel should implement an appropriate buffering algorithm, such as pushing audio chunks into a non-blocking queue or ring buffer.
  • When run on a standard x86 CPU, the process model should not use more than 10% CPU time on a single core, and no audio samples should be dropped.

Use LFS for images

In order to keep the repository small, we should start using LFS for large files and images.

Input sources

User story

As a Lava user, I want to be able to use various input sources that are relevant for neuromorphic applications.

Conditions of satisfaction

  • A Lava Process that reads clock-based audio from files is available.
  • A Lava Process that reads clock-based RGB images from files is available.
  • A Lava Process that reads clock-based RGBD images (captured with RealSense camera) from files is available.
  • A Lava Process that reads clock-based audio from sensors is available.
  • A Lava Process that reads clock-based RGB images from sensors is available.
  • A Lava Process that reads clock-based RGBD images (captured with RealSense camera) from sensors is available.
  • A Lava Process that reads event-based audio (captured with Inivation cochlea) from files is available.
  • A Lava Process that reads event-based images (captured with Inivation retina) from files is available.
  • A Lava Process that reads event-based images (captured with Prophesee retina) from files is available.
  • A Lava Process that reads event-based audio (captured with Inivation cochlea) from sensors is available.
  • A Lava Process that reads event-based images (captured with Inivation retina) from sensors is available.
  • A Lava Process that reads event-based images (captured with Prophesee retina) from sensors is available.

Stories

  • Lava Process for clock-based audio (files + sensor)
  • Lava Process for clock-based RGB images (files + sensor)
  • Lava Process for clock-based (RealSense) RGBD images (files + sensor)
  • Lava Process for event-based (Inivation) audio (files + sensor)
  • Lava Process for event-based (Inivation) images (files + sensor)
  • Lava Process for event-based (Prophesee) images (files + sensor)

ROS interface

User story

As a Lava user, I want to be able to interface with ROS.

Conditions of satisfaction

  • Users can subscribe to ROS topics and receive from it within Lava.
  • Users can publish to ROS topics and send to it within Lava.

RealSense Process reading from files align_depth_to_bgr

At the moment, instantiating a RealSense Process in the mode that reads from files, with the align_depth_to_bgr parameter set to True throws a NotImplementedError.

If this feature is to be supported, it needs to be implemented.
If not, a comprehensive error message should clearly state that this is not possible.

Stream data from a client process on one device to a server process on a remote device.

As a roboticist, I want to be able to launch a Lava process on my local machine which will connect to a Lava process running on a remote machine. The two processes will exchange data of a pre-defined format, e.g. numpy arrays, at each timestep.

Conditions of Satisfaction:

  • When launched, the client process will attempt to initiate a connection to the server process. If the connection fails within a given time period, the client process will try again up to a certain number of times, or indefinitely. Thus, the client process will effectively wait until the server process is available. The client process may either block the rest of the process graph until a connection is made, or allow the rest of the process graph to continue unaffected.
  • When launched, the server process will listen on a given port / network address for client connections. The server process may either block until a connection is made, or allow the rest of the process graph to continue unaffected.
  • When the client process successfully connects to the server process, it will send a pre-defined message format, consisting of e.g. a numpy array and it will also receive a pre-defined message format on each timestep.
  • The above behaviors should be implemented by a client PyProcessModel and a server PyProcessModel. In the future, it may be possible to add additional process models such as a CProcessModel or an NcProcessModel.

Additional Comments

This feature request is created on request and a prototype will be implemented by Ronan Sangouard and @tim-shea.

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.