Skip to content

Conversation

sidhu1012
Copy link
Contributor

@sidhu1012 sidhu1012 commented Jun 28, 2021

References to other Issues or PRs

#21519

Brief description of what is fixed or changed

Added SlidingJoint Class

Other comments

ping @moorepants @Sc0rpi0n101

Release Notes

  • physics.mechanics
    • Implemented a PrismaticJoint class that generate the kinematics of a prismatic joint.

@sidhu1012 sidhu1012 requested a review from moorepants as a code owner June 28, 2021 05:49
@sympy-bot
Copy link

sympy-bot commented Jun 28, 2021

Hi, I am the SymPy bot (v161). 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:

  • physics.mechanics
    • Implemented a PrismaticJoint class that generate the kinematics of a prismatic joint. (#21674 by @sidhu1012)

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

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. -->
#21519

#### Brief description of what is fixed or changed
Added SlidingJoint Class

#### Other comments
ping @moorepants @Sc0rpi0n101 

#### 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 -->
* physics.mechanics
    * Implemented a PrismaticJoint class that generate the kinematics of a prismatic joint.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@sidhu1012
Copy link
Contributor Author

@moorepants SlidingJoint is also ready, it may have some merge conflicts when PinJoint would be merged though

sidhu1012 and others added 2 commits July 9, 2021 21:49
Co-authored-by: Jason K. Moore <moorepants@gmail.com>
Co-authored-by: Jason K. Moore <moorepants@gmail.com>
@sidhu1012 sidhu1012 requested a review from moorepants July 10, 2021 06:27
@sidhu1012 sidhu1012 requested a review from moorepants July 15, 2021 05:10
@sidhu1012
Copy link
Contributor Author

@moorepants This one is ready!

@moorepants
Copy link
Member

@moorepants This one is ready!

What about the figure explaining the last, most general, test?

@sidhu1012
Copy link
Contributor Author

What about the figure explaining the last, most general, test?

Will try to show it tomorrow.

@sidhu1012
Copy link
Contributor Author

What about the figure explaining the last, most general, test?

https://github.com/sympy/sympy/pull/21674/files#r671642338

assert C.masscenter.pos_from(P.masscenter).express(N) == \
(m + n/3 + x)*N.x + (2*n/3 - x)*N.y + (-2*n/3 + x)*N.z
assert C.masscenter.vel(N) == v*N.x - v*N.y + v*N.z
assert C.masscenter.vel(N).express(A) == v*A.x + v*A.y - v*A.z
Copy link
Member

Choose a reason for hiding this comment

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

The magnitudes of these two vectors should be v.

PrismaticJoint('S', P, C, parent_joint_pos=m*N.x, child_joint_pos=n*A.x,
child_axis=A.x+A.y-A.z, parent_axis=N.x-N.y+N.z)
assert (N.x-N.y+N.z).angle_between(A.x+A.y-A.z) == 0 #Axis are aligned
assert (A.x-A.y+A.z).express(N) == - 5/3*N.x - 1/3*N.y + 1/3*N.z
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert (A.x-A.y+A.z).express(N) == - 5/3*N.x - 1/3*N.y + 1/3*N.z
assert (A.x+A.y-A.z).express(N) == - 5/3*N.x - 1/3*N.y + 1/3*N.z

@moorepants moorepants enabled auto-merge July 20, 2021 07:48
@moorepants
Copy link
Member

This looks good but we do not have tests for the most general cases for child_axis, parent_axis, etc.

@moorepants moorepants merged commit 1eb8d77 into sympy:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants