Skip to content

Commit 3aa6519

Browse files
committed
2 parents 2b8e636 + 9c7b1dd commit 3aa6519

File tree

1 file changed

+225
-1
lines changed

1 file changed

+225
-1
lines changed

README.md

Lines changed: 225 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,225 @@
1-
# Staubli.py
1+
# Staubli Communication SDK for Python
2+
3+
[![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/banner.png)](https://underautomation.com)
4+
5+
[![PyPI](https://img.shields.io/pypi/dm/UnderAutomation.Staubli?label=PyPI%20Downloads&logo=pypi)](https://pypi.org/project/UnderAutomation.Staubli/)
6+
[![Python](https://img.shields.io/badge/Python-3.7+-blue)](#)
7+
[![SOAP](https://img.shields.io/badge/Protocol-SOAP-orange)](#)
8+
[![Platforms](https://img.shields.io/badge/OS-Windows%20%7C%20Linux%20%7C%20macOS-informational)](#)
9+
10+
### 🤖 Effortlessly Communicate with Staubli Robots from Python
11+
12+
The **Staubli Communication SDK for Python** wraps the native Staubli SOAP stack and exposes a clean, Pythonic API for automation engineers, researchers, and integrators. Use it to supervise industrial robots, orchestrate motion, exchange I/O, and manage VAL 3 applications—all without requiring additional Staubli software licenses.
13+
14+
🔗 **More Information:** [Documentation](https://underautomation.com/Staubli/documentation/get-started-python)
15+
🔗 Available also for **[🟣 .NET](https://github.com/underautomation/Staubli.NET)** & **[🟨 LabVIEW](https://github.com/underautomation/Staubli.vi)**
16+
17+
---
18+
19+
## 🚀 TL;DR
20+
21+
✅ Install the SDK with `pip install UnderAutomation.Staubli`.
22+
✅ Connect to Staubli controllers via the native SOAP protocol.
23+
✅ Control motion, read/write I/O, monitor robots, and manage applications directly from Python.
24+
25+
**Highlights:**
26+
27+
- ⚡ Real-time SOAP communication through the embedded `UnderAutomation.Staubli.dll`
28+
- 🐍 Pythonic wrappers for controllers, parameters, and data objects
29+
- 🔁 Full motion lifecycle & kinematics helpers
30+
- 📡 Access to physical & logical I/Os
31+
- 📦 VAL 3 project and task management
32+
33+
---
34+
35+
## 📦 Installation
36+
37+
```bash
38+
pip install UnderAutomation.Staubli
39+
```
40+
41+
The package bundles the required .NET assemblies and depends on [`pythonnet`](https://github.com/pythonnet/pythonnet) to bridge Python and .NET. Make sure the target machine has a compatible .NET runtime installed.
42+
43+
---
44+
45+
## ✨ Features
46+
47+
### 🔌 Connect to Your Controller
48+
49+
```python
50+
from underautomation.staubli.staubli_controller import StaubliController
51+
from underautomation.staubli.connection_parameters import ConnectionParameters
52+
53+
controller = StaubliController()
54+
parameters = ConnectionParameters("192.168.0.1")
55+
56+
parameters.soap.enable = True
57+
parameters.soap.user = "default"
58+
parameters.soap.password = "default"
59+
60+
controller.connect(parameters)
61+
```
62+
63+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/Connect.jpg)
64+
65+
---
66+
67+
### 🔍 Explore System Information
68+
69+
- List robots: `controller.soap.get_robots()`
70+
- Inspect controller parameters: `controller.soap.get_controller_parameters()`
71+
- Retrieve DH parameters: `controller.soap.get_dh_parameters(robot=0)`
72+
73+
```python
74+
robots = controller.soap.get_robots()
75+
controller_params = controller.soap.get_controller_parameters()
76+
dh = controller.soap.get_dh_parameters(robot=0)
77+
```
78+
79+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/ControllerInfo.jpg)
80+
81+
---
82+
83+
### 📍 Track Positions & Joints
84+
85+
- Cartesian pose + joints: `controller.soap.get_current_cartesian_joint_position()`
86+
- Joint-only feedback: `controller.soap.get_current_joint_position()`
87+
88+
```python
89+
cartesian = controller.soap.get_current_cartesian_joint_position(robot=0)
90+
print(cartesian.joints_position)
91+
```
92+
93+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/CurrentPosition.jpg)
94+
95+
---
96+
97+
### 🧠 Kinematics Helpers
98+
99+
- Forward kinematics: `controller.soap.forward_kinematics(robot, joints)`
100+
- Inverse kinematics: `controller.soap.reverse_kinematics(robot, joints, target, config, joint_range)`
101+
102+
```python
103+
joints = controller.soap.get_current_joint_position(robot=0)
104+
forward = controller.soap.forward_kinematics(0, joints)
105+
joint_range = controller.soap.get_joint_range(robot=0)
106+
reverse = controller.soap.reverse_kinematics(0, joints, forward.position, forward.config, joint_range)
107+
```
108+
109+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/Kinematics.jpg)
110+
111+
---
112+
113+
### ⚙️ Motion Control Lifecycle
114+
115+
- Power management: `controller.soap.set_power(True)`
116+
- Motion primitives: `move_l`, `move_jc`, `move_jj`, `move_c`
117+
- Lifecycle control: `stop_motion`, `reset_motion`, `restart_motion`
118+
119+
```python
120+
from underautomation.staubli.soap.data.motion_desc import MotionDesc
121+
from underautomation.staubli.soap.data.frame import Frame
122+
123+
mdesc = MotionDesc()
124+
mdesc.velocity = 250
125+
126+
frame = Frame()
127+
frame.px, frame.py, frame.pz = 300, 0, 450
128+
129+
controller.soap.set_power(True)
130+
controller.soap.move_l(0, frame, mdesc)
131+
```
132+
133+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/Motion.jpg)
134+
135+
---
136+
137+
### 📡 Physical & Logical I/O Management
138+
139+
- Discover I/Os: `controller.soap.get_all_physical_ios()`
140+
- Read states: `controller.soap.read_ios([...])`
141+
- Write outputs: `controller.soap.write_ios([...], [...])`
142+
143+
```python
144+
physical_ios = controller.soap.get_all_physical_ios()
145+
controller.soap.write_ios(["out1"], [1.0])
146+
```
147+
148+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/PhysicalIos.jpg)
149+
150+
---
151+
152+
### 📦 Application & Project Control
153+
154+
- Load projects: `controller.soap.load_project("Disk://project.pjx")`
155+
- Inspect VAL apps: `controller.soap.get_val_applications()`
156+
- Control lifecycle: `stop_application()`, `stop_and_unload_all()`
157+
158+
```python
159+
controller.soap.load_project("Disk://project.pjx")
160+
applications = controller.soap.get_val_applications()
161+
controller.soap.stop_and_unload_all()
162+
```
163+
164+
![UnderAutomation Staubli communication SDK](https://raw.githubusercontent.com/underautomation/Staubli.NET/refs/heads/main/.github/assets/ValApplications.jpg)
165+
166+
---
167+
168+
### 🔁 Task Supervision
169+
170+
- List VAL tasks: `controller.soap.get_tasks()`
171+
- Control execution: `task_suspend`, `task_resume`, `task_kill`
172+
173+
```python
174+
tasks = controller.soap.get_tasks()
175+
controller.soap.task_kill(tasks[0].name, tasks[0].created_by)
176+
```
177+
178+
---
179+
180+
## ✅ Compatibility
181+
182+
- **Controllers:** CS8, CS9
183+
- **Operating Systems:** Windows, Linux, macOS
184+
- **Python:** 3.7+
185+
- **Dependency:** pythonnet 3.0+
186+
187+
---
188+
189+
## 📜 License
190+
191+
**⚠️ Commercial license required**
192+
🔗 [View EULA](https://underautomation.com/Staubli/eula)
193+
194+
Register your license at runtime with:
195+
196+
```python
197+
from underautomation.staubli.staubli_controller import StaubliController
198+
199+
license_info = StaubliController.register_license("Your Company", "XXXX-XXXX")
200+
print(license_info.state)
201+
```
202+
203+
---
204+
205+
## 🤝 Contributing
206+
207+
You're welcome to:
208+
209+
- Submit issues & pull requests
210+
- Share feature suggestions
211+
- Help improve documentation & samples
212+
213+
👉 [Contribute on GitHub](https://github.com/underautomation/Staubli.py)
214+
215+
---
216+
217+
## 📬 Need Help?
218+
219+
- 📚 [Documentation](https://underautomation.com/Staubli/documentation)
220+
- 📩 [Contact Support](https://underautomation.com/contact)
221+
222+
---
223+
224+
[⭐ Star the repo if useful](https://github.com/underautomation/Staubli.py/stargazers)
225+
[👁️ Watch for updates](https://github.com/underautomation/Staubli.py/watchers)

0 commit comments

Comments
 (0)