RemiFabre commited on
Commit
55c946f
·
1 Parent(s): ecd642a

Use new antenna neutral position [-0.1745, 0.1745] to reduce shaking

Browse files
Files changed (1) hide show
  1. slouch_detector/main.py +3 -3
slouch_detector/main.py CHANGED
@@ -303,7 +303,7 @@ class SlouchDetector(ReachyMiniApp):
303
  def _return_head_to_position(self, reachy: ReachyMini) -> None:
304
  """Return head to the look-up position after an emotion."""
305
  look_up_pose = create_head_pose(pitch=HEAD_PITCH_UP_DEG, degrees=True)
306
- reachy.goto_target(head=look_up_pose, antennas=[0.0, 0.0], duration=0.5)
307
 
308
  def _play_wav_chunked(
309
  self,
@@ -353,7 +353,7 @@ class SlouchDetector(ReachyMiniApp):
353
  look_up_pose = create_head_pose(pitch=HEAD_PITCH_UP_DEG, degrees=True)
354
  reachy.enable_motors()
355
  time.sleep(0.1)
356
- reachy.goto_target(head=look_up_pose, antennas=[0.0, 0.0], duration=1.0)
357
 
358
  if stop_event.is_set():
359
  return
@@ -369,7 +369,7 @@ class SlouchDetector(ReachyMiniApp):
369
  reachy.enable_motors()
370
  time.sleep(0.1)
371
  reachy.goto_target(
372
- head=create_head_pose(), antennas=[0.0, 0.0], duration=1.0
373
  )
374
  reachy.disable_motors()
375
  except Exception as exc:
 
303
  def _return_head_to_position(self, reachy: ReachyMini) -> None:
304
  """Return head to the look-up position after an emotion."""
305
  look_up_pose = create_head_pose(pitch=HEAD_PITCH_UP_DEG, degrees=True)
306
+ reachy.goto_target(head=look_up_pose, antennas=[-0.1745, 0.1745], duration=0.5)
307
 
308
  def _play_wav_chunked(
309
  self,
 
353
  look_up_pose = create_head_pose(pitch=HEAD_PITCH_UP_DEG, degrees=True)
354
  reachy.enable_motors()
355
  time.sleep(0.1)
356
+ reachy.goto_target(head=look_up_pose, antennas=[-0.1745, 0.1745], duration=1.0)
357
 
358
  if stop_event.is_set():
359
  return
 
369
  reachy.enable_motors()
370
  time.sleep(0.1)
371
  reachy.goto_target(
372
+ head=create_head_pose(), antennas=[-0.1745, 0.1745], duration=1.0
373
  )
374
  reachy.disable_motors()
375
  except Exception as exc: