remove useless files
Browse files- jericho/danceTest1.py +0 -63
- jericho/danceTest2.py +0 -58
jericho/danceTest1.py
DELETED
|
@@ -1,63 +0,0 @@
|
|
| 1 |
-
import time
|
| 2 |
-
import threading
|
| 3 |
-
import numpy as np
|
| 4 |
-
|
| 5 |
-
from reachy_mini import ReachyMini, ReachyMiniApp
|
| 6 |
-
from reachy_mini.utils import create_head_pose
|
| 7 |
-
|
| 8 |
-
class TestDance1(ReachyMiniApp):
|
| 9 |
-
|
| 10 |
-
def run(self, reachy_mini: ReachyMini, stop_event: threading.Event):
|
| 11 |
-
|
| 12 |
-
reachy_mini.goto_target(create_head_pose(), antennas=[0.0, 0.0], duration=1.0)
|
| 13 |
-
|
| 14 |
-
start_time = time.time()
|
| 15 |
-
|
| 16 |
-
while not stop_event.is_set():
|
| 17 |
-
t = time.time()
|
| 18 |
-
elapsed_time = t - start_time
|
| 19 |
-
|
| 20 |
-
compteur = int(elapsed_time / 2)
|
| 21 |
-
|
| 22 |
-
antennas_offset = np.deg2rad(20 * np.sin(2 * np.pi * 0.5 * t))
|
| 23 |
-
|
| 24 |
-
sinus_rot = np.deg2rad(20 * np.sin(2 * np.pi * 0.5 * t))
|
| 25 |
-
sinus_trans = 0.03 * np.sin(2 * np.pi * 0.5 * t)
|
| 26 |
-
|
| 27 |
-
current_roll = 0.0
|
| 28 |
-
current_pitch = 0.0
|
| 29 |
-
current_yaw = 0.0
|
| 30 |
-
current_x = 0.0
|
| 31 |
-
current_y = 0.0
|
| 32 |
-
current_z = 0.0
|
| 33 |
-
|
| 34 |
-
if compteur < 3:
|
| 35 |
-
current_roll = sinus_rot
|
| 36 |
-
elif compteur < 6:
|
| 37 |
-
current_pitch = sinus_rot
|
| 38 |
-
elif compteur < 9:
|
| 39 |
-
current_yaw = sinus_rot
|
| 40 |
-
elif compteur < 12:
|
| 41 |
-
current_x = sinus_trans
|
| 42 |
-
elif compteur < 15:
|
| 43 |
-
current_y = sinus_trans
|
| 44 |
-
elif compteur < 18:
|
| 45 |
-
current_z = sinus_trans
|
| 46 |
-
else:
|
| 47 |
-
start_time = time.time()
|
| 48 |
-
continue
|
| 49 |
-
|
| 50 |
-
head_pose = create_head_pose(
|
| 51 |
-
x=current_x,
|
| 52 |
-
y=current_y,
|
| 53 |
-
z=current_z,
|
| 54 |
-
roll=current_roll,
|
| 55 |
-
pitch=current_pitch,
|
| 56 |
-
yaw=current_yaw,
|
| 57 |
-
degrees=False,
|
| 58 |
-
mm=False,
|
| 59 |
-
)
|
| 60 |
-
|
| 61 |
-
reachy_mini.set_target(head=head_pose, antennas=[antennas_offset, antennas_offset])
|
| 62 |
-
|
| 63 |
-
time.sleep(0.01)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jericho/danceTest2.py
DELETED
|
@@ -1,58 +0,0 @@
|
|
| 1 |
-
import time
|
| 2 |
-
import threading
|
| 3 |
-
import numpy as np
|
| 4 |
-
|
| 5 |
-
from reachy_mini import ReachyMini, ReachyMiniApp
|
| 6 |
-
from reachy_mini.utils import create_head_pose
|
| 7 |
-
|
| 8 |
-
class TestDance2(ReachyMiniApp):
|
| 9 |
-
|
| 10 |
-
def run(self, reachy_mini: ReachyMini, stop_event: threading.Event):
|
| 11 |
-
|
| 12 |
-
reachy_mini.goto_target(create_head_pose(), antennas=[0.0, 0.0], duration=1.0)
|
| 13 |
-
|
| 14 |
-
start_time = time.time()
|
| 15 |
-
|
| 16 |
-
while not stop_event.is_set():
|
| 17 |
-
t = time.time()
|
| 18 |
-
elapsed_time = t - start_time
|
| 19 |
-
|
| 20 |
-
compteur = int(elapsed_time/2)
|
| 21 |
-
|
| 22 |
-
antennas_offset = np.deg2rad(20 * np.sin(2 * np.pi * 0.5 * t))
|
| 23 |
-
|
| 24 |
-
sinus_rot = np.deg2rad(20 * np.sin(2 * np.pi * 0.5 * 4 * t))
|
| 25 |
-
sinus_trans = 0.03 * np.sin(2 * np.pi * 0.5 * t)
|
| 26 |
-
cosinus_trans = 0.03 * np.cos(2 * np.pi * 0.5 * t)
|
| 27 |
-
|
| 28 |
-
current_roll = 0.0
|
| 29 |
-
current_pitch = 0.0
|
| 30 |
-
current_yaw = 0.0
|
| 31 |
-
current_x = 0.0
|
| 32 |
-
current_y = 0.0
|
| 33 |
-
current_z = 0.0
|
| 34 |
-
|
| 35 |
-
if compteur < 3:
|
| 36 |
-
current_pitch = sinus_rot
|
| 37 |
-
current_y = sinus_trans
|
| 38 |
-
elif compteur < 6:
|
| 39 |
-
current_x=sinus_trans
|
| 40 |
-
current_y=cosinus_trans
|
| 41 |
-
else:
|
| 42 |
-
start_time = time.time()
|
| 43 |
-
continue
|
| 44 |
-
|
| 45 |
-
head_pose = create_head_pose(
|
| 46 |
-
x=current_x,
|
| 47 |
-
y=current_y,
|
| 48 |
-
z=current_z,
|
| 49 |
-
roll=current_roll,
|
| 50 |
-
pitch=current_pitch,
|
| 51 |
-
yaw=current_yaw,
|
| 52 |
-
degrees=False,
|
| 53 |
-
mm=False,
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
-
reachy_mini.set_target(head=head_pose, antennas=[antennas_offset, antennas_offset])
|
| 57 |
-
|
| 58 |
-
time.sleep(0.01)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|