private static void recursivelyAddJoints(Joint joint, List<Joint> allJoints) { allJoints.add(joint); for (Joint child : joint.getChildrenJoints()) { recursivelyAddJoints(child, allJoints); } } }
private static HashSet<Link> getAllLinks(ArrayList<Joint> joints, HashSet<Link> links) { for (Joint joint : joints) { links.add(joint.getLink()); if (!joint.getChildrenJoints().isEmpty()) { links.addAll(getAllLinks(joint.getChildrenJoints(), links)); } } return links; }
private HashSet<Link> getAllLinks(ArrayList<Joint> joints, HashSet<Link> links) { for (Joint j : joints) { links.add(j.getLink()); if (!j.getChildrenJoints().isEmpty()) { links.addAll(getAllLinks(j.getChildrenJoints(), links)); } } return links; }
private void recursivelyAddJointTorqueProfile(Joint joint) { joints.add(joint); amplitudes.add(RandomNumbers.nextDouble(random, 0.1, 1.0)); omegas.add(RandomNumbers.nextDouble(random, 0.5, 3.0)); for(Joint childJoint : joint.getChildrenJoints()) { recursivelyAddJointTorqueProfile(childJoint); } }
private void recursivelyAddPinJoints(Joint joint, List<PinJoint> pinJoints) { if (joint instanceof PinJoint) pinJoints.add((PinJoint) joint); else if (DEBUG && !(joint instanceof FloatingJoint)) PrintTools.error("Joint " + joint.getName() + " not currently handled by " + getClass().getSimpleName()); for (Joint child : joint.getChildrenJoints()) { recursivelyAddPinJoints(child, pinJoints); } } }
private static void recursivelyAddPinJoints(Joint joint, List<PinJoint> pinJoints) { if (joint instanceof PinJoint) pinJoints.add((PinJoint) joint); else if (DEBUG && !(joint instanceof FloatingJoint)) PrintTools.error("Joint " + joint.getName() + " not currently handled by " + DataExporterExcelWorkbookCreator.class.getSimpleName()); for (Joint child : joint.getChildrenJoints()) { recursivelyAddPinJoints(child, pinJoints); } }
SinusoidalTorqueController(Robot robot) { this.t = robot.getYoTime(); this.registry = new YoVariableRegistry(robot.getName() + getClass().getSimpleName()); Joint rootJoint = robot.getRootJoints().get(0); for(Joint childJoint : rootJoint.getChildrenJoints()) { recursivelyAddJointTorqueProfile(childJoint); } }
ArrayList<Joint> childrenJointsA = jointA.getChildrenJoints(); ArrayList<Joint> childrenJointsB = jointB.getChildrenJoints();
for (Joint child : joint.getChildrenJoints())
printLinkInformation(link, buffer); ArrayList<Joint> childrenJoints = joint.getChildrenJoints();
jointQueue.addAll(polledJoint.getChildrenJoints());
jointQueue.addAll(polledJoint.getChildrenJoints());