-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adding switch statements to incorporate FixedPositive and FixedNegative Constraint6DOF #549
base: develop
Are you sure you want to change the base?
Adding switch statements to incorporate FixedPositive and FixedNegative Constraint6DOF #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start @Nazeefa710! Some suggestions below.
We should also make sure we can Pull back to the supports correctly.
//if (constraint.TranslationZ == DOFType.Fixed) | ||
// suppData.UZ = 1; | ||
//else if (constraint.TranslationZ == DOFType.FixedPositive) | ||
// suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_PLUS); | ||
//else if (constraint.TranslationZ == DOFType.FixedNegative) | ||
// suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_MINUS); | ||
//else | ||
// suppData.UZ = 0; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//if (constraint.TranslationZ == DOFType.Fixed) | |
// suppData.UZ = 1; | |
//else if (constraint.TranslationZ == DOFType.FixedPositive) | |
// suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_PLUS); | |
//else if (constraint.TranslationZ == DOFType.FixedNegative) | |
// suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_MINUS); | |
//else | |
// suppData.UZ = 0; |
Remove commented code,
//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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//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; |
Remove commented code,
break; | ||
} | ||
|
||
switch (constraint.TranslationX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch (constraint.TranslationX) | |
switch (constraint.TranslationX) |
Can these be in order of X,Y and Z. We also need to add the rotations.
Tested using test script (530 test script). |
…ode and put translations in order of x, y, z.
Tested 12/08/24 using test script |
switch (constraint.RotationZ) | ||
{ | ||
case DOFType.Fixed: | ||
suppData.UZ = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suppData.UZ = 1; | |
suppData.RZ = 1; | |
Issues addressed by this PR
Closes #530
Test files
https://burohappold.sharepoint.com/:f:/s/BHoM/EvWSc5Jc0PtFvwM7upa8hRAB65IoKfVBQrjlRdRF3ucbtg?e=FMujFI
Changelog
FixedNegative
andFixedPositive
Constraint6DOF
.Additional comments