dora-reachy2 0.3.10__py3-none-any.whl → 0.3.11__py3-none-any.whl
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.
- dora_reachy2/__init__.py +2 -0
- dora_reachy2/camera.py +8 -5
- dora_reachy2/head.py +9 -6
- dora_reachy2/left_arm.py +11 -6
- dora_reachy2/mobile_base.py +5 -2
- dora_reachy2/right_arm.py +8 -3
- {dora_reachy2-0.3.10.dist-info → dora_reachy2-0.3.11.dist-info}/METADATA +2 -2
- dora_reachy2-0.3.11.dist-info/RECORD +11 -0
- {dora_reachy2-0.3.10.dist-info → dora_reachy2-0.3.11.dist-info}/WHEEL +1 -1
- dora_reachy2-0.3.10.dist-info/RECORD +0 -11
- {dora_reachy2-0.3.10.dist-info → dora_reachy2-0.3.11.dist-info}/entry_points.txt +0 -0
- {dora_reachy2-0.3.10.dist-info → dora_reachy2-0.3.11.dist-info}/top_level.txt +0 -0
dora_reachy2/__init__.py
CHANGED
dora_reachy2/camera.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"""TODO: Add docstring."""
|
2
|
+
|
1
3
|
import os
|
2
4
|
|
3
5
|
import numpy as np
|
@@ -8,10 +10,11 @@ from reachy2_sdk.media.camera import CameraView
|
|
8
10
|
|
9
11
|
|
10
12
|
def main():
|
11
|
-
|
13
|
+
"""TODO: Add docstring."""
|
14
|
+
robot_ip = os.getenv("ROBOT_IP", "10.42.0.80")
|
12
15
|
|
13
16
|
for _ in range(10):
|
14
|
-
reachy = ReachySDK(
|
17
|
+
reachy = ReachySDK(robot_ip)
|
15
18
|
try:
|
16
19
|
reachy.cameras.teleop.get_frame(view=CameraView.LEFT)
|
17
20
|
params = reachy.cameras.depth.get_parameters(view=CameraView.DEPTH)
|
@@ -25,7 +28,7 @@ def main():
|
|
25
28
|
|
26
29
|
reachy.cameras.teleop.get_frame(view=CameraView.LEFT)
|
27
30
|
params = reachy.cameras.depth.get_parameters(view=CameraView.DEPTH)
|
28
|
-
height, width, _distortion_model,
|
31
|
+
height, width, _distortion_model, _d, k, _r, _p = params
|
29
32
|
|
30
33
|
node = Node()
|
31
34
|
|
@@ -87,8 +90,8 @@ def main():
|
|
87
90
|
metadata={
|
88
91
|
"width": width,
|
89
92
|
"height": height,
|
90
|
-
"focal": [int(
|
91
|
-
"resolution": [int(
|
93
|
+
"focal": [int(k[0, 0]), int(k[1, 1])],
|
94
|
+
"resolution": [int(k[0, 2]), int(k[1, 2])],
|
92
95
|
},
|
93
96
|
)
|
94
97
|
|
dora_reachy2/head.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"""TODO: Add docstring."""
|
2
|
+
|
1
3
|
import os
|
2
4
|
|
3
5
|
import numpy as np
|
@@ -6,17 +8,18 @@ from reachy2_sdk import ReachySDK
|
|
6
8
|
|
7
9
|
|
8
10
|
def main():
|
9
|
-
|
11
|
+
"""TODO: Add docstring."""
|
12
|
+
robot_ip = os.getenv("ROBOT_IP", "10.42.0.80")
|
10
13
|
|
11
14
|
for _i in range(5):
|
12
|
-
reachy = ReachySDK(
|
15
|
+
reachy = ReachySDK(robot_ip)
|
13
16
|
|
14
17
|
if reachy.head is not None:
|
15
18
|
reachy.head.turn_on()
|
16
19
|
reachy.head.goto([0, 0, 0])
|
17
20
|
break
|
18
|
-
|
19
|
-
|
21
|
+
fov_h = 107
|
22
|
+
fov_v = 91
|
20
23
|
resolution = [720, 960]
|
21
24
|
|
22
25
|
roll, _pitch, yaw = reachy.head.get_current_positions()
|
@@ -34,8 +37,8 @@ def main():
|
|
34
37
|
x_min + x_max
|
35
38
|
) / 2 - 10 # Deviate a bit to take into account the off centered camera
|
36
39
|
y = (3 * y_min + y_max) / 4
|
37
|
-
ry = (x - resolution[1] / 2) *
|
38
|
-
rz = (y - resolution[0] / 2) *
|
40
|
+
ry = (x - resolution[1] / 2) * fov_h / 2 / resolution[1]
|
41
|
+
rz = (y - resolution[0] / 2) * fov_v / 2 / resolution[0]
|
39
42
|
if np.abs(yaw) > 45 and yaw * -ry > 0:
|
40
43
|
reachy.head.cancel_all_goto()
|
41
44
|
roll, _pitch, yaw = reachy.head.get_current_positions()
|
dora_reachy2/left_arm.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"""TODO: Add docstring."""
|
2
|
+
|
1
3
|
import os
|
2
4
|
import time
|
3
5
|
|
@@ -5,7 +7,7 @@ import numpy as np
|
|
5
7
|
import pyarrow as pa
|
6
8
|
from dora import Node
|
7
9
|
from reachy2_sdk import ReachySDK
|
8
|
-
from scipy.spatial.transform import Rotation
|
10
|
+
from scipy.spatial.transform import Rotation
|
9
11
|
|
10
12
|
ROBOT_IP = os.getenv("ROBOT_IP", "10.42.0.80")
|
11
13
|
|
@@ -22,8 +24,9 @@ l_default_pose = [
|
|
22
24
|
|
23
25
|
|
24
26
|
def l_arm_go_to_mixed_angles(reachy, x, y, z):
|
27
|
+
"""TODO: Add docstring."""
|
25
28
|
for theta in range(-80, -60, 10):
|
26
|
-
r =
|
29
|
+
r = Rotation.from_euler("zyx", [0, theta, 0], degrees=True)
|
27
30
|
transform = np.eye(4)
|
28
31
|
transform[:3, :3] = r.as_matrix()
|
29
32
|
transform[:3, 3] = [x, y, z]
|
@@ -38,7 +41,7 @@ def l_arm_go_to_mixed_angles(reachy, x, y, z):
|
|
38
41
|
|
39
42
|
## First try turning left
|
40
43
|
pitch = -90
|
41
|
-
r =
|
44
|
+
r = Rotation.from_euler("ZYX", (-yaw, 0, 0), degrees=True) * Rotation.from_euler(
|
42
45
|
"ZYX",
|
43
46
|
(0, pitch, 0),
|
44
47
|
degrees=True,
|
@@ -67,11 +70,12 @@ def l_arm_go_to_mixed_angles(reachy, x, y, z):
|
|
67
70
|
|
68
71
|
|
69
72
|
def manage_gripper(reachy, gripper, grasp):
|
70
|
-
|
73
|
+
"""TODO: Add docstring."""
|
74
|
+
if (gripper == 100 and reachy.l_arm.gripper.get_current_opening() == 100) or (
|
71
75
|
gripper == 0.0
|
72
76
|
and (
|
73
|
-
reachy.
|
74
|
-
and reachy.
|
77
|
+
reachy.l_arm.gripper.get_current_opening() < 98
|
78
|
+
and reachy.l_arm.gripper.get_current_opening() > 2
|
75
79
|
)
|
76
80
|
and grasp
|
77
81
|
):
|
@@ -90,6 +94,7 @@ def manage_gripper(reachy, gripper, grasp):
|
|
90
94
|
|
91
95
|
|
92
96
|
def main():
|
97
|
+
"""TODO: Add docstring."""
|
93
98
|
reachy = ReachySDK(ROBOT_IP)
|
94
99
|
|
95
100
|
if reachy.l_arm is not None:
|
dora_reachy2/mobile_base.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"""TODO: Add docstring."""
|
2
|
+
|
1
3
|
import os
|
2
4
|
import time
|
3
5
|
|
@@ -8,9 +10,10 @@ from reachy2_sdk import ReachySDK
|
|
8
10
|
|
9
11
|
|
10
12
|
def main():
|
11
|
-
|
13
|
+
"""TODO: Add docstring."""
|
14
|
+
robot_ip = os.getenv("ROBOT_IP", "10.42.0.80")
|
12
15
|
|
13
|
-
reachy = ReachySDK(
|
16
|
+
reachy = ReachySDK(robot_ip)
|
14
17
|
|
15
18
|
if reachy.mobile_base is not None:
|
16
19
|
reachy.mobile_base.turn_on()
|
dora_reachy2/right_arm.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"""TODO: Add docstring."""
|
2
|
+
|
1
3
|
import os
|
2
4
|
import time
|
3
5
|
|
@@ -5,7 +7,7 @@ import numpy as np
|
|
5
7
|
import pyarrow as pa
|
6
8
|
from dora import Node
|
7
9
|
from reachy2_sdk import ReachySDK
|
8
|
-
from scipy.spatial.transform import Rotation
|
10
|
+
from scipy.spatial.transform import Rotation
|
9
11
|
|
10
12
|
ROBOT_IP = os.getenv("ROBOT_IP", "10.42.0.80")
|
11
13
|
|
@@ -21,8 +23,9 @@ r_default_pose = [
|
|
21
23
|
|
22
24
|
|
23
25
|
def r_arm_go_to_mixed_angles(reachy, x, y, z):
|
26
|
+
"""TODO: Add docstring."""
|
24
27
|
for theta in range(-80, -60, 10):
|
25
|
-
r =
|
28
|
+
r = Rotation.from_euler("zyx", [0, theta, 0], degrees=True)
|
26
29
|
transform = np.eye(4)
|
27
30
|
transform[:3, :3] = r.as_matrix()
|
28
31
|
transform[:3, 3] = [x, y, z]
|
@@ -37,7 +40,7 @@ def r_arm_go_to_mixed_angles(reachy, x, y, z):
|
|
37
40
|
|
38
41
|
## First try turning left
|
39
42
|
pitch = -90
|
40
|
-
r =
|
43
|
+
r = Rotation.from_euler("ZYX", (yaw, 0, 0), degrees=True) * Rotation.from_euler(
|
41
44
|
"ZYX",
|
42
45
|
(0, pitch, 0),
|
43
46
|
degrees=True,
|
@@ -66,6 +69,7 @@ def r_arm_go_to_mixed_angles(reachy, x, y, z):
|
|
66
69
|
|
67
70
|
|
68
71
|
def manage_gripper(reachy, gripper, grasp):
|
72
|
+
"""TODO: Add docstring."""
|
69
73
|
if (gripper == 100 and reachy.r_arm.gripper.get_current_opening() == 100) or (
|
70
74
|
gripper == 0.0
|
71
75
|
and (
|
@@ -89,6 +93,7 @@ def manage_gripper(reachy, gripper, grasp):
|
|
89
93
|
|
90
94
|
|
91
95
|
def main():
|
96
|
+
"""TODO: Add docstring."""
|
92
97
|
reachy = ReachySDK(ROBOT_IP)
|
93
98
|
|
94
99
|
if reachy.r_arm is not None:
|
@@ -0,0 +1,11 @@
|
|
1
|
+
dora_reachy2/__init__.py,sha256=tF7WHhHiDweUUzyHsbmFe_ktphE08aA5j33E4ja1udA,381
|
2
|
+
dora_reachy2/camera.py,sha256=oucv6Q6mTVV1xqUxYwEidUSUv5Hrkq1TQ3-6poLTxSo,3124
|
3
|
+
dora_reachy2/head.py,sha256=V5SS30itBC49Jtjn4XAI1RHqvvQWY32u0_rR3szp7lA,2101
|
4
|
+
dora_reachy2/left_arm.py,sha256=FfRNzEKvn5DmuXEiownQ7oqymqQU4f2yLFTmF7-jFcM,5648
|
5
|
+
dora_reachy2/mobile_base.py,sha256=AHQ8l2D_-OJwjZOZ7RCPhdeoXCI7ufV6EW-GT0HucZ8,919
|
6
|
+
dora_reachy2/right_arm.py,sha256=zojY7kuYRFybW__u7I37NhxyiPZSqMEZ26UjsaMneBw,5644
|
7
|
+
dora_reachy2-0.3.11.dist-info/METADATA,sha256=m9l4Dj6yV6GIzrAYvyUDfAyH90zvhHYi3uRKdyKumXo,758
|
8
|
+
dora_reachy2-0.3.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
9
|
+
dora_reachy2-0.3.11.dist-info/entry_points.txt,sha256=1wj96u7QDcTPy9VN2xxV0HD2Og8GRzyT7f8wmMWD9Jc,269
|
10
|
+
dora_reachy2-0.3.11.dist-info/top_level.txt,sha256=KytY6Rdfj03RnwbYoeaA4xV1QirpxuJD66BodLTs_pM,13
|
11
|
+
dora_reachy2-0.3.11.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
dora_reachy2/__init__.py,sha256=HuSK3dnyI9Pb5QAuaKFwQQ3J5SIZnLcKHPJO0norGzc,353
|
2
|
-
dora_reachy2/camera.py,sha256=zMa2RPY35niCWepdi5aq9jsn1kwX6S7hlVrEj1Xa4iA,3065
|
3
|
-
dora_reachy2/head.py,sha256=P2PmtaHLX0dSNX2NNlmpMb2m1cCAvAFIygWFk2reSXQ,2042
|
4
|
-
dora_reachy2/left_arm.py,sha256=WIdbpT8nXBuELuHoNUD5Xq8k59Xk4a63OCtdgXANa2E,5511
|
5
|
-
dora_reachy2/mobile_base.py,sha256=a7Kj1Zsj-MIvOcDBXMj9gRqLq6NU4xkx5hU4bnWWdfo,860
|
6
|
-
dora_reachy2/right_arm.py,sha256=tGYd9pgl7GNVtEtsNnP2VHPSW65roBa-DJAPaUq87dk,5507
|
7
|
-
dora_reachy2-0.3.10.dist-info/METADATA,sha256=Kfq3reVW1xzYsY6hg98-HrFFMUZ7mn_AYblUnourpoo,758
|
8
|
-
dora_reachy2-0.3.10.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
9
|
-
dora_reachy2-0.3.10.dist-info/entry_points.txt,sha256=1wj96u7QDcTPy9VN2xxV0HD2Og8GRzyT7f8wmMWD9Jc,269
|
10
|
-
dora_reachy2-0.3.10.dist-info/top_level.txt,sha256=KytY6Rdfj03RnwbYoeaA4xV1QirpxuJD66BodLTs_pM,13
|
11
|
-
dora_reachy2-0.3.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|