# RSIPI โ€“ Robot Sensor Interface Python Integration RSIPI (Robot Sensor Interface Python Integration) is a comprehensive Python package designed to simplify and enhance the integration and control of KUKA robots using the Robot Sensor Interface (RSI). It provides intuitive APIs, real-time data visualisation, dynamic control capabilities, and easy logging, suitable for research, development, and deployment of advanced robotics applications. ## ๐Ÿš€ Features - **Real-Time Control:** Seamless communication with KUKA RSI. - **Dynamic Variable Updates:** Update robot parameters dynamically during runtime. - **CSV Logging:** Record all robot interactions and sensor data for easy analysis. - **Live Graphing:** Real-time visualisation of position, velocity, acceleration, and force. - **Command-Line Interface (CLI):** User-friendly terminal-based robot interaction. - **Python API:** Easily integrate RSIPI into custom Python applications. ## ๐Ÿ“‚ Project Structure ``` RSI-PI/ โ”œโ”€โ”€ src/ โ”‚ โ””โ”€โ”€ RSIPI/ โ”‚ โ”œโ”€โ”€ rsi_api.py โ”‚ โ”œโ”€โ”€ rsi_client.py โ”‚ โ”œโ”€โ”€ network_process.py โ”‚ โ”œโ”€โ”€ config_parser.py โ”‚ โ”œโ”€โ”€ xml_handler.py โ”‚ โ”œโ”€โ”€ rsi_config.py โ”‚ โ”œโ”€โ”€ cli.py โ”‚ โ”œโ”€โ”€ graphing.py โ”‚ โ””โ”€โ”€ test_rsipi.py โ”œโ”€โ”€ RSI_EthernetConfig.xml โ”œโ”€โ”€ setup.py โ””โ”€โ”€ README.md ``` ## โš™๏ธ Installation To install RSIPI, clone the repository and use `pip`: ```bash git clone cd RSI-PI pip install . ``` ## โ–ถ๏ธ Getting Started **Quick example:** ```python from RSIPI import RSIAPI from time import sleep # Initialise RSIAPI api = RSIAPI("RSI_EthernetConfig.xml") # Start RSI communication api.start_rsi() # Dynamically update a variable api.update_variable("EStr", "RSIPI Test") # Log data to CSV api.start_logging("robot_data.csv") sleep(10) # Stop logging and RSI communication api.stop_logging() api.stop_rsi() ``` ## ๐Ÿ’ป Command-Line Interface Start the CLI for interactive robot control: ```bash python src/RSIPI/cli.py ``` Example CLI commands: - `start`: Start RSI communication - `set EStr HelloWorld`: Update variable - `log start data.csv`: Start logging - `graph start position`: Start live graphing - `stop`: Stop RSI communication ## ๐Ÿ“Š Graphing and Visualisation RSIPI supports real-time plotting and analysis: ```python api.start_graphing(mode="position") # Real-time position graph ``` ## ๐Ÿงช Running Tests Tests are provided to verify all functionalities: ```bash python -m unittest discover -s src/RSIPI -p "test_*.py" ``` ## ๐Ÿ“ Citation If you use RSIPI in your research, please cite it: ``` @misc{YourName2025RSIPI, author = {Your Name}, title = {RSIPI: Robot Sensor Interface Python Integration}, year = {2025}, publisher = {GitHub}, journal = {GitHub repository}, url = {https://github.com/yourusername/RSIPI}, } ``` ## ๐Ÿ“š License RSIPI is released under the [MIT License](LICENSE).