Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOFType: FixedPositive/FixedNegative for Translation in Constrain6DOF Not Working #530

Open
dextertuay99 opened this issue Nov 27, 2023 · 3 comments · May be fixed by #549
Open

DOFType: FixedPositive/FixedNegative for Translation in Constrain6DOF Not Working #530

dextertuay99 opened this issue Nov 27, 2023 · 3 comments · May be fixed by #549
Assignees
Labels
type:bug Error or unexpected behaviour

Comments

@dextertuay99
Copy link

keyword: BHoM, Robot, Panel, Edges, Support

Description:
I would like to assign at the same time, both:

  • Rigid Support with either +ve/-ve uplift
  • Elastic Support with elastic coef.

However, I notice there's no difference between DOFType FixedPositive/FixedNegative

Steps to reproduce:

  • DOFType: FixedPositive
  • Constrain6DOF: TranslationX
  • Edge: Support
  • Edges: Curve <- ExternalEdges <- Object (pull from Robot)
  • Panel: externalEdges
  • Push (to robot): object

Expected behaviour:
I'm expecting for both:

  • Rigid Support with either +ve/-ve uplift
  • Elastic Support with elastic coef.

Any help?

@dextertuay99 dextertuay99 added the type:bug Error or unexpected behaviour label Nov 27, 2023
@FraserGreenroyd
Copy link
Contributor

@Chrisshort92 @peterjamesnugent @johannaisak can any of you help?

@peterjamesnugent
Copy link
Member

Hi @dextertuay99, I believe it is because DOFType.FixedPositive and DOFType.FixedNegative are not currently implemented within the Robot_Toolkit - hence why they are coming back as DOFType.Free when you push them in to Robot:

public static void ToRobot(IRobotNodeSupportData suppData, Constraint6DOF constraint)
{
suppData.UX = constraint.TranslationX == DOFType.Fixed ? 1 : 0;
suppData.UY = constraint.TranslationY == DOFType.Fixed ? 1 : 0;
suppData.UZ = constraint.TranslationZ == DOFType.Fixed ? 1 : 0;
suppData.RX = constraint.RotationX == DOFType.Fixed ? 1 : 0;
suppData.RY = constraint.RotationY == DOFType.Fixed ? 1 : 0;
suppData.RZ = constraint.RotationZ == DOFType.Fixed ? 1 : 0;
suppData.KX = constraint.TranslationalStiffnessX;
suppData.KY = constraint.TranslationalStiffnessY;
suppData.KZ = constraint.TranslationalStiffnessZ;
suppData.HX = constraint.RotationalStiffnessX;
suppData.HY = constraint.RotationalStiffnessY;
suppData.HZ = constraint.RotationalStiffnessZ;
}

The current implementation supports DOFType Fixed, Free and Spring.

Do you have any experience using Robot API? If this is a bug you could write a fix for, I would be happy to assist and review.

@peterjamesnugent
Copy link
Member

@dextertuay99 will be something along the lines of this:
suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_PLUS);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
5 participants