auto-pi-lot / autopilot

Distributed behavioral experiments
https://docs.auto-pi-lot.com
Mozilla Public License 2.0
92 stars 24 forks source link
behavioral-neuroscience neuroscience python

PyPI PyPI pyversions PyPI - Status License: MPL 2.0 Contributor Covenant Twitter Follow

Status:

Documentation Status Travis (.com) branch Coverage Status Jonny Status

Maintenance Mode

2024-01-22

Autopilot is in maintenance-only mode - development has been paused as we take the long way around towards building a new kind of p2p networking module to support a reworked autopilot 2.0. We will write a more detailed blogpost about lessons learned from autopilot soon.

Autopilot is not dead, it is merely resting <3

-jonny

Autopilot

Autopilot Banner Logo

Docs Paper Forum Wiki
Read the Docs Paper Forum Wiki

Autopilot is a Python framework for performing complex, hardware-intensive behavioral experiments with swarms of networked Raspberry Pis. As a tool, it provides researchers with a toolkit of flexible modules to design experiments without rigid programming & API limitations. As a vision, it dreams of bridging the chaotic hacky creativity of scientific programmers with a standardized, communally developed library of reproducible experiment prototypes.

Autopilot was developed with three primary design principles:

Distributed Behavior

Autopilot's premise is simple: to scale experiments, just use more computers.

Autopilot systems consist of multiple "Agents" -- computers with specialized roles in the swarm. One user-facing "Terminal" agent allows a researcher to control many "Pilots," or computers that perform experiments (typically the beloved Raspberry Pi). Each Pilot can coordinate one or many "Children" to offload subsets of an experiment's computational or hardware requirements. Users can use and misuse Autopilot's flexible modules to make whatever agent topology they need <3.

Autopilot System Diagram

Module Overview

Autopilot divides the logical structure of experiments into independent1 modules:

Module
Hardware Agents - Pilot & Terminal Runtime classes that encapsulate a computer/Pi's role in the swarm. Terminals provide the user interface and coordinate subjects and tasks, Pilots do the experiments. Formalizing the Agent API to allow additional agents like Compute or Surveillance agents is a major short-term development goal!
Hardware Hardware - Control your tools! Extensible classes to control whatever hardware you've got.
Hardware Stimuli - Stimulus management and presentation. Parametric sound generation with a realtime audio server built on Jackd. Stubs are present for future development of visual stimuli using Psychopy.
Hardware Tasks - Build experiments! Write some basic metadata to describe data, plots, and hardware and the rest is up to you :)
Hardware Subject - Data management with hdf5 and pyTables. Abstraction layer for keeping obsessive records of subject history and system configuration
Hardware Transforms - Composable data transformations. Need to control the pitch of a sound with a video? build a transformation pipeline to connect your objects
Hardware UI - UI for controlling swarms of Pilots using Qt5/PySide2
Hardware Visualization - (Mostly Prototypes) to do common visualizations

1 a continual work in progress!

Getting Started

All documentation is hosted at https://docs.auto-pi-lot.com

Installation is simple, just install with pip and use Autopilot's guided setup to configure your environment and preferences. The initial setup routine uses a CLI interface that is SSH friendly :)

pip3 install auto-pi-lot
python3 -m autopilot.setup.setup

Autopilot Setup Console

All of Autopilot is quite new, so bugs, incomplete documentation, missing features are very much expected! Don't be shy about raising issues or asking questions in the forum.

Development Status

Jonny is trying to graduate! Autopilot will be slow and maybe a little chaotic until then!

Branch Map

We're working on a formal contribution system, pardon the mess! Until we get that and our CI coverage up, main will lag a bit behind the development branches:

Short-Term

See the short-term development goals in our version milestones:

Long-Term

Autopilot's extended development goals, in their full extravagance, can be found at the Autopilot Development Todo

What's new?

v0.3.0

After much ado, we're releasing Autopilot's first major upgrade. Cameras, Continuous data, DeepLabCut, and a lot more!

Supported Systems

OS

Python Versions

Raspberry Pi Versions