mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-02 19:23:54 +00:00
test
This commit is contained in:
parent
5f4caed2a8
commit
08be4dc2f3
1 changed files with 16 additions and 15 deletions
|
@ -32,26 +32,27 @@ hwi.turn_on()
|
|||
# hwi.set_position("head_roll", head_roll_pos_rad)
|
||||
# hwi.set_position("head_pitch", head_pitch_pos_rad)
|
||||
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
while True:
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
|
||||
hwi.set_position("head_yaw", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
hwi.set_position("head_yaw", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.01)
|
||||
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
|
||||
hwi.set_position("head_pitch", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
hwi.set_position("head_pitch", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.01)
|
||||
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 10:
|
||||
t = time.time() - t0
|
||||
|
||||
hwi.set_position("head_roll", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
hwi.set_position("head_roll", np.deg2rad(30) * np.sin(2*np.pi*0.2*t))
|
||||
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.01)
|
||||
|
|
Loading…
Reference in a new issue