Geneal Conditional Contact Problem

Hi Anybody,

I have a model, which has used conditional contact to define the feet/ground contact. In addition, I have to make the contact between the right hand and ground in certain stage. There is a confliction in the definition. Can you help to resolve the issue?

Thanks,

John Wu

Roofer_01.zip (283.0 KB)

Hi John,

Unfortunately, I am not able to load the model with the current AMMR version (v2.4.4). Can you please let me know which AMS/AMMR versions have you used for this model?

Can you please also share a screenshot of the error that you are getting also showing the code which is causing the error?

Thanks,

Best regards,
Dave

Dave,

Thanks for your message. I used the AMMR in version 7.2, which is version 2.2.3.

I think I made the model working now by defining a secondary GlobalRef.

I have a further question. How to change the display color and opacity of the "TriggerVolume" in the ConditionalContactClass? Here is my code:

ConditionalContactClass RightHandSupport (
BaseObject = Main.Model.EnvironmentModel.GlobalRoofR,
TargetObject = Main.Model.BodyModel.Right.ShoulderArm.Seg.Hand.Ref,
DisplayTriggerVolume = 1,
DisplayTargetNode =1
) = {
UserDefinedLimitLow = -0.2;
UserDefinedLimitHigh = 0.1;
UserDefinedRadiusLimit = 1.0;
Strength = 200;
StaticFrictionCoefficient = 0.4;
NormalDirection = Y;
FrictionDirection1 = X;
FrictionDirection2 = Z;
};

John

Hi John,

That's good to know! I think I understand the error you faced. Sometimes, you need to specify a unique node that is used with the Conditional Contact Class template as it defines new objects. If the same node (e.g., GlobalRef) is used multiple times, then the class template will try to create the same objects inside GlobalRef multiple times and the code would complain at the second instance of the class template since the new objects that must be defined by the class template would exist already.

Regarding updating the display properties of the trigger volume, please try the following lines:

ConditionalContactClass RightHandSupport (
BaseObject = Main.Model.EnvironmentModel.GlobalRef.Hand,
TargetObject = Main.Model.BodyModel.Right.ShoulderArm.Seg.Hand.Ref,
DisplayTriggerVolume = 1,
DisplayTargetNode =1
) = {
  // these lines set the display properties of the trigger volume
  BaseObject.CylRotNode.CylNode.TriggerCyl = {
    viewSurface = {
      Visible = On;
      Opacity = 0.10;
      RGB = {1,1,0};
    };
  };
  
UserDefinedLimitLow = -0.2;
UserDefinedLimitHigh = 0.1;
UserDefinedRadiusLimit = 1.0;
Strength = 200;
StaticFrictionCoefficient = 0.4;
NormalDirection = Y;
FrictionDirection1 = X;
FrictionDirection2 = Z;
};

I hope this helps.

Lastly, I would also suggest you update to the latest AMS version to get some new functionalities such as the ??= operator that allows you to define a variable with a default value that can be overwritten somewhere else in the model. Or, the possibility to set default values in class template using the format (e.g.): #var RGB = #default; These functionalities really facilitate the user to make changes to a specific model without needing to find the exact line where the value has been defined.

Best regards,
Dave