Skip to main content

Platform for digital twin robotics and mechatronics systems

Project description

RLab - Robotics Laboratory Platform

A comprehensive platform for digital twin robotics and mechatronics systems.

Overview

RLab provides a complete environment for building, deploying, and managing digital twin systems. It orchestrates multiple containerized services to deliver a full-stack robotics development and simulation platform.

Platform Components

  • Neuroid Frontend (Port 3006): Modern React-based web UI for system management
  • Memgraph Server (Port 3001): Graph database connection layer for digital twin state
  • RLab SDK (Ports 8080, 9000): C++ runtime for digital twin processes with ROS2 integration
  • Terminal (Port 3003): Web-based terminal access to rlab-runtime CLI
  • ComfyUI (Port 8188): Visual workflow builder with Pneumatic Kit integration

Installation

pip install rlab-runtime

Or install in development mode:

git clone https://github.com/rosversity/rlab.git
cd rlab
pip install -e .

Quick Start

1. Setup the Platform

Using production images from registry (default)

rlab platform setup

Or using local development images

rlab platform setup --dev


### 2. Login to Docker Registry (if using private images)

```bash
rlab platform login --username <user> --token <ghp_token>

This will:

  • Check Docker installation
  • Create necessary directories
  • Generate configuration files
  • Setup Docker Compose with all services

2. Start the Platform

rlab platform start

Access the platform:

  • Frontend: http://localhost:3006
  • Memgraph Server: http://localhost:3001
  • Core API: http://localhost:8080
  • SDK API: http://localhost:9000
  • Terminal: http://localhost:3003
  • ComfyUI: http://localhost:8188

3. Load and Run a .nuero Product File

Load a .nuero product file and run the digital twin:

rlab platform load /path/to/pneumatic-kit.nuero --port 8080

This will:

  • Copy the .nuero file to the rlab-sdk container
  • Execute the rlab_runtime binary with the product file
  • Start the digital twin server on the specified port

4. Manage the Platform

# View logs
rlab platform logs -f              # Follow all logs
rlab platform logs -s rlab-sdk     # View specific service logs

# Check status
rlab platform status

# Stop the platform
rlab platform stop

# Restart the platform
rlab platform restart

# Open web interface
rlab platform ui

# Clean up (removes all data)
rlab platform cleanup

CLI Commands

Platform Management

rlab platform setup [--dev]           # Setup RLab platform
rlab platform login -u -t [-r]        # Login to Docker registry
rlab platform start [-d]              # Start all services (detached)
rlab platform stop                    # Stop all services
rlab platform restart                 # Restart all services
rlab platform status                  # Show platform status
rlab platform logs [-f] [-s SERVICE]  # View logs
rlab platform load FILE [--port PORT] # Load and run .nuero file
rlab platform ui                      # Open web interface
rlab platform cleanup                 # Remove all RLab data

Digital Twin Operations

rlab project     # Project management operations
rlab entity      # Entity hierarchy management
rlab process     # Process design and execution
rlab model       # Model component management
rlab twin        # Twin dashboard management
rlab shadow      # Shadow API management
rlab status      # Show complete system status
rlab sync        # Synchronize with backend server
rlab validate    # Validate project configuration

.nuero File Format

A .nuero file is a compressed archive containing product-specific components for digital twin robotics systems:

pneumatic-kit.nuero
├── product.json              # Product metadata
├── implementations/          # C++ plugins (.so files)
│   ├── libproduct_impl.so
│   └── libsystem_impl.so
├── visualization/            # RViz/URDF files
│   ├── urdf/
│   │   └── robot.urdf
│   └── rviz/
│       └── config.rviz
├── configs/                  # Product configurations
│   ├── plc_config.json
│   └── physics_config.json
└── processes/                # Process definitions
    ├── main.cpp
    └── config/

product.json Example

{
  "name": "pneumatic-kit",
  "version": "1.0.0",
  "type": "mechatronics-station",
  "description": "Pneumatic Kit Digital Twin",
  "author": "RosVersity",
  "components": {
    "products": ["PneumaticKitProduct"],
    "systems": ["PneumaticSystem", "ElectricalSystem", "ControlSystem"],
    "assets": ["SACAsset", "SSVAsset", "DACAsset", "DSVAsset"]
  }
}

Architecture

┌─────────────────────────────────────────────────────┐
│         RLab Platform (Docker Compose)              │
├─────────────────────────────────────────────────────┤
│                                                     │
│  ┌─────────────┐  ┌──────────────┐                  │
│  │  Frontend   │  │   Memgraph   │                  │
│  │  (React)    │  │   Server     │                  │
│  │  :3006      │  │   :3001      │                  │
│  └─────────────┘  └──────────────┘                  │
│                                                     │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────┐  │
│  │  RLab SDK   │  │   Terminal   │  │ ComfyUI  │  │
│  │  (C++/ROS2) │  │   (Node.js)  │  │ (Python) │  │
│  │  :8080,9000 │  │   :3003      │  │  :8188   │  │
│  └─────────────┘  └──────────────┘  └──────────┘  │
│                                                     │
└─────────────────────────────────────────────────────┘
                       ↓
           Load .nuero file via CLI
                       ↓
┌─────────────────────────────────────────────────────┐
│       Product-Specific Components                   │
├─────────────────────────────────────────────────────┤
│  - C++ Implementations (ROS2 plugins)               │
│  - Visualization (URDF, RViz configs)               │
│  - Configurations (PLC, Physics, etc.)              │
│  - Process Definitions                              │
└─────────────────────────────────────────────────────┘

Requirements

  • Docker: >= 20.10
  • Docker Compose: >= 2.0
  • Python: >= 3.8
  • OS: Linux (Ubuntu 20.04+)

For GPU support (ComfyUI):

  • NVIDIA GPU with CUDA support
  • nvidia-docker2

Development Mode

Using Local Development Images

# Setup with local dev images
rlab platform setup --dev

This uses local images:

  • docker-frontend:latest
  • docker-memgraph-server:latest
  • docker-fastapi:latest
  • docker-terminal:latest
  • rosversity/rlabsdk:dev
  • pneumatic-kit-viz:latest

Using Production Images

# Setup with production images from registry
rlab platform setup --prod

This uses registry images:

  • ghcr.io/rosversity/nueroid_frontend/dtide-frontend:latest
  • ghcr.io/rosversity/nueroid_frontend/dtide-memgraph-server:latest
  • ghcr.io/rosversity/rlab-terminal:sha-200955d
  • ghcr.io/rosversity/rlabsdk:sha-16c5916-development
  • ghcr.io/rosversity/comfyui:pavan-feature-process

Directory Structure

~/.rlab/
├── .env                    # Environment variables
├── docker-compose.yml      # Docker orchestration
├── config/                 # Configuration files
│   └── core.yml
├── data/                   # Persistent data
│   ├── core/
│   ├── uploads/
│   └── comfyui/
├── logs/                   # Application logs
├── products/               # Installed products
└── nuero_files/            # Loaded .nuero files

Troubleshooting

Docker not found

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

Services not starting

# Check logs for all services
rlab platform logs -f

# Check specific service logs
rlab platform logs -s rlab-sdk

# Check platform status
rlab platform status

# Restart services
rlab platform restart

Port conflicts

Edit ~/.rlab/.env or use environment variables:

export ROS_DOMAIN_ID=43
export MEMGRAPH_HOST=192.168.1.100  # For remote Memgraph server
rlab platform start

Container keeps restarting

# View container logs
rlab platform logs -s rlab-sdk

# Check Docker container status
docker ps -a | grep rlab

Integration with External Systems

Connecting to Remote Memgraph Server

The platform supports connecting to a remote Memgraph database server:

# Set the Memgraph host before starting
export MEMGRAPH_HOST=192.168.1.100
rlab platform start

The memgraph-server service will connect to bolt://${MEMGRAPH_HOST}:7687

License

MIT License - see LICENSE file for details

Support

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.

Acknowledgments

Built with:

  • ROS2 Humble
  • React + Vite
  • Memgraph
  • ComfyUI
  • Docker

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rlab_runtime-0.1.2.tar.gz (72.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rlab_runtime-0.1.2-py3-none-any.whl (85.1 kB view details)

Uploaded Python 3

File details

Details for the file rlab_runtime-0.1.2.tar.gz.

File metadata

  • Download URL: rlab_runtime-0.1.2.tar.gz
  • Upload date:
  • Size: 72.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for rlab_runtime-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3a42de54c6eab83f949f9b6900863e809e33a3bfb695a22d88866d04a44ee38b
MD5 ab50fb6a2bc7ddac2fe3242cdc6867e9
BLAKE2b-256 8a9a1995fd88d2cc0d8c7ad160cd7c5f1108c0ef0089feb0fac4d6f764ff21f6

See more details on using hashes here.

File details

Details for the file rlab_runtime-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rlab_runtime-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 85.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for rlab_runtime-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90bce44c8cd2eec6f5c68a0ef55e44073d872e0bfec6a35b181135d5f84e0138
MD5 9593f7e534e72861f5ceb1bf666ea971
BLAKE2b-256 aef7fa904db6c8428b0456768ee2530eb46863b2a1d47f191164081b3227ccb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page