- Install Node.js
- Check-out project:
- Checkout:
git clone https://github.com/oklemenz/RobosenJS.git - Install:
npm install - Test:
npm test - Run:
npm start - Demo:
npm run demo
- Checkout:
- Use CLI:
- Install globally:
npm install -g robosen-js - See Command-Line Interface (CLI) section
- Install globally:
- Use Node.js module:
- Install module:
npm install robosen-js - See Programming section
- Install module:
- REPL for direct command execution
- Control robot via keyboard or game controller
- Perform sequence of commands via natural language prompt or voice
- Perform sequence of joint moves via natural language prompt or voice
- Record and playback sequences of joint movements
- Program using Node.js robot API with JavaScript or TypeScript
- Install globally:
npm install -g robosen-js
Terminal: k1
- Type
Volume 100to change volume - Type
Left Punchto punch left - Type
Left Arm -30%to movenumber: absolute value based movement+/-: relative value based movement%: percentage based movement (0-100%)
- Type
Boogalooto perform dance action- Press any key to stop activity
- Press
Tabfor completion suggestions
Terminal: k1 control
-
Controller:
- Press button
LforLeft Punch - Move Robot:
- Move left stick to control movement
- Move Joints:
- Use DPad to select body parts:
up: Headright: Right Armleft: Left Armdown: None (-> Move Robot)
- Control body parts with
left/rightstick
- Use DPad to select body parts:
- Press button
-
Keyboard:
- Move Robot:
- Use arrow keys to control movement
- Use
delete/pagedownfor side steps
- Move Joints:
- Use
WASDto select body parts:w: Heada: Left Arms: None (-> Move Robot)d: Right Arm
- Use arrow keys to control movement
- Use
spaceto reset position
- Use
- Move Robot:
Details see controller, keyboard and control section in K1/robot.json.
Prerequisites:
- Setup .env specifying
OPENAI_API_KEY
Terminal: k1 prompt
- Type your command in natural language.
- E.g., enter:
Walk forward and punch left
Terminal: k1 prompt joint
- Type your moves in natural language.
- E.g., enter:
Wave your right hand and shake your head
Prerequisites:
- Install additional dependencies
- Setup .env specifying
OPENAI_API_KEY
Terminal: k1 voice
- Speak your command in natural language.
- E.g., say:
Walk forward and punch left
Terminal: k1 voice joint
- Speak your moves in natural language.
- E.g., say:
Wave your right hand and shake your head
Terminal: k1
record <file>unlock head- Move head manually to right
sync- Move head manually to left
syncsave change- Recorded file is located at
recordings/K1/<file>.json run <file>
Terminal: k1 run <file>
- Install module:
npm install robosen-js - Use module:
- ESM:
import { K1 } from "robosen-js";
- CJS:
const { K1 } = require("robosen-js");
- ESM:
- Example usage:
import { K1 } from "robosen-js";
const k1 = new K1();
await k1.on();
await k1.volume(100);
await k1.autoStand(false);
await k1.moveForward();
await k1.leftPunch();
await k1.headLeft();
await k1.leftHand("+40%", 30);
await k1.audio("AppSysMS/101");
await k1.wait(3000);
await k1.end();K1 specification and all commands can be found at K1/robot.json.