Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC] Joints framework documentation #23730

Merged
merged 5 commits into from Jul 14, 2022

Conversation

tjstienstra
Copy link
Contributor

References to other Issues or PRs

Brief description of what is fixed or changed

Fixes #21705.
Add general explanation about the joints framework within the physics/mechanics module.
Add images explaining the PinJoint and PrismaticJoint.
Add the JointsMethod docstring to the online documentation.

Other comments

Release Notes

  • other
    • Add documentation about the joints framework in the physics/mechanics module.

@sympy-bot
Copy link

sympy-bot commented Jul 6, 2022

Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • other
    • Add documentation about the joints framework in the physics/mechanics module. (#23730 by @TJStienstra)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.11.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed
Fixes #21705.
Add general explanation about the joints framework within the physics/mechanics module.
Add images explaining the `PinJoint` and `PrismaticJoint`.
Add the `JointsMethod` docstring to the online documentation.

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* other
  * Add documentation about the joints framework in the physics/mechanics module.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@sympy-bot
Copy link

sympy-bot commented Jul 6, 2022

🟠

Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it.

This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75.

The following commits add new files:

  • 7ea2a7b:
    • doc/src/modules/physics/mechanics/api/PinJoint.svg
    • doc/src/modules/physics/mechanics/api/PrismaticJoint.svg
  • 09191ff:
    • doc/src/modules/physics/mechanics/joints.rst
  • a712dea:
    • doc/src/modules/physics/mechanics/api/PinJoint.png
    • doc/src/modules/physics/mechanics/api/PrismaticJoint.png

If these files were added/deleted on purpose, you can ignore this message.

@tjstienstra tjstienstra changed the title Joints framework documentation [GSoC] Joints framework documentation Jul 7, 2022
@tjstienstra
Copy link
Contributor Author

@brocksam

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [77f1d79c]       [806603dc]
     <sympy-1.10.1^0>                 
+      27.9±0.4μs         75.3±3μs     2.70  matrices.TimeMatrixExpression.time_MatAdd
+         129±3ms          224±4ms     1.74  sum.TimeSum.time_doit

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@tjstienstra tjstienstra marked this pull request as ready for review July 8, 2022 06:54
@moorepants
Copy link
Member

I'm seeing some issues in this image in the preview:
image

For the child body these are called the ``child_point`` and ``child_joint_pos``.
The orientation of the joint in each body is defined by the ``parent_axis`` and ``child_axis``.
These two vectors are aligned as explained in the :class:`~.Joint` notes and are in the image parallel to the orange vector.
As last the joint also needs :func:`~.dynamicsymbols` as generalized coordinates and speeds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess people could create these joints to just get static connections of bodies, so having a dynamicsymbol isn't strictly needed.

@moorepants
Copy link
Member

Make both png and svg. Fix the few notes and this is good.

@moorepants moorepants merged commit 3c6e48e into sympy:master Jul 14, 2022
@moorepants
Copy link
Member

I thought about this a bit more and may not regret merged the png file.
image

I'm not sure we have an other png's in the repo and I didn't check the size of this one. It is > 2 Mb.

@moorepants
Copy link
Member

There are some more pngs, but this one is a bit excessive in size:

moorepants@nandi:sympy(master)$ find . -name *.png -exec ls -lh {} \;
-rw-rw-r-- 1 moorepants moorepants 8,7K mrt 30  2021 ./sympy/plotting/tests/test_region_or.png
-rw-rw-r-- 1 moorepants moorepants 7,8K mrt 30  2021 ./sympy/plotting/tests/test_region_not.png
-rw-rw-r-- 1 moorepants moorepants 9,8K mrt 30  2021 ./sympy/plotting/tests/test_region_xor.png
-rw-rw-r-- 1 moorepants moorepants 6,8K mrt 30  2021 ./sympy/plotting/tests/test_region_and.png
-rw-rw-r-- 1 moorepants moorepants 68K jul 15 09:39 ./doc/src/_static/sympylogo.png
-rw-rw-r-- 1 moorepants moorepants 164K mrt 30  2021 ./doc/src/_static/sympylogo_big.png
-rw-rw-r-- 1 moorepants moorepants 138K mrt 30  2021 ./doc/src/pics/consoleascii.png
-rw-rw-r-- 1 moorepants moorepants 119K mrt 30  2021 ./doc/src/pics/consoleunicode.png
-rw-rw-r-- 1 moorepants moorepants 37K mrt 30  2021 ./doc/src/pics/ipythonnotebook.png
-rw-rw-r-- 1 moorepants moorepants 239K mrt 30  2021 ./doc/src/pics/ipythonqtconsole.png
-rw-rw-r-- 1 moorepants moorepants 3,2K mrt 30  2021 ./doc/src/pics/pngview1.png
-rw-rw-r-- 1 moorepants moorepants 1,4M jul 15 09:40 ./doc/src/modules/physics/mechanics/api/PrismaticJoint.png
-rw-rw-r-- 1 moorepants moorepants 2,3M jul 15 09:40 ./doc/src/modules/physics/mechanics/api/PinJoint.png
-rw-rw-r-- 1 moorepants moorepants 68K jul 15 09:39 ./doc/src/modules/physics/mechanics/examples/multidof-holonomic.png
-rw-rw-r-- 1 moorepants moorepants 173K jul 15 09:40 ./doc/src/modules/physics/continuum_mechanics/truss_example.png
-rw-rw-r-- 1 moorepants moorepants 46K jul 15 09:39 ./doc/src/modules/physics/continuum_mechanics/ildshear.png
-rw-rw-r-- 1 moorepants moorepants 8,8K mrt 30  2021 ./doc/src/modules/physics/continuum_mechanics/allowed-sign-conventions.png
-rw-rw-r-- 1 moorepants moorepants 31K jul 15 09:39 ./doc/src/modules/physics/continuum_mechanics/ildreaction.png

@moorepants
Copy link
Member

@tjstienstra I know you have a nice way of drawing these figures, but I think we need to stick to svg figures that are editable. We already seem to have a not so great precedent set with some images in the physics docs.

@tjstienstra
Copy link
Contributor Author

Okay, than I'll go and work on some SVGs this week to replace them.

@tjstienstra tjstienstra deleted the JointsDocumentation branch August 23, 2022 08:50
@moorepants moorepants added the CZI: Codegen/Biomech Sam Brockie's CZI-funded postdoc work on codegen and biomechanics label Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CZI: Codegen/Biomech Sam Brockie's CZI-funded postdoc work on codegen and biomechanics Documentation physics.mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a figure to explain the parent_axis, child_axis, parent_pos, and child_pos vectors in Joint.
4 participants