urkit 0.2.0__tar.gz → 0.2.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.2.0 → urkit-0.2.1}/PKG-INFO +18 -9
- {urkit-0.2.0 → urkit-0.2.1}/README.md +17 -8
- {urkit-0.2.0 → urkit-0.2.1}/pyproject.toml +1 -1
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/robot.py +43 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/PKG-INFO +18 -9
- {urkit-0.2.0 → urkit-0.2.1}/setup.cfg +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/__init__.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/__main__.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/cli/__init__.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/cli/colors.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/cli/connection_monitor.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/cli/points.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/cli/teach.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/config.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/connection.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/exceptions.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/geometry.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/__init__.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/base.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/digital.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/presets.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/robotiq.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/gripper/robotiq_preamble.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/io.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/motion.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/points.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit/telemetry.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/SOURCES.txt +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/dependency_links.txt +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/entry_points.txt +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/requires.txt +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/src/urkit.egg-info/top_level.txt +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_exceptions.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_geometry.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_gripper.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_gripper_factory.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_gripper_presets.py +0 -0
- {urkit-0.2.0 → urkit-0.2.1}/tests/test_points.py +0 -0
- {urkit-0.2.0 → urkit-0.2.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.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Universal Robots e-Series control toolkit built on ur_rtde
|
|
5
5
|
Author: URKit Contributors
|
|
6
6
|
License: MIT
|
|
@@ -71,16 +71,14 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
71
71
|
|
|
72
72
|
That's it. No `.urp` files to run, no extra programs needed.
|
|
73
73
|
|
|
74
|
-
###
|
|
74
|
+
### Example
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Hello World
|
|
76
|
+
If you have a Robotiq gripper, install the **Robotiq Gripper Control** URCap first: download from [robotiq.com/support](https://robotiq.com/support), copy the `.urcap` to a USB drive, and install via `☰` → `Settings` → `System` → `URCaps`.
|
|
79
77
|
|
|
80
78
|
```python
|
|
81
|
-
from urkit import URRobot, ROBOTIQ_HAND_E
|
|
79
|
+
from urkit import URRobot, ROBOTIQ_2F_85 # or ROBOTIQ_2F_140, ROBOTIQ_HAND_E, or gripper=none
|
|
82
80
|
|
|
83
|
-
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=
|
|
81
|
+
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=ROBOTIQ_2F_85)
|
|
84
82
|
robot.gripper.activate()
|
|
85
83
|
|
|
86
84
|
robot.move_to("home")
|
|
@@ -324,6 +322,16 @@ robot.move_to([0.5, 0, 0.3, 0, 0, 0]) # [x, y, z, rx, ry, rz]
|
|
|
324
322
|
robot.move_to("pick", offset=[0, 0, 0.05, 0, 0, 0]) # 5cm above pick
|
|
325
323
|
```
|
|
326
324
|
|
|
325
|
+
#### Resolve a Pose
|
|
326
|
+
|
|
327
|
+
Get a pose without moving — useful for logging, comparisons, or custom motion:
|
|
328
|
+
|
|
329
|
+
```python
|
|
330
|
+
pose = robot.get_pose("pick")
|
|
331
|
+
pose = robot.get_pose("pick", offset=[0, 0, 0.05, 0, 0, 0]) # with offset
|
|
332
|
+
robot.move_to(pose) # move to the resolved pose later
|
|
333
|
+
```
|
|
334
|
+
|
|
327
335
|
#### Coordinate Frame
|
|
328
336
|
|
|
329
337
|
```python
|
|
@@ -517,14 +525,15 @@ robot.rtde_receive.getActualCurrent()
|
|
|
517
525
|
|
|
518
526
|
Full `ur_rtde` documentation: <https://sdurobotics.gitlab.io/ur_rtde/>
|
|
519
527
|
|
|
520
|
-
### Connection
|
|
528
|
+
### Connection Monitoring
|
|
521
529
|
|
|
522
530
|
```python
|
|
523
531
|
robot.connection_lost # bool: check if RTDE dropped
|
|
524
532
|
robot.reconnect_rtde() # reconnect after a drop
|
|
525
|
-
robot.disconnect() # clean shutdown
|
|
526
533
|
```
|
|
527
534
|
|
|
535
|
+
`disconnect()` is called automatically when the robot object is garbage collected.
|
|
536
|
+
|
|
528
537
|
### Error Handling
|
|
529
538
|
|
|
530
539
|
```python
|
|
@@ -45,16 +45,14 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
45
45
|
|
|
46
46
|
That's it. No `.urp` files to run, no extra programs needed.
|
|
47
47
|
|
|
48
|
-
###
|
|
48
|
+
### Example
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Hello World
|
|
50
|
+
If you have a Robotiq gripper, install the **Robotiq Gripper Control** URCap first: download from [robotiq.com/support](https://robotiq.com/support), copy the `.urcap` to a USB drive, and install via `☰` → `Settings` → `System` → `URCaps`.
|
|
53
51
|
|
|
54
52
|
```python
|
|
55
|
-
from urkit import URRobot, ROBOTIQ_HAND_E
|
|
53
|
+
from urkit import URRobot, ROBOTIQ_2F_85 # or ROBOTIQ_2F_140, ROBOTIQ_HAND_E, or gripper=none
|
|
56
54
|
|
|
57
|
-
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=
|
|
55
|
+
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=ROBOTIQ_2F_85)
|
|
58
56
|
robot.gripper.activate()
|
|
59
57
|
|
|
60
58
|
robot.move_to("home")
|
|
@@ -298,6 +296,16 @@ robot.move_to([0.5, 0, 0.3, 0, 0, 0]) # [x, y, z, rx, ry, rz]
|
|
|
298
296
|
robot.move_to("pick", offset=[0, 0, 0.05, 0, 0, 0]) # 5cm above pick
|
|
299
297
|
```
|
|
300
298
|
|
|
299
|
+
#### Resolve a Pose
|
|
300
|
+
|
|
301
|
+
Get a pose without moving — useful for logging, comparisons, or custom motion:
|
|
302
|
+
|
|
303
|
+
```python
|
|
304
|
+
pose = robot.get_pose("pick")
|
|
305
|
+
pose = robot.get_pose("pick", offset=[0, 0, 0.05, 0, 0, 0]) # with offset
|
|
306
|
+
robot.move_to(pose) # move to the resolved pose later
|
|
307
|
+
```
|
|
308
|
+
|
|
301
309
|
#### Coordinate Frame
|
|
302
310
|
|
|
303
311
|
```python
|
|
@@ -491,14 +499,15 @@ robot.rtde_receive.getActualCurrent()
|
|
|
491
499
|
|
|
492
500
|
Full `ur_rtde` documentation: <https://sdurobotics.gitlab.io/ur_rtde/>
|
|
493
501
|
|
|
494
|
-
### Connection
|
|
502
|
+
### Connection Monitoring
|
|
495
503
|
|
|
496
504
|
```python
|
|
497
505
|
robot.connection_lost # bool: check if RTDE dropped
|
|
498
506
|
robot.reconnect_rtde() # reconnect after a drop
|
|
499
|
-
robot.disconnect() # clean shutdown
|
|
500
507
|
```
|
|
501
508
|
|
|
509
|
+
`disconnect()` is called automatically when the robot object is garbage collected.
|
|
510
|
+
|
|
502
511
|
### Error Handling
|
|
503
512
|
|
|
504
513
|
```python
|
|
@@ -784,6 +784,49 @@ class URRobot:
|
|
|
784
784
|
# Motion
|
|
785
785
|
# ------------------------------------------------------------------
|
|
786
786
|
|
|
787
|
+
def get_pose(
|
|
788
|
+
self,
|
|
789
|
+
target: str | list[float],
|
|
790
|
+
*,
|
|
791
|
+
offset: list[float] | None = None,
|
|
792
|
+
frame: MoveFrame | None = None,
|
|
793
|
+
) -> list[float]:
|
|
794
|
+
"""Resolve a saved point or raw pose to a TCP pose.
|
|
795
|
+
|
|
796
|
+
Like ``move_to`` but returns the pose instead of moving.
|
|
797
|
+
Useful for logging, comparisons, or custom motion logic.
|
|
798
|
+
|
|
799
|
+
Args:
|
|
800
|
+
target: A saved point name (str) or a raw TCP pose
|
|
801
|
+
[x, y, z, rx, ry, rz].
|
|
802
|
+
offset: Optional offset [dx, dy, dz, droll, dpitch, dyaw]
|
|
803
|
+
applied to the target pose.
|
|
804
|
+
frame: Coordinate frame for the offset. Falls back to the
|
|
805
|
+
current ``move_frame`` property (BASE or TOOL).
|
|
806
|
+
|
|
807
|
+
Returns:
|
|
808
|
+
TCP pose as [x, y, z, rx, ry, rz].
|
|
809
|
+
|
|
810
|
+
Raises:
|
|
811
|
+
PointError: If the named point is not found or offset is invalid.
|
|
812
|
+
|
|
813
|
+
Example:
|
|
814
|
+
>>> pose = robot.get_pose("pick")
|
|
815
|
+
>>> pose = robot.get_pose("pick", offset=[0, 0, 0.05, 0, 0, 0])
|
|
816
|
+
>>> robot.move_to(pose)
|
|
817
|
+
"""
|
|
818
|
+
point = self._lookup_point(target)
|
|
819
|
+
|
|
820
|
+
if offset is not None:
|
|
821
|
+
if len(offset) != 6:
|
|
822
|
+
raise PointError(
|
|
823
|
+
f"Offset must have 6 values [dx, dy, dz, droll, dpitch, dyaw], "
|
|
824
|
+
f"got {len(offset)}."
|
|
825
|
+
)
|
|
826
|
+
point = point.with_offset(offset, frame=frame or self._move_frame)
|
|
827
|
+
|
|
828
|
+
return list(point.pose)
|
|
829
|
+
|
|
787
830
|
def move_to(
|
|
788
831
|
self,
|
|
789
832
|
target: str | list[float],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: urkit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Universal Robots e-Series control toolkit built on ur_rtde
|
|
5
5
|
Author: URKit Contributors
|
|
6
6
|
License: MIT
|
|
@@ -71,16 +71,14 @@ Requires Python 3.8+ and a Universal Robots e-Series (UR3e to UR30).
|
|
|
71
71
|
|
|
72
72
|
That's it. No `.urp` files to run, no extra programs needed.
|
|
73
73
|
|
|
74
|
-
###
|
|
74
|
+
### Example
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Hello World
|
|
76
|
+
If you have a Robotiq gripper, install the **Robotiq Gripper Control** URCap first: download from [robotiq.com/support](https://robotiq.com/support), copy the `.urcap` to a USB drive, and install via `☰` → `Settings` → `System` → `URCaps`.
|
|
79
77
|
|
|
80
78
|
```python
|
|
81
|
-
from urkit import URRobot, ROBOTIQ_HAND_E
|
|
79
|
+
from urkit import URRobot, ROBOTIQ_2F_85 # or ROBOTIQ_2F_140, ROBOTIQ_HAND_E, or gripper=none
|
|
82
80
|
|
|
83
|
-
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=
|
|
81
|
+
robot = URRobot(ip="172.31.1.200", points="points.db", gripper=ROBOTIQ_2F_85)
|
|
84
82
|
robot.gripper.activate()
|
|
85
83
|
|
|
86
84
|
robot.move_to("home")
|
|
@@ -324,6 +322,16 @@ robot.move_to([0.5, 0, 0.3, 0, 0, 0]) # [x, y, z, rx, ry, rz]
|
|
|
324
322
|
robot.move_to("pick", offset=[0, 0, 0.05, 0, 0, 0]) # 5cm above pick
|
|
325
323
|
```
|
|
326
324
|
|
|
325
|
+
#### Resolve a Pose
|
|
326
|
+
|
|
327
|
+
Get a pose without moving — useful for logging, comparisons, or custom motion:
|
|
328
|
+
|
|
329
|
+
```python
|
|
330
|
+
pose = robot.get_pose("pick")
|
|
331
|
+
pose = robot.get_pose("pick", offset=[0, 0, 0.05, 0, 0, 0]) # with offset
|
|
332
|
+
robot.move_to(pose) # move to the resolved pose later
|
|
333
|
+
```
|
|
334
|
+
|
|
327
335
|
#### Coordinate Frame
|
|
328
336
|
|
|
329
337
|
```python
|
|
@@ -517,14 +525,15 @@ robot.rtde_receive.getActualCurrent()
|
|
|
517
525
|
|
|
518
526
|
Full `ur_rtde` documentation: <https://sdurobotics.gitlab.io/ur_rtde/>
|
|
519
527
|
|
|
520
|
-
### Connection
|
|
528
|
+
### Connection Monitoring
|
|
521
529
|
|
|
522
530
|
```python
|
|
523
531
|
robot.connection_lost # bool: check if RTDE dropped
|
|
524
532
|
robot.reconnect_rtde() # reconnect after a drop
|
|
525
|
-
robot.disconnect() # clean shutdown
|
|
526
533
|
```
|
|
527
534
|
|
|
535
|
+
`disconnect()` is called automatically when the robot object is garbage collected.
|
|
536
|
+
|
|
528
537
|
### Error Handling
|
|
529
538
|
|
|
530
539
|
```python
|
|
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
|
|
File without changes
|