Code Monkey home page Code Monkey logo

bhima's Introduction

Bhima

Code, docs and config for Burning Seed camp Bhima the Dragon artcar bus, Bhima. #burningseed #burningman #artcar

Questions etc. to [email protected]

Summary

  • Software-controlled LED surface for the dragon bus
    • Video player
    • Fledgling API for building Processing-like algorithmic sketches
  • Video import from USB
  • Mobile web app for primary control
  • semi-automatic pixel point detection within a camera field
  • Config file generator for pixelpushers.
  • deployment script for config files
  • Automated LED mapping from camera field
  • Map Editor for composing and fine-editing different mapping scans

Installation

  • Installation on Linux relies on java and libgstreamer being installed (normal on ubuntu) as well as a gstreamer plugin (seemingly not all installed by default) which can be installed with:

sudo apt install default-jdk gstreamer1.0-libav ubuntu-restricted-extras

Architecture

  • Java application
    • Processing used as application API
    • Pixelpusher LED controllers drive lights
  • API module contains common code and interfaces

Building

The main build tool is gradle with a root module and the following submodules:

  • api : common module that contains interfaces and commonly used components between dragonmind and dragonmind-web.
  • dragonmind : main implementation module for driving the dragon LEDs
  • dragonmind-web : web app REST API and web server for client
  • client : react mobile web app that calls REST API

To build with gradle at the command line from the root:

gradle build

Or to build a production distribution that can be deployed with the deployment shell script, run:

gradle dragonmind:distTar

To run tests:

gradle test

To see other build targets (mostly standard gradle things):

gradle tasks

Dependencies

  • java 1.8 : (back off! this is imposed solely by processing which has been a total pain in the neck)
  • processing : library for 2d graphics and application framework
  • processing-video : library that extends processing with the ability to process video files
  • junit : unit testing
  • slf4j : logging API
  • dropwizard : currently only used for REST api and web server for dragonmind-web
  • react, mui : js ui framework for dragonmind-web

TODO

Mobile web app

  • add instructions and status for stick slurper to mobile web app so people can add content
  • add video file uploader
  • security - authentication
  • create simulator client view
    • add to bhima web site?
  • build front-panel on raspberry pi 4
    • low-res landscape touchscreen
    • call REST endpoints
    • decide what UI app to use, must be lightweight:
      • pygame? might be snappiest
      • browser? benefit to be able to run same on mobile phone
    • add server start, stop and restart function
      • decide RPC method here, SSH?
    • start on pi boot,
  • rewrite live video output as a websocket stream
  • make tail of system console log (show on mobile app / front panel)

Main System

  • configure production logging to file
  • make work with recent jdk (jee modules were removed, jaxb etc.)
    • ? can we upgrade dropwizard to fix this?
    • Will upgrading processing help this?
  • fix linux 64 bit native libs result in running video (video scaling is currently wrong)
  • add daemon mode
  • add to SystemInfo (try to be portable):
    • performance metrics: e.g. render time
    • temperatures
    • database size and disk usage
    • network info
    • runtime info e.g. os, ram usage etc.
  • automatic rsync when internet connection is working
    • authenticate computer with a few known wifi APs
    • video directory, logs
    • some indication of most recent sync
  • upgrade from gradle 6.8.1 to 7.x
  • move test pattern into its own Program
  • effect: rotozoomer (tesselation, kaliedoscope)
  • parametised geometric algorithms (e.g. sacred geometry shiz) using pixelpusher processing library
  • effect: mirrorball sparkle scales
  • test shape-aware algorithms, non-rectangular edges e.g. shaded dragon body, shadows, specular highlight
  • enable proper GUI by creating outer swing frame with PApplet component
  • Dynamic runtime config of segment wiring
  • editing of modular maps include rotation, translation, arbitrary quad-skew with retained local coordinates
  • all GUI image scaling with overlay rendering properly registered
  • test ideas: audio-input, accelerometer input, theremin-style control field?
  • better and more flexible server-side video transcoding, shaping, trimming etc. using service wrapping ffmpeg or gstreamer

References

Bookmarks from initial research into using pixelpushers for this project:

Random Notes

The WS2811 LED strips we are using on Bhima use colour order "grb" (green, red, blue) but the per-strip start colour (used if the config option blank_strips_on_idle=1 and when no data is available "for a while") is specified in the orthodox RGB hex value, e.g. FF0000 is full red.

bhima's People

Contributors

christo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

bhima's Issues

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.