Skip to content

docs(notebooks): modernise two-link-dynamics.ipynb, including the sign convention of gravity - #853

Merged
petercorke merged 3 commits into
mainfrom
docs/notebook-two-link-dynamics
Oct 19, 2026
Merged

petercorke merged 3 commits into
mainfrom
docs/notebook-two-link-dynamics

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Notebook renovation, two-link-dynamics.ipynb. It had 3 error cells against main, and a wrong answer that raised no error; it now has none of either. No change to the toolbox.

What changed

  • robot.dyntable() is now robot.dynamics().
  • ELink, ERobot, ETS.rz() and ETS.tx() are now Link, Robot, ET.Rz() and ET.tx().
  • The sign of gravity. The notebook set gravity=[0, g, 0] and said that "accelerating upward at g provides the weight force". With the current convention, gravity is the acceleration due to gravity (default [0, 0, -9.81]) and gravload is the torque needed to hold the arm up, so the arm in this figure (y up) needs [0, -g, 0]. With [0, g, 0] the comparison against the analytic Euler-Lagrange torques printed [-19.62 -4.905] vs [19.62, 4.905]; the outputs that were saved in the notebook before chore(notebooks): generated bootstrap cell, no committed outputs, and a Pyodide install check in CI #848 showed them agreeing. Checked against the Puma 560, whose shoulder gravload at qn is +31.64, as in MATLAB. The prose now says this.
  • The standard generated first cell (docs(notebooks): a standard generated first cell, and a shorter bootstrap cell #850) with the modernised note, and the trailing empty cells removed.

After the change, the DH model, the ETS model and the analytic formulas agree for all four configurations, for the gravity and for the velocity terms. Executed headless against main (0 error cells). Not tried in a browser. Written with AI assistance (Claude Code).

🤖 Generated with Claude Code

…n convention of gravity

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke enabled auto-merge (squash) October 19, 2026 08:13
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (2d8abf1) to head (41217fd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #853   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        146     146           
  Lines      16866   16866           
=====================================
  Misses     16866   16866           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petercorke
petercorke merged commit e778eb6 into main Oct 19, 2026
22 of 23 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
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