-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix #122 by enabling joints to connect rods and rigid bodies #149
Fix #122 by enabling joints to connect rods and rigid bodies #149
Conversation
…CosseratRod class
…thods to CosseratRod
…igidBodyBase` class
Only significant change: Instead computing the direction of the second system using the deviation in positions between nodes, we use director of the `index_two`. This formulation is also compatible with child classes of `RigidBodyBase`
…ity_of_point` of `RigidBodyBase`
Codecov Report
@@ Coverage Diff @@
## update-0.3.0 #149 +/- ##
=============================================
Coverage 87.62% 87.62%
=============================================
Files 43 43
Lines 2820 2820
Branches 368 368
=============================================
Hits 2471 2471
Misses 328 328
Partials 21 21
Continue to review full report at Codecov.
|
@armantekinalp @skim0119 @bhosale2 Can you guys please do a first round of reviews of this PR? As soon as we have settled on the specifications of the class / function interfaces, I will implement the necessary tests for connecting rods with rigid bodies. |
@mstoelzle is the simulation in second video explodes ? |
@mstoelzle we can focus on this one after #143 is completed, which is closer to completion. |
… two connecting points of the joint
- Tangent direction is along z-axis, not x-axis
- Prevent disconvergence issues - The old implementation didn't normalize the link direction
@bhosale2 Thanks for your suggestions. I addressed all of them and I also fixed a bug in the changes for the |
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.
Super minor stuff.
examples/JointCases/experimental/generic_system_type_fixed_joint.py
Outdated
Show resolved
Hide resolved
examples/JointCases/experimental/generic_system_type_spherical_joint.py
Outdated
Show resolved
Hide resolved
…_joint.py Co-authored-by: Yashraj Bhosale <yashraj.iitb@gmail.com>
…nt.py Co-authored-by: Yashraj Bhosale <yashraj.iitb@gmail.com>
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.
LGTM. @skim0119 please take over.
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.
@mstoelzle LGTM. Minor changes for documentation consistency.
@armantekinalp Do you think we should make a nightly
doc page that includes experimental modules?
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Seung Hyun Kim <skim0119@gmail.com>
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
elastica/experimental/connection_contact_joint/generic_system_type_connection.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Seung Hyun Kim <skim0119@gmail.com>
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.
Looks good. I haven't run the test and examples, but we'll check them before releasing v0.3
Features and Changes
This issue fixes #122 by implementing the following changes and features:
FreeJoint
,HingeJoint
, andFixedJoint
FreeJoint
constrains the translational movement of both systems at the specified connection point. As the point of joint connection doesn't necessarily coincide with the center of mass of the rigid body or the node of the rod, the user can use thepoint_system_one
andpoint_system_two
parameters to specify how the connection point relates to the node / CoM in the local frame of the system.HingeJoint
, thelink_direction
of the second system is now extracted from thedirector_collection
instead of subtracting node positionsFixedJoint
class now also accepts thepoint_system_one
andpoint_system_two
parameters and forwards them to the parent classFreeJoint
Examples of Usage
How to connect two Cosserat rods together using a spherical joint with a gap of 0.01 m in between.
How to connect the distal end of a CosseratRod with the base of a cylinder using a spherical joint.
How to connect a cosserat rod with the base of a cylinder using a fixed joint, where the cylinder is rotated by 45 degrees around the y-axis.
Results from
JointCases
Spherical joint:
System consisting of two rods and one cylinder connected with spherical joints. The sinusoidal force is applied to the second rod. Example can be run using:
spherical_joint_example.mp4
Fixed joint:
System consisting of two rods and one cylinder connected with fixed joints. The sinusoidal force is applied to the second rod. Example can be run using:
fixed_joint_example.mp4
TODOs
point_system_one
andpoint_system_two
parametersspherical_joint.py
example as third element.fixed_joint.py
example as third element