Dear Radu,

Thanks for your urgent reply! 
I will work on building a simple system and look into the time step 
setting. Thanks!

I have one more question:
What will a joint do when the joint already fails? I can understand that a 
improper time step will make the prismatic joint (from motor link) fail a 
little (like, a little displacement in the constrainted direction), but 
will it always cause an avalanche in failure, like the joint is totally 
missing?

Thanks,

On Thursday, March 14, 2024 at 3:53:28 AM UTC-4 Radu Serban wrote:

> Yaqing,
>
>  
>
> I only looked briefly over the code you sent, so I may be missing 
> something else.
>
>  
>
> Many of these issues are likely due to misconfiguration of your Chrono 
> code.  This is in large part due to confusing API of the Chrono code and 
> something we’re currently working on. In a few days we will merge into the 
> main branch a pretty extensive refactoring of the Chrono code which we hope 
> will make things less confusing for users.
>
>  
>
> As you correctly inferred, the linear motor with prismatic guide 
> constraints will act like a prismatic joint with an actuated translation 
> DOF.  The fact that the constraints are not satisfied suggests that the 
> simulation is not properly converged.  Reducing the step size would be the 
> first thing to try.  I noticed that you use DoFrameDynamics to advance the 
> system state.  Yet, you do not change the integration step size with a call 
> to ChSystem::SetStep.  Without that, Chrono will use the default step size 
> and you likely end up taking a single step between those “frames”.  By the 
> way, this is one of the things that will be changed in the refactored API 
> (the signature of DoFrameDynamics will explicitly ask for the integration 
> step size).  In the meantime, I suggest you switch to using DoStepDynamics 
> and experiment with different step sizes.
>
>  
>
> The problem you ran into when you tried to add a (redundant) prismatic 
> joint is again likely due to inconsistency in the current Chrono API.  
> Indeed, the specification of a linear motor with prismatic constraints and 
> a prismatic joint assume different frames (the former assumes the 
> (actuated) translational DOF is in the X directions, while the latter 
> assumes the translational DOF is in the Z direction). If this is not 
> properly taken into account, adding the prismatic joint will effectively 
> lock the mechanism.  Again, something that is being straightened out in the 
> refactoring I mentioned.
>
>  
>
> Finally, to resolve the problems you have with actuating your mechanism, I 
> suggest you start with a simpler setup. Start with a mechanism that only 
> includes the ellipsoid body and the linear motor and make sure you get that 
> working properly. Then add the other components and bodies.
>
>  
>
> --Radu
>
>  
>
> *From:* [email protected] <[email protected]> *On 
> Behalf Of *Yaqing Wang
> *Sent:* Thursday, March 14, 2024 3:30 AM
> *To:* ProjectChrono <[email protected]>
> *Subject:* [chrono] "ChLinkMotorLinearPosition" fails to serve as a 
> prismatic link
>
>  
>
> Hi,
>
> I am having a problem: the "ChLinkMotorLinearPosition" fails to serve as a 
> prismatic link after some time.
>
> I want to simulate an ellipsoid (blue-ish) hanging on a rod under a slider 
> (called LA) that goes to two beams (green), and the slider should push the 
> rod forward and constrain it from moving laterally and vertically.
>
> But now, in my simulation, the rod can drop to the ground.
> See videos:
> At the top left, the robot drops before contacting the beams.
> At the top right, I deleted the link between the rod and the robot, and 
> this dropping of the rod still happens but is postponed.
> At the bottom left, I added a prismatic link to secure this sliding 
> motion, but the system is not moving but only shaking, maybe due to 
> over-constraint.
>
> Here is the motor code.
> auto motor = chrono_types::make_shared<ChLinkMotorLinearPosition>();
> motor->Initialize(LA, rod, ChFrame<>(ChVector<>(0, 0.02, 0), 
> Q_from_AngY(CH_C_PI/2)));
> motor->SetGuideConstraint(ChLinkMotorLinear::GuideConstraint::PRISMATIC);
> motor->SetMotionFunction(f_ramp2);
> mphysicalSystem.Add(motor);
>
> Here are the files:
>
> https://www.dropbox.com/scl/fi/uqv0wvjow36n694436w5f/v2_feedback_vis.zip?rlkey=2o8jqw3o3l7p34lnbeza8b9py&dl=0
>  
> <https://urldefense.com/v3/__https:/www.dropbox.com/scl/fi/uqv0wvjow36n694436w5f/v2_feedback_vis.zip?rlkey=2o8jqw3o3l7p34lnbeza8b9py&dl=0__;!!Mak6IKo!O4deCfyUfKTqEV6QHn8TQ2RnqrZO7CTh2KPpCpvfxl5sZJ-GIZs7Bhp4sblUjq6wEtjQ1o8Y98uiNVC5gspj7Q$>
>
> And here are the videos, on page 3:
>
> https://www.dropbox.com/scl/fi/zadvx4oonw8zp71u7i6gs/Yaqing_20240313_learn_Chrono.pptx?rlkey=3rpnrv9r34k1g0bi3tu847vhw&dl=0
>  
> <https://urldefense.com/v3/__https:/www.dropbox.com/scl/fi/zadvx4oonw8zp71u7i6gs/Yaqing_20240313_learn_Chrono.pptx?rlkey=3rpnrv9r34k1g0bi3tu847vhw&dl=0__;!!Mak6IKo!O4deCfyUfKTqEV6QHn8TQ2RnqrZO7CTh2KPpCpvfxl5sZJ-GIZs7Bhp4sblUjq6wEtjQ1o8Y98uiNVAMtNKyEg$>
>
> Would anyone help?
>
> Thanks,
> Yaqing
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ProjectChrono" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/projectchrono/377d4585-3ec1-409f-b684-eaa0d036febcn%40googlegroups.com
>  
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/377d4585-3ec1-409f-b684-eaa0d036febcn*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!O4deCfyUfKTqEV6QHn8TQ2RnqrZO7CTh2KPpCpvfxl5sZJ-GIZs7Bhp4sblUjq6wEtjQ1o8Y98uiNVA-rIlMvw$>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/d0d8ea5b-ae3a-4190-8f6f-d8806d364c59n%40googlegroups.com.

Reply via email to