Skip to content

💻 Core service that connects to other services and runs the robot code

License

Notifications You must be signed in to change notification settings

AutoSumo/server

Repository files navigation

AutoSumo Server

Core service that connects to other services and runs the robot code.

flowchart TD
    web["🌐 Web Interface"] -->|uploads code| code-server[("💾 Code Server")]
    code-server -->|highlight data| web
    code-server -->|downloads code| bot-server["💻 Bot Server\n(this)"]
    bot-server -->|highlight data| code-server
    bot-server -->|motor instructions| robot["🤖 Robot"]
    robot -->|sensor data| bot-server
    tag-server["📷 Tag Server"] -->|apriltag positions| bot-server
    
    style bot-server stroke-width:2px,stroke-dasharray: 5 5,stroke:#3b82f6
    
    click web "https://github.com/AutoSumo/web"
    click code-server "https://github.com/AutoSumo/code-server"
    click robot "https://github.com/AutoSumo/robot"
    click tag-server "https://github.com/AutoSumo/tag-server"
Loading
demo.mp4

Upon starting, it will:

  • Connect to the code server and download the specified script ID
  • Starts a WebSocket server for the bot to connect to
  • Connects to the WebSocket server hosted by the arena service
  • Connects to the code server highlight websocket to send information about block highlighting
  • Runs the code until any of the following happens:
    • The code finishes
    • The bot leaves the arena
    • Any key is pressed

Usage

Run node single-bot.js <script ID> where <script ID> is the ID provided by the web frontend.

About

💻 Core service that connects to other services and runs the robot code

Topics

Resources

License

Stars

Watchers

Forks