private boolean isJointInNeedOfReducedGains(SDFJointHolder pinJoint) { String jointName = pinJoint.getName(); return jointName.contains("f0") || jointName.contains("f1") || jointName.contains("f2") || jointName.contains("f3") || jointName.contains("palm") || jointName.contains("finger"); }
public void setLimits(double lowerLimit, double upperLimit) { if (upperLimit > lowerLimit) { hasLimits = true; this.upperLimit = upperLimit; this.lowerLimit = lowerLimit; } else { hasLimits = false; this.upperLimit = Double.POSITIVE_INFINITY; this.lowerLimit = Double.NEGATIVE_INFINITY; PrintTools.debug(DEBUG, this, getName() + " has invalid joint limits. LowerLimit = " + lowerLimit + ", UpperLimit = " + upperLimit + ". Using LowerLimit = " + lowerLimit + ", UpperLimit = " + upperLimit + " instead."); } } }
addSimulationContactPoint(joint.getName(), gcOffset); if (joint.getName().equals(jointMap.getJointBeforeFootName(robotSide))) break; else if (joint.getName().equals(jointMap.getJointBeforeHandName(robotSide))) break; else if (joint.getName().equals(jointMap.getChestName())) break; else if (joint.getName().equals(jointMap.getPelvisName())) break; else if (joint.getName().equals(jointMap.getNameOfJointBeforeThighs().get(robotSide))) System.err.println("Contacts with '" + joint.getName() + "' are not supported (" + name + ")");
addSimulationContactPoint(joint.getName(), gcOffset); if (joint.getName().equals(jointMap.getJointBeforeFootName(robotSide))) break; else if (joint.getName().equals(jointMap.getJointBeforeHandName(robotSide))) break; else if (joint.getName().equals(jointMap.getChestName())) break; else if (joint.getName().equals(jointMap.getPelvisName())) break; else if (joint.getName().equals(jointMap.getNameOfJointBeforeThighs().get(robotSide))) System.err.println("Contacts with '" + joint.getName() + "' are not supported (" + name + ")");
private void addForceSensor(SDFJointHolder joint, JointNameMap jointNameMap) { if (joint.getForceSensors().size() > 0) { String[] jointNamesBeforeFeet = jointNameMap.getJointNamesBeforeFeet(); String jointName = joint.getName(); String sanitizedJointName = ModelFileLoaderConversionsHelper.sanitizeJointName(jointName); JointDescription scsJoint = jointDescriptions.get(sanitizedJointName); boolean jointIsParentOfFoot = false; for (int i = 0; i < jointNamesBeforeFeet.length; i++) { if (jointName.equals(jointNamesBeforeFeet[i])) { jointIsParentOfFoot = true; } } for (SDFForceSensor forceSensor : joint.getForceSensors()) { ForceSensorDescription forceSensorDescription = new ForceSensorDescription(forceSensor.getName(), forceSensor.getTransform()); forceSensorDescription.setUseGroundContactPoints(jointIsParentOfFoot); forceSensorDescription.setUseShapeCollision(useShapeCollision); scsJoint.addForceSensor(forceSensorDescription); } } } }
recursivelyAddLinks(joint.getName(), joint.getChildLinkHolder());
recursivelyAddLinks(joint.getName(), joint.getChildLinkHolder());