Frankweb33/flybrain-robot-bridge

★ 143⑂ 19

Experimental Drosophila-inspired camera-to-robot bridge. Working mock neural backend, optical flow, IMU feedback and UDP motor control. MaleCNS integration planned.

About Frankweb33/flybrain-robot-bridge

Frankweb33/flybrain-robot-bridge is an open-source project on GitHub, mainly written in Python. Experimental Drosophila-inspired camera-to-robot bridge. Working mock neural backend, optical flow, IMU feedback and UDP motor control. It currently holds 143 stars and 19 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #100 with 0 new stars today.

GitHub Repository Details

Repository Frankweb33/flybrain-robot-bridge · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

https://github.com/Frankweb33/flybrain-robot-bridge/blob/HEAD/FlyBrain Robot Bridge — from visual signals to physical motion

FlyBrain Robot Bridge

Connect a Drosophila connectome simulation to a physical robot.

Python 3.11+ Tests License: MIT Stage: proof of concept

Quick start · Demo · Architecture · Roadmap

An experimental interface between a camera, a neural backend and a physical robot. Visual motion and IMU signals feed a small demonstration model; a decoder turns its activity into commands for the left and right sides of a robot.

Try it in 30 seconds. The synthetic demo runs locally without a robot, camera, network connection or connectome download.

[!NOTE]
This repository does not contain a biological brain or a complete emulation of consciousness. The default backend is a small demonstrator. MaleCNS support is an experimental integration target.

What it does

Architecture

Signal flow and IMU feedback

Camera → VisionEncoder → BrainBackend → MotorDecoder → UDP → robot

Robot IMU → UDP telemetry → BrainBackend

See architecture and protocol. The eight groups are left_motion, right_motion, looming, balance_left, balance_right, left_motor, right_motor, and escape. These names describe engineering signals, not identified biological neurons. The model has a small forward-motion bias.

Quick start

Requires Python 3.11+.

git clone https://github.com/Himas1211/flybrain-robot-bridge.git
cd flybrain-robot-bridge
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
python -m flybrain_robot.main --backend mock --synthetic

The default run lasts 300 frames (about 10 seconds) and uses no network or camera.

Mock demo

Synthetic camera, mock activity and decoded commands

*Generated from the actual synthetic encoder, mock backend and motor decoder. This is a visualization of software output, not a physical robot recording.*

python -m flybrain_robot.main --synthetic --dry-run --steps 90
python -m flybrain_robot.main --backend mock --camera 0 --dry-run
python -m flybrain_robot.main --backend mock --video /path/to/your/video.mp4 --dry-run

Bring your own video for the video-file mode. Terminal output includes motion, looming, IMU freshness, motor activity, commands and watchdog state. Synthetic mode uses deterministic frames, fixed simulation time steps and a synthetic IMU oscillation. It is a signal-flow demo, not a robot physics simulation. The printed synthetic Hz is the simulation rate, not a performance benchmark.

Connecting a physical robot

cp config.example.yaml config.yaml

Set robot_ip, pc_port, robot_port and calibrated motor limits.

python -m flybrain_robot.main --camera 0 --config config.yaml --send

The firmware scaffold requires board-specific servo and IMU hooks before it can move a robot. It is intentionally disarmed until those hooks are implemented. No hardware test has been performed.

The PC sends zero commands while telemetry is absent or older than 500 ms. The receiver must independently stop motors after 500 ms without a fresh command. Ctrl+C and normal exit send a best-effort stop packet. UDP delivery is not guaranteed.

MaleCNS integration

MaleCNSBackend checks the configured dataset path and then exits with Not implemented yet. No graph is loaded and no simulated MaleCNS result is fabricated. See integration notes for the proposed extension points.

Repository structure

assets/                       Cover, architecture diagram and recorded mock output
src/flybrain_robot/            CLI, vision, protocol, decoder, configuration
src/flybrain_robot/brain/      Backend interface, working mock, MaleCNS stub
firmware/atom_matrix/          Disarmed ESP32 integration scaffold
examples/                     Synthetic demo and GIF rendering script
tests/                        Protocol, model, decoder, watchdog and CLI checks
docs/                         Architecture, hardware and integration notes
.github/workflows/test.yml    Ruff, pytest and synthetic smoke run

Current limitations

This is an early proof of concept. The model is hand-designed and does not use connectome data. Motion signals are magnitudes in each image half, not a biological directional vision model. Looming is a center-relative optical-flow heuristic and is sensitive to camera motion, lighting and frame rate. It is not collision avoidance. IMU feedback currently uses gyro yaw only. There is no gait generator, physical simulation, interactive dashboard or recorded robot demonstration. UDP has no authentication, reliability or replay protection across process restarts. Firmware is a scaffold and has not been compiled or tested on a board.

Roadmap

Scientific sources

Inspiration and attribution

An independent experimental bridge implementation inspired by open MaleCNS research and community experiments with digital Drosophila models. The connectome and scientific models belong to their original researchers; this project claims no authorship of their discoveries. No third-party project source code or datasets are bundled. Related community projects for further reading:

Check each project's license before reusing any material. Dependency licenses and future dataset terms remain separate from this project's MIT license.

Safety

Start with dry-run, then calibrate with the robot lifted off the ground. Use an independent motor power cutoff and a receiver watchdog. An optical-flow heuristic cannot protect people or equipment. Use a trusted isolated network; firmware integration needs a hardware review before motion is enabled.

Development

ruff check .
pytest -q
python -m flybrain_robot.main --synthetic --dry-run --steps 20

Rebuild the README animation with pip install -e ".[demo]" followed by python examples/render_demo.py. See CONTRIBUTING.md.

License

MIT. Scientific datasets and dependencies retain their own license terms.

GitHub Stars & Activity

143Stars
19Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars143
Forks19
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Daily boardrank #100 · ▲ 0 stars

Related AI Projects

1

TauricResearch / TradingAgents

Python★ 106,809⑂ 20,403▲ 727 stars
2

unclecode / crawl4ai

Python★ 83,629⑂ 8,637▲ 84 stars
3

Panniantong / Agent-Reach

Python★ 82,168⑂ 7,160▲ 960 stars
4

ComposioHQ / awesome-claude-skills

Python★ 75,166⑂ 8,691▲ 70 stars
5

calesthio / OpenMontage

Python★ 59,395⑂ 7,477▲ 273 stars
6

roboflow / supervision

Python★ 50,378⑂ 4,801▲ 217 stars
7

bojieli / ai-agent-book

Python★ 47,802⑂ 5,328▲ 660 stars
8

anthropics / claude-plugins-official

Python★ 36,385⑂ 4,076▲ 56 stars

More AI Rankings