Skip to content

Piąta oś ramienia (serwo pochylenia kamery) + firmware RoArm z komendami dla dodatkowego serwa - #2

Open
Xeross99 wants to merge 1 commit into
mainfrom
robot-axis-5
Open

Piąta oś ramienia (serwo pochylenia kamery) + firmware RoArm z komendami dla dodatkowego serwa#2
Xeross99 wants to merge 1 commit into
mainfrom
robot-axis-5

Conversation

@Xeross99

@Xeross99 Xeross99 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Co

Ramię RoArm-M2-S dostało piąte serwo (ST3215 na magistrali, za osią 4) pochylające aparat — jedno ustawienie produktu daje ujęcie z góry i skos 45°.

  • Firmware (firmware/roarm_m2_ext_servo/): sketch Waveshare (źródła z wiki 2026‑06‑30) + ext_servo.h z komendami 130 (kąt), 131 (odczyt), 132 (moment), 134 (bezpieczna zmiana ID) i poprawką callbacku ESP‑NOW pod arduino‑esp32 ≥ 3.3. Skompilowane, wgrane i sprawdzone na ramieniu; README z instrukcją krok po kroku.
  • Aplikacja: ROBOT_EXT_SERVO_ID (oś 5, 0 = fabryczne ramię), ujęcia z pięcioma kątami, obsługa osi 5 w robot.py/webui.py/panelu Ustawień, tools/roarm_ext_servo_id.py do nadania ID.
  • Puszczanie serw przez 132 broadcast — fabryczne 210 cmd:0 w tym firmware parkuje ramię i wisi, gdy operator je trzyma.
  • Dociąganie po dojeździe (_settle): serwa stają przed celem pod ciężarem aparatu (łokieć 4,4°, głowica 7–13°, wzmocnienie P nic nie daje) — osie są dociągane do celu w do 4 rundach z pamiętaną poprawką per ujęcie; zapis ujęcia od razu sprawdza, czy silniki je utrzymają (oś 4 ma twardy koniec ok. −107°).
  • Przejazd dwufazowy (najpierw w górę, potem obrót) — zrobiony, domyślnie wyłączony (ROBOT_LIFT_FIRST).
  • Ustawienia → „Robot — ujęcia” per ujęcie: klik w kafelek przestawia ramię i dopiero wtedy pokazuje korektę, puszczanie serw i zapis. Karta wchodzi do klucza rebuildu ekranu (wcześniej kąty na żywo zamierały).
  • Autodetekcja portu zna CP2102N (ta płytka nie jest CH343).

Test

Na ramieniu z aparatem: firmware odpowiada na 105/131/134/130, serwo dostało ID 16, przejazdy „z góry” ↔ „z boku” kończą z błędem ≤ 1° po dociąganiu (4–6 s), puszczanie/łapanie serw przełącza się natychmiast. Kod Pythona dodatkowo na atrapie portu, karta Ustawień renderowana w node na atrapie stanu.

Wersja 1.7.0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bsh4jRVfu5sY1TVyPLoD3G

RoArm-M2-S gets an extra ST3215 bus servo behind joint 4 that tilts the
camera, so one product placement yields both the top-down and the 3/4
shot. The stock Waveshare firmware only knows servos 11-15, so
firmware/roarm_m2_ext_servo/ ships the vendor sketch (wiki 2026-06-30
sources) plus ext_servo.h with commands 130-134 (angle, feedback,
torque, safe ID change) and a fix for the ESP-NOW callback signature on
arduino-esp32 >= 3.3. Compiled, flashed and verified on the arm.

App side:
- ROBOT_EXT_SERVO_ID / ROBOT_AXES; poses now carry five angles, stale
  four-angle entries are skipped with a warning.
- robot.py reads/moves axis 5 through the new commands (replies parsed
  directly from the port under the SDK lock).
- Torque release goes through command 132 broadcast: the 2026 firmware
  parks the arm inside T:210 and hangs while the operator holds it.
- Post-move settle: servos stop short under the camera's weight (elbow
  4.4 deg, head 7-13 deg, not fixable by P gain); axes are pulled to the
  target in up to 4 rounds with a per-pose trim, arrival is verified
  after settling, and saving a pose immediately checks the motors can
  hold it (axis 4 hard-stops around -107 deg).
- Optional two-phase move (lift before turn), off by default.
- Settings: "Robot - ujecia" card is now per pose: click a tile, the arm
  drives there, then the nudge rows, torque and save controls appear.
  The card is keyed into the settings rebuild so live angles update.
- tools/roarm_ext_servo_id.py assigns the servo ID; CP2102N VID added
  to port autodetection (this board is not CH343).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bsh4jRVfu5sY1TVyPLoD3G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant