docs: detailed documentation of pidog/preset_actions.py - #3
Merged
Conversation
Co-Authored-By: Pascal Desmet <dpwp81@outlook.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/preset_actions.md, completing the trio withdocs/pidog.mdanddocs/action_flow.md. Documentation only, no code changes.Starts with the conventions that make every routine readable — the 8-value leg frame layout (
[LF hip, LF knee, RF hip, RF knee, LH hip, LH knee, RH hip, RH knee], mirrored left/right, most frames being perturbations ofsit = [30, 60, -30, -60, 80, -45, -80, 45]),head_movevshead_move_raw(gimbal blend vs servo space), and why the placement ofwait_all_done()between queuedlegs_move/head_movecalls is the actual choreography (both before one wait ⇒ simultaneous; a wait between ⇒ sequential). Then walks all 24 routines, grouped: front-paw tricks, full-body motions, the bark/alert family, idle, procedural sin/cos head animations, expressive poses, and sound-led sequences.Things that are hard to see from the code alone:
# Note 1decodes as: leg index 7 is dropped45 → 38inscratch/hand_shake/high_fiveto brace the right hind leg against the tipping moment of a raised front paw.nodusesamplitude*cos(...) − amplitude, which maps the cosine into[-2A, 0]— the head only ever dips, never rises above neutral.relax_neckphase 1 puts pitch 90° out of phase (sin(x − π/2)) with yaw/roll, which is what traces a cone rather than a line.bark_action/attack_postureare the only routines using foot coordinates throughlegs_angle_calculationIK instead of hand-tuned joint angles.sit_2_stand'sL1brace pose exists because a direct sit→stand interpolation slips;stand_anglesis computed, so it respectsActionDict.set_height()/set_barycenter().sleep(2.34)inhowlingand the 6-iteration loop inpantare tuned to the mp3 lengths.Also records 14 issues, e.g.
flustercomputescurrent_legs/L1/L2/leg1and discards them (leg half commented out),waiting()declaresglobal last_waitfor a variable that doesn't exist,sit_2_standfetches unusedsit_angles,howlingnever restores the RGB strip mode, the 4-framehand_down_angsblock is duplicated verbatim three times, and the missing__all__meansaction_flow.pydepends onrandomleaking in viafrom .preset_actions import *.Link to Devin session: https://app.devin.ai/sessions/7111583235ea4084a505cf2a925fd7aa
Requested by: @PascalDesmet