Lukas,
When using ChLinkBushing, you need to access the various individual ChLinkForce objects, using ChLinkLock::GetForceX(), ChLinkLock::GetForceY(), etc. (see https://api.projectchrono.org/classchrono_1_1_ch_link_lock.html ) and then invoke the GetF() method on each one (see https://api.projectchrono.org/classchrono_1_1_ch_link_force.html).
I realize that this is a bit too convoluted, so I will add a ChLinkBushing functions to directly return the bushing force and torque.
As a side note, ChLinkBushing is implemented as a “free” joint with internal forces on the 6 DOFs, so it is no surprise that Get_react_force() returns all zeros (there are no constraints).
For ChLoadBodyBodyBushingGeneric, use ChLoadBodyBody::GetForce() and ChLoadBodyBody::GetTorque() (see https://api.projectchrono.org/classchrono_1_1_ch_load_body_body.html).
--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/c70dc292-4f6b-478d-a34e-268c16a3d79fn%40googlegroups.com.
Hi Lukas,
Sorry, I gave you the wrong function name (GetF returns the value of the preload in a ChLinkForce, something that is not set for a ChLinkBushing). The correct function to use is ChLinkForce::GetForce, but that one is cumbersome to use as it takes some arguments (you can access the required values, but that’s not a good API).
So, I added two functions ChLinkBushing::GetForce and ChLinkBushing::GetTorque which directly return the quantities you want.
(Note that I cleaned up a bit the ChLinkBushing class and that resulted in a change to the enum used to specicy the type of bushing (Mount or Spherical) – see the updated demo)
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/c55bd0bf-4831-4ced-b02e-1273add587dan%40googlegroups.com.