/** * Sums the inertia of all the rigid-bodies composing the subtree that originates at {@code joint} * including {@code joint.getSuccessor()}. * <p> * WARNING: This method generates garbage. * </p> * * @param joint the root of the subtree. * @return the subtree total inertia. */ public static SpatialInertia computeSubtreeInertia(JointReadOnly joint) { return computeSubtreeInertia(joint.getSuccessor()); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(rigidBody.getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }
public void includeIgnoredSubtreeInertia() { if (!isRoot() && children.size() != rigidBody.getChildrenJoints().size()) { for (JointReadOnly childJoint : rigidBody.getChildrenJoints()) { if (input.getJointsToIgnore().contains(childJoint)) { SpatialInertia subtreeIneria = MultiBodySystemTools.computeSubtreeInertia(childJoint); subtreeIneria.changeFrame(rigidBody.getBodyFixedFrame()); bodyInertia.add(subtreeIneria); } } } for (int childIndex = 0; childIndex < children.size(); childIndex++) children.get(childIndex).includeIgnoredSubtreeInertia(); }