Skip to content
/ bhima Public

Code for Bhima the Dragon bus (Burning Man / Burning Seed art car) LEDs, mobile web app, auto mapping, etc.

License

Notifications You must be signed in to change notification settings

christo/bhima

Repository files navigation

Bhima

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

Questions etc. to bhima@chromosundrift.com

Summary

  • Software-controlled LED surface with warped diamond mesh 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.

About

Code for Bhima the Dragon bus (Burning Man / Burning Seed art car) LEDs, mobile web app, auto mapping, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published