(base) shimazueiichi@shimadzueiichinoMacBook-Pro r2r2r-scripts % cd ~/r2r2r-scripts
git add tools/gamepad_teleop.py tools/test_gamepad_teleop.py tools/pi/mecharm_daemon_start.sh
git commit -m "gamepad_teleop: 長押しは 0.1 秒おきに読んだ角度 + 3° 先を送り, 届くのを待たずに止めずに動かす (ほかの関節は指令のまま・目標は戻さない・1 秒進まなければ止める). 無視された指令は送り直す. 1 押し 1°. daemon を pymycobot 2.9.6 で起動. テスト 73 件

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LevEXRnwfWWxYdvM8WRMgs"
python3 tools/gamepad_teleop.py --execute
[main 413f7e1] gamepad_teleop: 長押しは 0.1 秒おきに読んだ角度 + 3° 先を送り, 届くのを待たずに止めずに動かす (ほかの関節は指令のまま・目標は戻さない・1 秒進まなければ止める). 無視された指令は送り直す. 1 押し 1°. daemon を pymycobot 2.9.6 で起動. テスト 73 件
 2 files changed, 18 insertions(+)
/opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/pkgdata.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import resource_stream, resource_exists
objc[8310]: Class SDLApplication is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d2c8) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ec890). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLAppDelegate is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d318) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ec8e0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLTranslatorResponder is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d390) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ec958). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLMessageBoxPresenter is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d3b8) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ec980). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_cocoametalview is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d408) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ec9d0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLOpenGLContext is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d458) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175eca20). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_ShapeData is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d4d0) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175eca98). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_CocoaClosure is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d520) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecae8). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_VideoData is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d570) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecb38). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_WindowData is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d5c0) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecb88). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLWindow is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d5e8) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecbb0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class Cocoa_WindowListener is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d610) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecbd8). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDLView is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d688) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecc50). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class METAL_RenderData is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d700) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175eccc8). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class METAL_TextureData is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d750) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecd18). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_RumbleMotor is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d778) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecd40). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
objc[8310]: Class SDL_RumbleContext is implemented in both /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib (0x10694d7c8) and /opt/homebrew/Caskroom/miniforge/base/lib/python3.12/site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib (0x1175ecd90). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
[記録] /Volumes/KIOXIA/r2r2r-data/runs/experiments/gamepad_teleop/teleop_20261103_080930
[実機] daemon に送ります。起動したときの姿勢: -0.26 +1.49 +2.10 +0.26 -0.26 -29.79
コントローラーを待っています（つないでいなければ、今つないでください）
[接続] PS4 Controller  GUID=03008fe54c050000cc09000000016800  軸=6  ボタン=16
[送信] j0 -1.0° → -1.26 +1.49 +2.10 +0.26 -0.26 -29.79  届いた（ずれ 1.0°）  届いた角度 -0.26 +1.49 +2.10 +0.26 -0.26 -29.79
[長押し] j0 を -1.05° → -17.13° まで（12 回送信。離したあと最大 3° 先まで動いて止まります）
[受付なし] 前の操作が終わっていません（ためません）
[受付なし] 前の操作が終わっていません（ためません）
  [WARN] daemon_get_angles failed: daemon error: get_angles returned empty/invalid after 12 retries
[関節] 上下で動かす関節を j2 にしました
[受付なし] 前の操作が終わっていません（ためません）
[受付なし] 前の操作が終わっていません（ためません）
[受付なし] 前の操作が終わっていません（ためません）
  [WARN] daemon_get_angles failed: daemon error: get_angles returned empty/invalid after 12 retries
[受付なし] 前の操作が終わっていません（ためません）
[受付なし] 前の操作が終わっていません（ためません）
  [WARN] daemon_get_angles failed: daemon error: get_angles returned empty/invalid after 12 retries
