I defined two AnyRefNodes 1.Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Humerus.CenterNode_right and
2. Main.Model.EnvironmentModel.UpExo_Right.CenterNode,
I want to define a spring force. The force value depends on the real-time distance between two nodes, like F=500*(distance). The direction of the spring force is the same as the line connecting the two points. Could you tell me how to do it? Thank you!
Best,
TJ
I am trying to build a class_template for CreateSpringForce. But it seems like there are some mistakes in these class_template.
I just swapped the start and end points of the force. In theory, the two forces should be in a straight line, but the simulation results do not. Could you please give me some hints?
I think this is related to your other question about the class_template.
Your linear measure in the template use the local refernce system of the the BaseFrame so you get two different coordinate systems. If you set the Ref=-1 you express the linear measure in global coordinates.