RoboticsCenter SDK — Python API Reference
Complete reference for the roboticscenter Python package. Covers all public classes, methods, attributes, CLI commands, REST endpoints, and environment variables.
Overview
The roboticscenter SDK is the primary interface for connecting robotic devices to the RoboticsCenter platform, streaming sensor data, managing teleoperation sessions, and uploading episode recordings. It ships with a CLI (rc) for quick device connection and a Python API for custom data collection pipelines.
All device classes inherit from BaseDevice and expose the same stream() / stop() interface, making it straightforward to write hardware-agnostic collection scripts.
CLI Commands
The rc CLI is installed automatically with the package. Run rc --help for a full option list.
pip install roboticscenter rc --help
| Command | Description |
|---|---|
| rc devices | Scan all serial and network interfaces for connected hardware. Prints device type, port, firmware version, and status. |
| rc connect | Auto-detect a supported device, create a platform session, start streaming, and open the browser panel. |
| rc connect --device <id> | Force a specific device type. Values: linker-o6, l1. Skips auto-detection. |
| rc connect --port <port> | Bind to a specific serial port instead of scanning. E.g. /dev/ttyUSB0 or COM3. |
| rc connect --mock | Start a synthetic data session with no physical hardware required. All SDK features and the browser panel are fully functional. |
| rc connect --no-browser | Suppress automatic browser launch. Session URL is printed to stdout. |
| rc session <SESSION_ID> | Show session metadata: status, device type, creation time, episode count, deep link, and upload URL. |
Package Import
All public classes are importable directly from the top-level package:
Individual submodules are also importable for advanced use:
from roboticscenter.devices import LinkerO6, L1Robot from roboticscenter.session import SessionManager from roboticscenter.frames import SensorFrame
LinkerO6
AA 55 03 99 protocol at 921600 baud), packet validation, session creation, and real-time frame streaming for left and right hands simultaneously.
LinkerO6.connect(port=None, mock=False) → LinkerO6
Connect to an O6 hand system and return a connected device instance. Creates a platform session automatically and begins sensor streaming.
| Parameter | Type | Description |
|---|---|---|
| port optional | str | None | Serial port path. If None, scans all available ports for an O6 device. E.g. "/dev/ttyUSB0" or "COM3". |
| mock optional | bool | When True, generates synthetic O6 sensor data. No physical device required. Default: False. |
LinkerO6 — Connected device instance. Raises ConnectionError if no O6 device is found and mock=False.
from roboticscenter import LinkerO6 device = LinkerO6.connect() # or with explicit port: device = LinkerO6.connect(port="/dev/ttyUSB0") # or in mock mode: device = LinkerO6.connect(mock=True)
Yield sensor frames as they arrive from the device. Blocks until stop() is called or the device disconnects. Each frame contains a snapshot of both left and right hand state.
| Parameter | Type | Description |
|---|---|---|
| No parameters. | ||
SensorFrame — One frame per sensor packet. frame.data shape: {"left": {"thumb": 0.0, "index": 0.0, "middle": 0.0, "ring": 0.0, "pinky": 0.0}, "right": {...}}. Values are normalized 0.0 (open) to 1.0 (fully closed).
for frame in device.stream(): left = frame.data.get('left', {}) right = frame.data.get('right', {}) print(f"L index: {left.get('index', 0):.3f} R index: {right.get('index', 0):.3f}")
Stop streaming and close the serial connection. Safe to call multiple times. Automatically flushes any buffered frames and finalizes the current recording episode if one is active.
None if no session was created.
https://platform.roboticscenter.ai/session/RC-XXXX-XXXX.
"/dev/ttyUSB0". In mock mode: "mock".
L1Robot
L1Robot.connect(port=None, mock=False) → L1Robot
Connect to an L1 robot and return a connected device instance. In hardware mode, requires a ROS2 environment and the L1 CAN-FD interface to be active.
| Parameter | Type | Description |
|---|---|---|
| port optional | str | None | CAN interface or ROS2 DDS endpoint override. If None, auto-discovers via ROS2 node graph. |
| mock optional | bool | Generate synthetic L1 state data. No ROS2 or physical robot required. Default: False. |
L1Robot — Connected device instance. Raises ConnectionError if the ROS2 interface is unavailable and mock=False.
Yield sensor frames from the L1 robot. Each frame contains the full robot state snapshot.
SensorFrame — See frame.data structure below.
Stop streaming and close the ROS2 / CAN-FD connection. Finalizes any active recording episode.
The frame.data dictionary for an L1Robot frame has the following shape:
{
"joints": {
"left_arm": [j1, j2, j3, j4, j5, j6, j7], # degrees, 7-DOF
"right_arm": [j1, j2, j3, j4, j5, j6, j7], # degrees, 7-DOF
"left_gripper": 0.0, # 0.0 = fully open, 1.0 = fully closed
"right_gripper": 0.0,
},
"base": {
"vx": 0.0, # forward velocity, m/s
"vy": 0.0, # lateral velocity, m/s
"wz": 0.0, # yaw rate, rad/s
},
"lift_height_mm": 1060, # torso lift height in millimetres
"battery_pct": 85.0, # state of charge, 0.0–100.0
"cameras": {
"chest": True, # True if camera stream is active
"wrist_left": False,
"wrist_right": False,
},
}
SensorFrame
device.stream(). All attributes are read-only.
"linker_hand".
"linker_o6". For VLAI L1: "l1".
SessionManager
Instantiate the session manager. RC_PLATFORM_URL defaults to https://platform.roboticscenter.ai but can be overridden via the RC_PLATFORM_URL environment variable.
| Parameter | Type | Description |
|---|---|---|
| base_url optional | str | Platform backend URL. Override for self-hosted deployments or staging environments. |
Create a new teleoperation session on the platform. Returns all credentials needed to begin streaming and open the browser panel.
| Parameter | Type | Description |
|---|---|---|
| device_type | str | SDK device type. E.g. "linker_o6", "l1". |
| device_id optional | str | None | Human-readable device label. Defaults to the platform-assigned device ID for the type. |
| hardware_serial optional | str | None | Physical device serial number. Used for per-device episode attribution in the episode browser. |
dict with keys:
| Key | Type | Description |
|---|---|---|
| session_id | str | Unique session identifier. E.g. "RC-XXXX-XXXX". |
| deep_link | str | Full browser URL for the teleop panel. |
| ws_url | str | WebSocket relay URL for frame streaming. |
| guest_token | str | Short-lived token for unauthenticated browser access to this session. |
| expires_at | str | ISO 8601 expiry timestamp for the session. |
| device_type | str | Echo of the requested device type. |
from roboticscenter.session import SessionManager mgr = SessionManager() session = mgr.create_session("linker_o6", hardware_serial="LBO6-001") print(session["deep_link"]) # → https://platform.roboticscenter.ai/session/RC-XXXX-XXXX
Retrieve current metadata for an existing session.
| Parameter | Type | Description |
|---|---|---|
| session_id | str | The session ID returned by create_session() or rc session. |
dict — Session metadata including status, episode count, streaming state, and deep link. Raises NotFoundError if the session does not exist.
Platform REST API
The REST endpoints below are the underlying HTTP API used by the SDK. Use them for direct integration when the Python SDK is not appropriate (e.g. non-Python agents, embedded systems, or server-side orchestration).
All endpoints are relative to https://platform.roboticscenter.ai. Authentication uses the guest_token or an API key in the Authorization: Bearer <token> header.
Teleop Sessions
-
POST
/api/teleop/sessions/create-sdk
Create a new SDK session. Body:
{"device_type": "linker_o6", "device_id": "...", "hardware_serial": "..."} - GET /api/teleop/sessions/{id}/sdk-info Get session metadata, streaming status, and WebSocket URL for an existing session.
L1 Pipeline
-
POST
/api/l1/sessions/{id}/pipeline/start
Start a data processing pipeline for an L1 session. Returns a
pipeline_id. - GET /api/l1/sessions/{id}/pipeline/status Poll the processing pipeline status for a session.
- GET /api/l1/pipeline/{pipeline_id} Get full pipeline run details by pipeline ID, including per-stage status and output artifacts.
- GET /api/l1/tiers List available processing tier configurations (standard / high-fidelity / research-grade).
Environment Variables
| Variable | Default | Description |
|---|---|---|
| RC_PLATFORM_URL | https://platform.roboticscenter.ai |
Backend URL used by SessionManager and all CLI commands. Override for self-hosted or staging deployments. |
export RC_PLATFORM_URL=https://staging.roboticscenter.aiOr place in a
.env file in the project root — the SDK uses python-dotenv if installed.
Supported Devices
| Device | --device flag |
Protocol | Status |
|---|---|---|---|
| LinkerBot O6 | linker-o6 |
USB Serial — Juqiao AA55 header, 921600 baud | Production |
| VLAI L1 | l1 |
ROS2 / CAN-FD | Production |
Additional devices are added in each release. Check rc devices output for dynamically discovered hardware, or consult the LinkerBot O6 hardware guide for device-specific setup instructions.