Skip to content

ut-robotics/robot-basketball-manager

 
 

Repository files navigation

Robot basketball manager

Referee’s signals

Robots can connect to basketball manager software over WiFi using WebSocket protocol. Messages use JSON format.

Start

Parameter

Type

Description

signal

String constant

start for start signal.

targets

String array

List of Robot IDs.

baskets

String array

List of basket colors. First item is the basket, in which the first target/robot should throw the balls. Second item is the basket for the second robot and so on.

Examples

Start signal. First robot (Io) should throw into magenta basket and second robot (001TRT) into blue basket.

{
  "signal": "start",
  "targets":  ["Io", "001TRT"],
  "baskets": ["magenta", "blue"]
}

Stop

Parameter

Type

Description

signal

String constant

stop for stop signal.

targets

String array

List of Robot IDs.

Examples

Stop signal for robots with IDs of Io and 001TRT.

{
  "signal": "stop",
  "targets":  ["Io", "001TRT"]
}

Setup

  1. Install node.js

    Version 14+ should work. Newer versions (18+) are recommended.

  2. Install dependencies

    In server directory run npm i.

Usage

Manual command server

  1. In server directory run node manual-command-server.mjs.

  2. In robot’s code create WebSocket client that connects to

    • localhost:8222, if the server and robot’s code is on the same computer;

    • <server computer IP address>:8222, if the server and robot’s code are on different computers. Make sure that server and robot are in the same network.

  3. Open localhost:8220 or <server computer IP address>:8220 in the web browser to send start and stop commands.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.5%
  • CSS 1.7%
  • Other 1.8%