[受付なし] 前の操作が終わっていません（ためません）
[送信] j0 +1.0° → -22.21 +1.49 +2.10 +0.26 -0.26 -29.79  届いた（ずれ 0.79°）  届いた角度 -22.32 +2.28 +2.81 -0.08 -0.26 -29.79
[送信] j2 -1.0° → -22.21 +1.49 +1.10 +0.26 -0.26 -29.79  届いた（ずれ 1.71°）  届いた角度 -21.88 +2.28 +2.81 -0.08 -0.26 -29.79
[送信] j2 -1.0° → -22.21 +1.49 +0.10 +0.26 -0.26 -29.79  届いた（ずれ 2.0°）  届いた角度 -21.88 +2.28 +2.10 -0.08 -0.26 -29.79
[長押し] j2 を +2.10° → -1.93° まで（5 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j2 +1.0° → -22.21 +1.49 -4.02 +0.26 -0.26 -29.79  届いた（ずれ 0.88°）  届いた角度 -21.88 +2.37 -3.33 +0.00 +0.08 -29.79
[長押し] j2 を -3.25° → +0.79° まで（2 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j2 +1.0° → -22.21 +1.49 +4.87 +0.26 -0.26 -29.79  届いた（ずれ 0.88°）  届いた角度 -21.88 +2.37 +4.92 +0.00 +0.08 -29.79
[長押し] j2 を +5.71° → +5.71° まで（1 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j2 -1.0° → -22.21 +1.49 +7.71 +0.26 -0.26 -29.79  届いた（ずれ 2.04°）  届いた角度 -21.88 +2.37 +9.75 +0.00 +0.08 -29.79
[長押し] j2 を +9.66° → -3.42° まで（16 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j2 +1.0° → -22.21 +1.49 -5.60 +0.26 -0.26 -29.79  届いた（ずれ 0.88°）  届いた角度 -21.88 +2.37 -4.83 +0.08 +0.08 -29.79
[長押し] j2 を -4.83° → +24.34° まで（15 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j2 -1.0° → -22.21 +1.49 +26.34 +0.26 -0.26 -29.79  届いた（ずれ 1.6°）  届いた角度 -21.88 +2.37 +27.94 +0.26 +0.08 -29.79
[長押し] j2 を +27.94° → +24.34° まで（6 回送信。離したあと最大 3° 先まで動いて止まります）
[関節] 上下で動かす関節を j3 にしました
[送信] j3 -1.0° → -22.21 +1.49 +20.11 -0.74 -0.26 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 +0.26 +0.08 -29.79
[長押し] j3 を +0.26° → -5.88° まで（5 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j3 +1.0° → -22.21 +1.49 +20.11 -9.38 -0.26 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 -9.40 +0.08 -29.79
[長押し] j3 を -9.40° → +0.35° まで（5 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j3 -1.0° → -22.21 +1.49 +20.11 +2.35 -0.26 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 +2.81 +0.08 -29.79
[長押し] j3 を +2.81° → +0.96° まで（3 回送信。離したあと最大 3° 先まで動いて止まります）
[関節] 上下で動かす関節を j4 にしました
[送信] j4 -1.0° → -22.21 +1.49 +20.11 -2.21 -1.26 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 -1.49 +0.08 -29.79
[長押し] j4 を +0.08° → -48.77° まで（32 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j4 +1.0° → -22.21 +1.49 +20.11 -2.21 -50.77 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 -1.93 -51.50 -29.79
[長押し] j4 を -51.50° → -2.19° まで（40 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j0 -1.0° → -23.21 +1.49 +20.11 -2.21 +2.21 -29.79  届いた（ずれ 1.77°）  届いた角度 -21.88 +2.37 +21.88 -1.93 +1.40 -29.79
[長押し] j0 を -23.02° → -32.25° まで（7 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j0 +1.0° → -34.60 +1.49 +20.11 -2.21 +2.21 -29.79  届いた（ずれ 1.77°）  届いた角度 -34.45 +2.37 +21.88 -2.10 +1.58 -29.79
[長押し] j0 を -34.54° → +28.91° まで（34 回送信。離したあと最大 3° 先まで動いて止まります）
[関節] 上下で動かす関節を j5 にしました
[送信] j5 +2.0° → +31.91 +1.49 +20.11 -2.21 +2.21 -27.79  届いた（ずれ 2.0°）  届いた角度 +31.99 +2.37 +21.88 -2.37 +2.10 -29.79
[送信] j0 -1.0° → +30.91 +1.49 +20.11 -2.21 +2.21 -27.79  届いた（ずれ 2.0°）  届いた角度 +31.99 +2.37 +21.88 -2.37 +2.10 -29.79
[送信] j5 +1.0° → +30.91 +1.49 +20.11 -2.21 +2.21 -26.79  届いた（ずれ 1.77°）  届いた角度 +30.84 +2.37 +21.88 -2.37 +2.10 -27.68
[長押し] j5 を -27.68° → -27.68° まで（1 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j5 -1.0° → +30.91 +1.49 +20.11 -2.21 +2.21 -23.48  届いた（ずれ 1.77°）  届いた角度 +30.84 +2.37 +21.88 -2.37 +2.10 -23.20
[長押し] j5 を -23.20° → -25.40° まで（2 回送信。離したあと最大 3° 先まで動いて止まります）
[関節] 上下で動かす関節を j1 にしました
[送信] j1 -1.0° → +30.91 +0.49 +20.11 -2.21 +2.21 -29.01  届いた（ずれ 1.88°）  届いた角度 +30.84 +2.37 +21.88 -2.37 +2.10 -28.38
[長押し] j1 を +1.75° → -23.20° まで（19 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j1 +2.0° → +30.91 -24.20 +20.11 -2.21 +2.21 -29.01  届いた（ずれ 1.77°）  届いた角度 +30.76 -23.73 +21.88 -2.37 +2.72 -28.65
[長押し] j1 を -23.73° → +7.55° まで（13 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] j1 -1.0° → +30.91 +13.33 +20.11 -2.21 +2.21 -29.01  届いた（ずれ 1.87°）  届いた角度 +30.76 +15.20 +21.88 -2.37 +2.72 -28.74
[長押し] j1 を +15.20° → -9.40° まで（19 回送信。離したあと最大 3° 先まで動いて止まります）
[送信] HOME → +0.00 +0.00 +0.00 +0.00 +0.00 -30.00  届いた（ずれ 1.84°）  届いた角度 +0.08 +0.70 +1.84 -1.14 +1.14 -29.70
^C
[終了] Ctrl+C
[終了] アームは動かしていません。記録: /Volumes/KIOXIA/r2r2r-data/runs/experiments/gamepad_teleop/teleop_20261103_080930
(base) shimazueiichi@shimadzueiichinoMacBook-Pro r2r2r-scripts % 
