-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Implement SlidingJoint #21674
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
Implement SlidingJoint #21674
Conversation
✅ 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:
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.
Update The release notes on the wiki have been updated. |
@moorepants SlidingJoint is also ready, it may have some merge conflicts when PinJoint would be merged though |
Co-authored-by: Jason K. Moore <moorepants@gmail.com>
Co-authored-by: Jason K. Moore <moorepants@gmail.com>
@moorepants This one is ready! |
What about the figure explaining the last, most general, test? |
Will try to show it tomorrow. |
|
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
This looks good but we do not have tests for the most general cases for child_axis, parent_axis, etc. |
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