Skip to content
otherworld-devPublic

About

RSIPI is a high-performance, Python-based communication and control system designed for real-time interfacing with KUKA robots using the Robot Sensor Interface (RSI) protocol.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

RSIPI: Robot Sensor Interface for Python

Python 3.10+ License: Apache 2.0 Docs

RSIPI is a Python library for real-time control of KUKA industrial robots via the Robot Sensor Interface (RSI) protocol. The robot controller sends its state over UDP at a configurable cycle rate (4ms at 250Hz or 12ms at 83Hz), and RSIPI sends back position corrections, I/O commands, and Tech parameters. Communication uses XML packets over a dedicated Ethernet link, managed in a separate process so your control logic never blocks the real-time loop.

Full documentation: https://rsipi.otherworld.dev/


Safety Notice

RSIPI directly controls industrial robot motion. Misuse can cause damage or injury.

  • Test offline first using the built-in echo server before connecting to a real robot.
  • Hardware E-stops must be present and functional. RSIPI's software E-stop is not safety-rated.
  • Limit correction ranges via api.safety.set_limit() and KUKA Workspaces.
  • Isolate the RSI network -- use a dedicated Ethernet interface with no external access.
  • Never run unattended without proper risk assessment and safety measures.

Deploying on a real KUKA controller: start with the controller setup guide, then read the hardware findings for what was verified on a real robot and what bit.


Installation

Requires Python 3.10+.

pip install RSIPI

For a development checkout:

# Editable install with the test dependencies
pip install -e ".[dev]"

Quick Start

from RSIPI import RSIAPI, context

# context() returns a config that ships with RSIPI. "joints" is the default:
# the most capable one that works on any 6-axis robot. Pass your own path
# instead once you have a config of your own — it is a required argument
# either way, because it must match what the controller loads.
#
# The SAME context must be on the controller. List the files to copy with:
#     python -c "from RSIPI import context_files; print(*context_files(), sep='\n')"

# Context manager handles cleanup on exit
with RSIAPI(context("joints")) as api:
    api.start()

    if api.wait_for_connection(timeout=10.0):
        # Default rsi_mode="relative": this adds 10mm/cycle to X, re-applied
        # every ~4ms cycle until changed (see "RSI Mode and Rate Limiting"
        # in the guide). For a one-shot offset instead, pass rsi_mode="absolute"
        # to RSIAPI().
        api.motion.update_cartesian(X=10.0)

        # Read current TCP position
        pose = api.motion.get_current_pose()
        print(f"TCP: X={pose['X']}, Y={pose['Y']}, Z={pose['Z']}")
    else:
        print("No robot connection within 10s")

# api.stop() called automatically

Without the context manager:

api = RSIAPI("RSI_EthernetConfig.xml", rsi_mode="relative")
api.start()
api.wait_for_connection()

api.motion.update_cartesian(X=5.0, Y=-3.0)

api.stop()

Documentation

Page What it covers
Controller setup Getting a KRC4 talking to RSIPI: files, network, KRL, first run
Configuration The six shipped contexts, deploy and config_builder
RSI mode and rate limiting Relative vs absolute corrections, cycle time, per-cycle clamps
API guide Every namespace with worked snippets and the generated reference
Testing offline The echo server, dry runs and pytest
Architecture Processes, shared state and the 4 ms cycle
Hardware findings What was verified on a KR 16-2, and what bit
RSI objects All 74 RSI objects and how each reaches KRL

Examples

examples/ holds 18 numbered scripts plus advanced-motion and Python-KRL coordination sets. Every one that moves the robot asks first, and all of them run against the emulator without a robot:

python examples/dry_run.py examples/example_02_send_cartesian.py

The full list: https://rsipi.otherworld.dev/examples/.


How to Cite

If you use RSIPI in academic work, please cite it:

@software{morgan_rsipi,
  author  = {Morgan, Adam},
  title   = {{RSIPI}: Robot Sensor Interface for Python},
  year    = {2026},
  url     = {https://github.com/otherworld-dev/rsi-pi},
  version = {0.3.0}
}

Or in plain text:

Morgan, A. (2026). RSIPI: Robot Sensor Interface for Python (Version 0.3.0) [Computer software]. https://github.com/otherworld-dev/rsi-pi

A CITATION.cff file is included, so you can also use GitHub's Cite this repository button for APA/BibTeX output.


Support This Project

RSIPI is developed and maintained in spare time. If it saves you hours of KUKA head-scratching, consider supporting development:

Bug reports, docs improvements, and pull requests are equally appreciated.


License

Apache License 2.0

About

RSIPI is a high-performance, Python-based communication and control system designed for real-time interfacing with KUKA robots using the Robot Sensor Interface (RSI) protocol.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages