Git Product home page Git Product logo

uniduc_robo_manipulator's Introduction

Robot management suite for Uniduc

The suite contains 3 sub projects:

  • Daemon service on robot: Communicate with management hub via web socket. Allow remote control, status report and maintenance.
  • Management hub: Manage robots via web sockets. Provide API to clients.
  • Clients: TBD, but initial choice was to design with Figma and export to Flutter code, then build crossplatform clients from that. Ideally, the clients should be available on web, mobile, desktop and optionally on home-grown handheld device specialized for Uniduc's products (for best support experience).

Daemon service and management hub is developed using python as main programming language to ease code maintenance and integration with development of robot's intelligence.

Important notice

Currently the deploy feature is not ready, so before running the service or management hub on target machine, execute the script setup_dev_environment.sh to install poetry and load dependencies.

./setup_dev_environment.sh

The ability to change port of management hub is also broken, so the port will always be 55271 (or any other port you see in the log when management hub is starting). Until the problem is resolved, please be notice of this minor bug.


Management hub

Setting up database

API routes require authorization to access so user information must be stored in database. Before using management hub, database needs to be initiated. Follow the steps bellow to setup development database:

cd ./hub
FLASK_APP=hub.py poetry run flask shell

When inside the shell, execute commands below to setup fake database

from hub import db, User, Robot, RoboticRole, RobotUser
db.drop_all()
db.create_all()
User.generate_fake(10)
Robot.generate_fake()
RoboticRole.insert_roles()
RobotUser.generate_fake()
quit()

Running

Change dir to ./hub and execute the following:

# Install required dependencies
sudo ./install_dependencies.sh
# Provide the HUB_ADDR with only the IP, HUB_PORT with the port and run
HUB_ADDR=0.0.0.0 HUB_PORT=5000 poetry run python3 src//hub.py

Didn't work?: refer to the general notice to ensure poetry is installed and all dependencies are loaded.

Main dependencies to refer to for development:

  • Flask: Lightweight web server with extensibility, chosen because this is the one familiar with ML/DL practitioners. [Documentation]
  • Flask-socketio: Integrate SocketIO to server. [Documentation]

For detailed documentation on this sub-project, see here

Daemon service:

Running

Note: management hub must be started first in order to let service connect.

To run the service in development mode, change dir to ./automata and execute the command below:

# Provide correct http address and port to management hub via environment variables, example: http://localhost
# Also, change the serial number of the robot via enviroment variable `SERIAL_NUMBER`
HUB_ADDR=http://localhost HUB_PORT=5000 SERIAL_NUMBER='ultron' poetry run serve

Didn't work?: refer to the general notice to ensure poetry is installed and all dependencies are loaded.

Main dependencies to refer to for development:

  • python-socketio: For communication with management hub. [Documentation]
  • pyserial: For communication via serial connection with embedded boards such as Arduino, which will control actuator, reading sensors, etc...

[ ] TODO: Additionally, this sub-project contains a small python library for streaming the annotated camera image to udp stream using GStreamer.

For detailed documentation on this sub-project, see here

Clients

TBD

uniduc_robo_manipulator's People

Contributors

innoobwetrust avatar

Watchers

 avatar  avatar

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.