Skip to content

This repo archives obsolete code that was supposed to be merged in the main repo, but is too distant now.

Notifications You must be signed in to change notification settings

CoderBotOrg/backend-legacy

Repository files navigation

CODERBOT V4 (Work in Progress)

Description

CoderBot is a programmable robot with educational purpose. It is based on the Raspberry Pi microcomputer, it uses it's GPIOs to control motors or servos in order to move himself. It uses the Raspberry Pi Camera for remote monitor and artificial vision. It is programmable using a function blocks programming environment, based on the Blockly framework.

Version 4.0 is a complete rewrite, still work in progress.

Overall Architecture

Classes:

(Flask server)

  • routes all APIs to corresponding services exported by Classes
  • provides video stream
  • provides static and dynamic files (html, photos, videos)

CoderBot

  • provides 'facade' to all major bot submodules and functions
  • load global configuration

Sensor (superclass)

  • provides I/O low level functions
  • provides low level motor control
  • provides low level "180° servo" motors control

MovementsControl (superclass)

  • provides high level motor control functions, both "DC" and "continuous servo" type
  • provides high level camera assisted motor control functions by passing a dense flow camera sensor only

Sound

  • provides speech synthesis
  • provides audio playback

TODO

Blockly

  • Upgrade to the latest blockly version
  • Write the block's python generator to be compatible with the new Coderbot object (work is started)
  • Write new blocks (like GPIO's sensor blocks, hear blocks, event driven blocks, etc...)
  • Simplify code generation by using decorated classes or subclasses for coderbot.motors calls (to render readable code for childs)
  • Use private user configuration for basic blocks (for default parameters)
  • Rewrite the javascript code generator to use Blockly debugger

Program API

  • Rewrite cleanly the program API
  • Integrate the run/abort program feature (execution is done in a secure environment)
  • Integrate a console log

Web based UI

  • Login available - only if a username.cfg file exists, no password is needed, only one user at a time for now
  • Control like drone page
    • Real time coderbot vision by camera streaming
    • Control the bot motors (forward, backward, left, right)
    • Take pictures or record videos
    • View recorded pictures and videos in a gallery
    • User can choose the streaming definition (HD, SD or LD)
  • Programmation page
    • Use blockly for code scripting
    • Load/Save/Rename/Run/Abort a blockly program
    • Real time coderbot vision by camera streaming while a program runs
  • Configuration page
    • Admin configuration, for CoderBot object specific configuration (default sensors according hardware, video configuration, ...)
      • Basic hardware configuration (camera resolutions/framerate, motors/servos pins configuration)
      • Advanced hardware configuration (add sensors to the default configuration)
      • Basic system configuration (TCP port to UI listen on, system command to use for speech synthesis or other)
      • Users management (add/delete users) for admin only
    • Per-user (basic and advanced) configuration. This is the UI configuration according user's age
      • User can choose advanced or easy mode for configuration and save the choice
      • Path to store pictures and videos recorded by the camera
    • Reset the configuration to the default (by deleting the configuration file content, for now: echo > path_to_user_profil/user.cfg)
  • Allow web UI to be multi user (actually, it's limited to only one user at a time to control the bot) -> need to make config class thread safe

Sensor features

  • Write classes to be called back by image processors:
    • code detection
    • color detection
    • face detection
    • line detection
    • logo detection
    • optical flow detection
    • pedestrian detection
    • path detection
    • signal detection
    • drawing feature on streamed images (to use the print block)
  • Use sensors at demand only (avoid to close all sensors at program's end)

Other features (optionnaly)

  • All TODOs in the code will be treated
  • Wifi configuration helper (via UI web page)
  • Audio hearing by using microphone
  • 3D mapping environment (not sure raspberry can do it alone with only one camera and moves)
  • Review all translation files

Changelog

  • Issue 53, stop camera sensors after program stopped
  • Issue 54, print block don't work. It wanted, but will be comming soon with more than only text messages

About

This repo archives obsolete code that was supposed to be merged in the main repo, but is too distant now.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published