urkit 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {urkit-0.4.0 → urkit-0.4.1}/PKG-INFO +70 -10
- {urkit-0.4.0 → urkit-0.4.1}/README.md +69 -9
- {urkit-0.4.0 → urkit-0.4.1}/pyproject.toml +1 -1
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/__init__.py +1 -1
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/__main__.py +22 -1
- urkit-0.4.1/src/urkit/cli/init.py +83 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/PKG-INFO +70 -10
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/SOURCES.txt +1 -0
- {urkit-0.4.0 → urkit-0.4.1}/setup.cfg +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/cli/__init__.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/cli/colors.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/cli/connection_monitor.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/cli/points.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/cli/teach.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/config.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/connection.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/exceptions.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/geometry.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/__init__.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/base.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/digital.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/presets.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/robotiq.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/gripper/robotiq_preamble.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/io.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/motion.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/points.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/robot.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit/telemetry.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/dependency_links.txt +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/entry_points.txt +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/requires.txt +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/src/urkit.egg-info/top_level.txt +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_exceptions.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_geometry.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_gripper.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_gripper_factory.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_gripper_presets.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_move_sequence.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_points.py +0 -0
- {urkit-0.4.0 → urkit-0.4.1}/tests/test_robot_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: urkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Universal Robots e-Series control toolkit built on ur_rtde
|
|
5
5
|
Author: URKit Contributors
|
|
6
6
|
License: MIT
|
|
@@ -56,12 +56,14 @@ The typical workflow: teach points with the pendant, write a few lines of Python
|
|
|
56
56
|
|
|
57
57
|
- [Quick Start](#quick-start)
|
|
58
58
|
- [Configuration](#configuration)
|
|
59
|
+
- [Create a Config File](#create-a-config-file)
|
|
59
60
|
- [Location](#location)
|
|
60
61
|
- [Keys](#keys)
|
|
61
62
|
- [Gripper Config](#gripper-config)
|
|
62
63
|
- [Saving Config](#saving-config)
|
|
63
64
|
- [Programmatic](#programmatic)
|
|
64
65
|
- [Interactive CLI](#interactive-cli)
|
|
66
|
+
- [Init](#init)
|
|
65
67
|
- [Teach Mode](#teach-mode)
|
|
66
68
|
- [Points Explorer](#points-explorer)
|
|
67
69
|
- [Key Map](#key-map)
|
|
@@ -94,10 +96,33 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
94
96
|
|
|
95
97
|
### Robot Setup (one-time)
|
|
96
98
|
|
|
97
|
-
1. **Network**:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
1. **Network**: Connect your PC to the robot via Ethernet cable (direct) or a switch.
|
|
100
|
+
|
|
101
|
+
First, configure the robot: `☰` → `System` → `System` → `Network`. Set a static IP, e.g., `192.168.1.50` / Subnet `255.255.255.0`.
|
|
102
|
+
|
|
103
|
+
Then set a matching static IP on your PC. The exact IP can be anything, as long as the first three octets match the robot's network and the last octet is different:
|
|
104
|
+
|
|
105
|
+
**Linux**:
|
|
106
|
+
- Open `Settings` → `Network` → click the gear icon next to `Wired`
|
|
107
|
+
- Go to `IPv4` tab → change `Automatic (DHCP)` to `Manual`
|
|
108
|
+
- Enter Address: `192.168.1.1`, Netmask: `255.255.255.0`
|
|
109
|
+
- Click `Apply`, then toggle the connection off and on
|
|
110
|
+
|
|
111
|
+
**macOS**:
|
|
112
|
+
- Open `System Settings` → `Network` → click `Ethernet` (or your adapter)
|
|
113
|
+
- Click `Details...` next to the adapter name → `TCP/IP`
|
|
114
|
+
- Set `Configure IPv4` to `Manually`
|
|
115
|
+
- Enter IP: `192.168.1.1`, Subnet Mask: `255.255.255.0`
|
|
116
|
+
- Click `OK`
|
|
117
|
+
|
|
118
|
+
**Windows**:
|
|
119
|
+
- Open `Settings` → `Network & internet` → `Ethernet`
|
|
120
|
+
- Click the adapter name (e.g., `Ethernet`) at the top
|
|
121
|
+
- Under `IP settings`, click `Edit` → select `Manual`
|
|
122
|
+
- Toggle `IPv4` On, enter IP: `192.168.1.1`, Subnet mask: `255.255.255.0`
|
|
123
|
+
- Click `Save`
|
|
124
|
+
|
|
125
|
+
Verify connectivity: `ping 192.168.1.50`.
|
|
101
126
|
2. **Remote Control**: `☰` → `System` → `Remote Control`: Enable. Press the remote/local button on the pendant.
|
|
102
127
|
3. **Security**: `☰` → `Security` → `Services`: enable RTDE and disable EtherNet/IP, PROFINET, or MODBUS if they're claiming RTDE registers. Save and restart.
|
|
103
128
|
|
|
@@ -122,9 +147,20 @@ robot.gripper.open()
|
|
|
122
147
|
|
|
123
148
|
The typical workflow:
|
|
124
149
|
|
|
125
|
-
1. **
|
|
126
|
-
2. **
|
|
127
|
-
3. **
|
|
150
|
+
1. **Scaffold config.** Run `urkit init` to create a default `config.yaml`.
|
|
151
|
+
2. **Edit it.** Set your robot IP, gripper type, and other settings.
|
|
152
|
+
3. **Teach points.** Run `urkit teach` (auto-loads config) to position the robot and save waypoints.
|
|
153
|
+
4. **Write code.** Load the config and move to points by name:
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from urkit import URRobot
|
|
157
|
+
|
|
158
|
+
robot = URRobot.from_config("config.yaml")
|
|
159
|
+
robot.move_to("home")
|
|
160
|
+
robot.move_to("pick", offset_z=0.05)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
5. **Iterate.** Add more points, tweak your code, repeat.
|
|
128
164
|
|
|
129
165
|
---
|
|
130
166
|
|
|
@@ -132,9 +168,21 @@ The typical workflow:
|
|
|
132
168
|
|
|
133
169
|
URKit uses a YAML config file (`config.yaml`) to persist settings between sessions.
|
|
134
170
|
|
|
171
|
+
### Create a Config File
|
|
172
|
+
|
|
173
|
+
Generate a default config with all options documented:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
urkit init # writes config.yaml in CWD
|
|
177
|
+
urkit init --output station_a.yaml # custom path
|
|
178
|
+
urkit init --force # overwrite if exists
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Edit the generated file with your robot IP and gripper settings.
|
|
182
|
+
|
|
135
183
|
### Location
|
|
136
184
|
|
|
137
|
-
|
|
185
|
+
The CLI auto-loads `config.yaml` from the current working directory. Pass `--config` for a custom path.
|
|
138
186
|
|
|
139
187
|
### Keys
|
|
140
188
|
|
|
@@ -224,7 +272,19 @@ robot = URRobot.from_config({"robot_ip": "192.168.1.50", "gripper": "2f-85"}) #
|
|
|
224
272
|
|
|
225
273
|
## Interactive CLI
|
|
226
274
|
|
|
227
|
-
URKit provides
|
|
275
|
+
URKit provides three CLI tools: **init** to scaffold a config file, **teach** for interactive robot control, and **points** for browsing saved waypoints.
|
|
276
|
+
|
|
277
|
+
### Init
|
|
278
|
+
|
|
279
|
+
Generate a default config file with all options documented:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
urkit init # writes config.yaml in CWD
|
|
283
|
+
urkit init --output station_a.yaml # custom path
|
|
284
|
+
urkit init --force # overwrite if exists
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Teach Mode
|
|
228
288
|
|
|
229
289
|
### Teach Mode
|
|
230
290
|
|
|
@@ -30,12 +30,14 @@ The typical workflow: teach points with the pendant, write a few lines of Python
|
|
|
30
30
|
|
|
31
31
|
- [Quick Start](#quick-start)
|
|
32
32
|
- [Configuration](#configuration)
|
|
33
|
+
- [Create a Config File](#create-a-config-file)
|
|
33
34
|
- [Location](#location)
|
|
34
35
|
- [Keys](#keys)
|
|
35
36
|
- [Gripper Config](#gripper-config)
|
|
36
37
|
- [Saving Config](#saving-config)
|
|
37
38
|
- [Programmatic](#programmatic)
|
|
38
39
|
- [Interactive CLI](#interactive-cli)
|
|
40
|
+
- [Init](#init)
|
|
39
41
|
- [Teach Mode](#teach-mode)
|
|
40
42
|
- [Points Explorer](#points-explorer)
|
|
41
43
|
- [Key Map](#key-map)
|
|
@@ -68,10 +70,33 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
68
70
|
|
|
69
71
|
### Robot Setup (one-time)
|
|
70
72
|
|
|
71
|
-
1. **Network**:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
1. **Network**: Connect your PC to the robot via Ethernet cable (direct) or a switch.
|
|
74
|
+
|
|
75
|
+
First, configure the robot: `☰` → `System` → `System` → `Network`. Set a static IP, e.g., `192.168.1.50` / Subnet `255.255.255.0`.
|
|
76
|
+
|
|
77
|
+
Then set a matching static IP on your PC. The exact IP can be anything, as long as the first three octets match the robot's network and the last octet is different:
|
|
78
|
+
|
|
79
|
+
**Linux**:
|
|
80
|
+
- Open `Settings` → `Network` → click the gear icon next to `Wired`
|
|
81
|
+
- Go to `IPv4` tab → change `Automatic (DHCP)` to `Manual`
|
|
82
|
+
- Enter Address: `192.168.1.1`, Netmask: `255.255.255.0`
|
|
83
|
+
- Click `Apply`, then toggle the connection off and on
|
|
84
|
+
|
|
85
|
+
**macOS**:
|
|
86
|
+
- Open `System Settings` → `Network` → click `Ethernet` (or your adapter)
|
|
87
|
+
- Click `Details...` next to the adapter name → `TCP/IP`
|
|
88
|
+
- Set `Configure IPv4` to `Manually`
|
|
89
|
+
- Enter IP: `192.168.1.1`, Subnet Mask: `255.255.255.0`
|
|
90
|
+
- Click `OK`
|
|
91
|
+
|
|
92
|
+
**Windows**:
|
|
93
|
+
- Open `Settings` → `Network & internet` → `Ethernet`
|
|
94
|
+
- Click the adapter name (e.g., `Ethernet`) at the top
|
|
95
|
+
- Under `IP settings`, click `Edit` → select `Manual`
|
|
96
|
+
- Toggle `IPv4` On, enter IP: `192.168.1.1`, Subnet mask: `255.255.255.0`
|
|
97
|
+
- Click `Save`
|
|
98
|
+
|
|
99
|
+
Verify connectivity: `ping 192.168.1.50`.
|
|
75
100
|
2. **Remote Control**: `☰` → `System` → `Remote Control`: Enable. Press the remote/local button on the pendant.
|
|
76
101
|
3. **Security**: `☰` → `Security` → `Services`: enable RTDE and disable EtherNet/IP, PROFINET, or MODBUS if they're claiming RTDE registers. Save and restart.
|
|
77
102
|
|
|
@@ -96,9 +121,20 @@ robot.gripper.open()
|
|
|
96
121
|
|
|
97
122
|
The typical workflow:
|
|
98
123
|
|
|
99
|
-
1. **
|
|
100
|
-
2. **
|
|
101
|
-
3. **
|
|
124
|
+
1. **Scaffold config.** Run `urkit init` to create a default `config.yaml`.
|
|
125
|
+
2. **Edit it.** Set your robot IP, gripper type, and other settings.
|
|
126
|
+
3. **Teach points.** Run `urkit teach` (auto-loads config) to position the robot and save waypoints.
|
|
127
|
+
4. **Write code.** Load the config and move to points by name:
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from urkit import URRobot
|
|
131
|
+
|
|
132
|
+
robot = URRobot.from_config("config.yaml")
|
|
133
|
+
robot.move_to("home")
|
|
134
|
+
robot.move_to("pick", offset_z=0.05)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
5. **Iterate.** Add more points, tweak your code, repeat.
|
|
102
138
|
|
|
103
139
|
---
|
|
104
140
|
|
|
@@ -106,9 +142,21 @@ The typical workflow:
|
|
|
106
142
|
|
|
107
143
|
URKit uses a YAML config file (`config.yaml`) to persist settings between sessions.
|
|
108
144
|
|
|
145
|
+
### Create a Config File
|
|
146
|
+
|
|
147
|
+
Generate a default config with all options documented:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
urkit init # writes config.yaml in CWD
|
|
151
|
+
urkit init --output station_a.yaml # custom path
|
|
152
|
+
urkit init --force # overwrite if exists
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Edit the generated file with your robot IP and gripper settings.
|
|
156
|
+
|
|
109
157
|
### Location
|
|
110
158
|
|
|
111
|
-
|
|
159
|
+
The CLI auto-loads `config.yaml` from the current working directory. Pass `--config` for a custom path.
|
|
112
160
|
|
|
113
161
|
### Keys
|
|
114
162
|
|
|
@@ -198,7 +246,19 @@ robot = URRobot.from_config({"robot_ip": "192.168.1.50", "gripper": "2f-85"}) #
|
|
|
198
246
|
|
|
199
247
|
## Interactive CLI
|
|
200
248
|
|
|
201
|
-
URKit provides
|
|
249
|
+
URKit provides three CLI tools: **init** to scaffold a config file, **teach** for interactive robot control, and **points** for browsing saved waypoints.
|
|
250
|
+
|
|
251
|
+
### Init
|
|
252
|
+
|
|
253
|
+
Generate a default config file with all options documented:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
urkit init # writes config.yaml in CWD
|
|
257
|
+
urkit init --output station_a.yaml # custom path
|
|
258
|
+
urkit init --force # overwrite if exists
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Teach Mode
|
|
202
262
|
|
|
203
263
|
### Teach Mode
|
|
204
264
|
|
|
@@ -12,6 +12,7 @@ from __future__ import annotations
|
|
|
12
12
|
import argparse
|
|
13
13
|
import sys
|
|
14
14
|
|
|
15
|
+
from urkit.cli.init import init_command
|
|
15
16
|
from urkit.cli.teach import teach_command
|
|
16
17
|
from urkit.cli.points import points_command
|
|
17
18
|
|
|
@@ -25,6 +26,24 @@ def main() -> None:
|
|
|
25
26
|
|
|
26
27
|
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
27
28
|
|
|
29
|
+
# init subcommand
|
|
30
|
+
init_parser = subparsers.add_parser(
|
|
31
|
+
"init",
|
|
32
|
+
help="Scaffold a default config.yaml",
|
|
33
|
+
)
|
|
34
|
+
init_parser.add_argument(
|
|
35
|
+
"--output",
|
|
36
|
+
type=str,
|
|
37
|
+
default="config.yaml",
|
|
38
|
+
help="Output path (default: config.yaml in CWD)",
|
|
39
|
+
)
|
|
40
|
+
init_parser.add_argument(
|
|
41
|
+
"--force",
|
|
42
|
+
action="store_true",
|
|
43
|
+
default=False,
|
|
44
|
+
help="Overwrite existing file",
|
|
45
|
+
)
|
|
46
|
+
|
|
28
47
|
# teach subcommand
|
|
29
48
|
teach_parser = subparsers.add_parser(
|
|
30
49
|
"teach",
|
|
@@ -113,7 +132,9 @@ def main() -> None:
|
|
|
113
132
|
parser.print_help()
|
|
114
133
|
sys.exit(1)
|
|
115
134
|
|
|
116
|
-
if args.command == "
|
|
135
|
+
if args.command == "init":
|
|
136
|
+
init_command(args)
|
|
137
|
+
elif args.command == "teach":
|
|
117
138
|
teach_command(args)
|
|
118
139
|
elif args.command == "points":
|
|
119
140
|
points_command(args)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""urkit init — scaffold a default config.yaml file.
|
|
2
|
+
|
|
3
|
+
Generates a commented config file with all available options so the
|
|
4
|
+
user can edit it for their setup.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
urkit init # writes config.yaml in CWD
|
|
8
|
+
urkit init --output station_a.yaml # custom path
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import sys
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
_DEFAULT_TEMPLATE = """\
|
|
17
|
+
# urkit config — edit and save as config.yaml
|
|
18
|
+
# Generated by: urkit init
|
|
19
|
+
#
|
|
20
|
+
# Load it:
|
|
21
|
+
# Python: robot = URRobot.from_config("config.yaml")
|
|
22
|
+
# CLI: urkit teach (auto-loads config.yaml)
|
|
23
|
+
# CLI: urkit teach --config station_a.yaml
|
|
24
|
+
|
|
25
|
+
# Robot IP address (required)
|
|
26
|
+
robot_ip: 192.168.1.50
|
|
27
|
+
|
|
28
|
+
# Path to SQLite points database (optional, created if missing)
|
|
29
|
+
points_path: points.db
|
|
30
|
+
|
|
31
|
+
# Gripper preset (optional)
|
|
32
|
+
# Built-in: hand-e, 2f-85, 2f-140
|
|
33
|
+
# Digital I/O: digital
|
|
34
|
+
# Omit or set to none for no gripper
|
|
35
|
+
gripper: none
|
|
36
|
+
|
|
37
|
+
# Gripper overrides (optional)
|
|
38
|
+
gripper_config:
|
|
39
|
+
# Physical properties (override preset defaults)
|
|
40
|
+
# mass: 1.0 # kg
|
|
41
|
+
# center_of_gravity: [0.0, 0.0, 0.0] # [x, y, z] in meters
|
|
42
|
+
# tcp_offset: [0.0, 0.0, 0.175, 0.0, 0.0, 0.0] # [x, y, z, rx, ry, rz]
|
|
43
|
+
|
|
44
|
+
# Robotiq-specific (hand-e, 2f-85, 2f-140)
|
|
45
|
+
# force: 100 # grip force 0-100
|
|
46
|
+
# speed: 100 # movement speed 0-100
|
|
47
|
+
# max_mm: 85 # max finger travel (e.g. 85 for 2F-85)
|
|
48
|
+
|
|
49
|
+
# Digital gripper
|
|
50
|
+
# pin: 0 # digital output pin
|
|
51
|
+
# close_on_high: true # true=HIGH closes, false=LOW closes
|
|
52
|
+
|
|
53
|
+
# IK reference posture (optional)
|
|
54
|
+
# Set to a saved point name to prevent elbow/wrist flipping between moves
|
|
55
|
+
# ik_reference: home
|
|
56
|
+
|
|
57
|
+
# Default motion parameters (optional)
|
|
58
|
+
# default_vel: 0.5 # m/s
|
|
59
|
+
# default_acc: 0.3 # m/s²
|
|
60
|
+
|
|
61
|
+
# Expert mode (optional) — disable safety speed clamping in CLI
|
|
62
|
+
# expert_mode: false
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def init_command(args: object) -> None:
|
|
67
|
+
"""Execute the init command to scaffold a default config file.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
args: Parsed arguments with 'output' and 'force' attributes.
|
|
71
|
+
"""
|
|
72
|
+
output = Path(getattr(args, "output", "config.yaml") or "config.yaml")
|
|
73
|
+
force = getattr(args, "force", False)
|
|
74
|
+
|
|
75
|
+
if output.exists() and not force:
|
|
76
|
+
print(f"Error: {output} already exists.")
|
|
77
|
+
print(" Remove it first or use --force to overwrite.")
|
|
78
|
+
sys.exit(1)
|
|
79
|
+
|
|
80
|
+
output.write_text(_DEFAULT_TEMPLATE)
|
|
81
|
+
print(f"Created {output}")
|
|
82
|
+
print("Edit it with your robot IP and gripper settings, then run:")
|
|
83
|
+
print(" urkit teach")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: urkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Universal Robots e-Series control toolkit built on ur_rtde
|
|
5
5
|
Author: URKit Contributors
|
|
6
6
|
License: MIT
|
|
@@ -56,12 +56,14 @@ The typical workflow: teach points with the pendant, write a few lines of Python
|
|
|
56
56
|
|
|
57
57
|
- [Quick Start](#quick-start)
|
|
58
58
|
- [Configuration](#configuration)
|
|
59
|
+
- [Create a Config File](#create-a-config-file)
|
|
59
60
|
- [Location](#location)
|
|
60
61
|
- [Keys](#keys)
|
|
61
62
|
- [Gripper Config](#gripper-config)
|
|
62
63
|
- [Saving Config](#saving-config)
|
|
63
64
|
- [Programmatic](#programmatic)
|
|
64
65
|
- [Interactive CLI](#interactive-cli)
|
|
66
|
+
- [Init](#init)
|
|
65
67
|
- [Teach Mode](#teach-mode)
|
|
66
68
|
- [Points Explorer](#points-explorer)
|
|
67
69
|
- [Key Map](#key-map)
|
|
@@ -94,10 +96,33 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
94
96
|
|
|
95
97
|
### Robot Setup (one-time)
|
|
96
98
|
|
|
97
|
-
1. **Network**:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
1. **Network**: Connect your PC to the robot via Ethernet cable (direct) or a switch.
|
|
100
|
+
|
|
101
|
+
First, configure the robot: `☰` → `System` → `System` → `Network`. Set a static IP, e.g., `192.168.1.50` / Subnet `255.255.255.0`.
|
|
102
|
+
|
|
103
|
+
Then set a matching static IP on your PC. The exact IP can be anything, as long as the first three octets match the robot's network and the last octet is different:
|
|
104
|
+
|
|
105
|
+
**Linux**:
|
|
106
|
+
- Open `Settings` → `Network` → click the gear icon next to `Wired`
|
|
107
|
+
- Go to `IPv4` tab → change `Automatic (DHCP)` to `Manual`
|
|
108
|
+
- Enter Address: `192.168.1.1`, Netmask: `255.255.255.0`
|
|
109
|
+
- Click `Apply`, then toggle the connection off and on
|
|
110
|
+
|
|
111
|
+
**macOS**:
|
|
112
|
+
- Open `System Settings` → `Network` → click `Ethernet` (or your adapter)
|
|
113
|
+
- Click `Details...` next to the adapter name → `TCP/IP`
|
|
114
|
+
- Set `Configure IPv4` to `Manually`
|
|
115
|
+
- Enter IP: `192.168.1.1`, Subnet Mask: `255.255.255.0`
|
|
116
|
+
- Click `OK`
|
|
117
|
+
|
|
118
|
+
**Windows**:
|
|
119
|
+
- Open `Settings` → `Network & internet` → `Ethernet`
|
|
120
|
+
- Click the adapter name (e.g., `Ethernet`) at the top
|
|
121
|
+
- Under `IP settings`, click `Edit` → select `Manual`
|
|
122
|
+
- Toggle `IPv4` On, enter IP: `192.168.1.1`, Subnet mask: `255.255.255.0`
|
|
123
|
+
- Click `Save`
|
|
124
|
+
|
|
125
|
+
Verify connectivity: `ping 192.168.1.50`.
|
|
101
126
|
2. **Remote Control**: `☰` → `System` → `Remote Control`: Enable. Press the remote/local button on the pendant.
|
|
102
127
|
3. **Security**: `☰` → `Security` → `Services`: enable RTDE and disable EtherNet/IP, PROFINET, or MODBUS if they're claiming RTDE registers. Save and restart.
|
|
103
128
|
|
|
@@ -122,9 +147,20 @@ robot.gripper.open()
|
|
|
122
147
|
|
|
123
148
|
The typical workflow:
|
|
124
149
|
|
|
125
|
-
1. **
|
|
126
|
-
2. **
|
|
127
|
-
3. **
|
|
150
|
+
1. **Scaffold config.** Run `urkit init` to create a default `config.yaml`.
|
|
151
|
+
2. **Edit it.** Set your robot IP, gripper type, and other settings.
|
|
152
|
+
3. **Teach points.** Run `urkit teach` (auto-loads config) to position the robot and save waypoints.
|
|
153
|
+
4. **Write code.** Load the config and move to points by name:
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from urkit import URRobot
|
|
157
|
+
|
|
158
|
+
robot = URRobot.from_config("config.yaml")
|
|
159
|
+
robot.move_to("home")
|
|
160
|
+
robot.move_to("pick", offset_z=0.05)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
5. **Iterate.** Add more points, tweak your code, repeat.
|
|
128
164
|
|
|
129
165
|
---
|
|
130
166
|
|
|
@@ -132,9 +168,21 @@ The typical workflow:
|
|
|
132
168
|
|
|
133
169
|
URKit uses a YAML config file (`config.yaml`) to persist settings between sessions.
|
|
134
170
|
|
|
171
|
+
### Create a Config File
|
|
172
|
+
|
|
173
|
+
Generate a default config with all options documented:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
urkit init # writes config.yaml in CWD
|
|
177
|
+
urkit init --output station_a.yaml # custom path
|
|
178
|
+
urkit init --force # overwrite if exists
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Edit the generated file with your robot IP and gripper settings.
|
|
182
|
+
|
|
135
183
|
### Location
|
|
136
184
|
|
|
137
|
-
|
|
185
|
+
The CLI auto-loads `config.yaml` from the current working directory. Pass `--config` for a custom path.
|
|
138
186
|
|
|
139
187
|
### Keys
|
|
140
188
|
|
|
@@ -224,7 +272,19 @@ robot = URRobot.from_config({"robot_ip": "192.168.1.50", "gripper": "2f-85"}) #
|
|
|
224
272
|
|
|
225
273
|
## Interactive CLI
|
|
226
274
|
|
|
227
|
-
URKit provides
|
|
275
|
+
URKit provides three CLI tools: **init** to scaffold a config file, **teach** for interactive robot control, and **points** for browsing saved waypoints.
|
|
276
|
+
|
|
277
|
+
### Init
|
|
278
|
+
|
|
279
|
+
Generate a default config file with all options documented:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
urkit init # writes config.yaml in CWD
|
|
283
|
+
urkit init --output station_a.yaml # custom path
|
|
284
|
+
urkit init --force # overwrite if exists
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Teach Mode
|
|
228
288
|
|
|
229
289
|
### Teach Mode
|
|
230
290
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|