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
--
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
projectchron...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/377d4585-3ec1-409f-b684-eaa0d036febcn%40googlegroups.com.