120 lines
2.9 KiB
Markdown
120 lines
2.9 KiB
Markdown
# 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 <your-repo-url>
|
||
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). |