UNPKG

robotics

Version:

Robotics.dev P2P ROS2 robot controller CLI with ROS telemetry and video streaming

71 lines (57 loc) 6.07 kB
# Robotics.dev ROS2 Robot Controller Connect, Code, and Control ROS robots remotely via peer-to-peer (P2P) connectivity, Teleop remote control, Node.JS and Python SDKs, REST APIs, and VS Code Copilot AI. Deploy your new Robotics.dev P2P apps anywhere (cloud, edge, or on your robots)! Developer REST API documentation available at [https://robotics.dev](https://robotics.dev). Requirements: - Ubuntu (24.04 tested. It may also work on Ubuntu 22 and/or Raspberry OS) - NodeJS (18.20.7 tested on Rpi5 and 22.11.0 tested or x86.) - ROS2 (Jazzy tested.) Supports: - Raspberry Pi Zero and Zero 2 - Raspberry Pi 3,4,5 - Radxa X2L and X4 (via firmata) - Latte Panda (via firmata) - Any Arduino device (via firmata) attached to Intel NUC or NVidia Jetson You need to start by giving your username (i.e. ubuntu) access to your micro controller serial ports by running the following command and rebooting: ```` sudo usermod -a -G dialout ubuntu sudo reboot ```` Next, install robotics NPM module globally, get your robot's ID, and add your robot to your [https://robotics.dev](https://robotics.dev) account. ``` npm install -g robotics robotics id ```` Note: Your robot's ID is stored in ~/.config/configstore/robotics.json Next, add your robotics.dev API token (from the website's API documentation page) to your robot. ```` robotics set --token=1234...6789 ```` Next, connect your robot to robotics.dev, start your motors, and start your camera! ```` robotics connect/disconnect robotics start/stop motors robotics start/stop camera (used with 2D RGB camera) robotics start/stop realsense (used with 3D RealSense stereo depth camera) ```` Your robot is now online. You can teleop remote control it from our Web site, control it with WebSocket and REST APIs, and even write AI apps to sense and control your robot from other non-ROS machines and/or LLMs in the cloud! Checkout our P2P NodeJS Robotics Developer SDK at [https://www.npmjs.com/package/robotics-dev](https://www.npmjs.com/package/robotics-dev). Checkout our P2P Python Robotics Developer SDK at [https://pypi.org/project/robotics-dev/](https://pypi.org/project/robotics-dev/). If you would like to leverage the robotics speak API, install espeak on Linux: ```` sudo apt install espeak ```` Robotics CLI Commands: | Command | Options | Results | |-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------| | robotics help | | Returns this list | | robotics id | | Returns robot’s uuid | | robotics connect | -s 192.168.0.6.3001 (default = robotics.dev ) | Connects robot to cloud or hub | | robotics disconnect | | Disconnects robot to cloud or hub | | robotics set --token=1234...6789 or robotics set --id=1234...6789 | | Sets developer token or robot's id | | robotics start motors | —b rpi (DEFAULT) or -b firmata (Radxa, LattePanda) -p 27,22,17,18 (left to right motor pins) -e 13,2,12,11 (left to right motor encoder pins) -d /dev/ttyACM0 (overrides default device id for radxa and lattepanda) | Starts ROS2 motor controller | | robotics stop motors | | Stops ROS2 motor controller | | robotics start camera | -d /dev/video4 (Realsense RGB) (default device = /dev/video0) -r widthxheight (default resolution = 320x240) -f 15 (fps) | Starts 2D camera stream | | robotics stop camera | | Stops 2D camera stream | | robotics start realsense | -p (enables pointcloud) | Starts 3D realsense ROS streams | | robotics stop realsense | | Stops 3D realsense ROS streams | | robotics status | | Lists services running |