/** * Builds a new implementation of {@code SphericalJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @return the new spherical joint. */ default SphericalJointBasics buildSphericalJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent) { return new SphericalJoint(name, predecessor, transformToParent); }
@Override public String toString() { return super.toString() + ", configuration: " + jointPose + ", velocity: " + jointTwist + ", acceleration: " + jointAcceleration + ", wrench" + jointWrench; } }
/** * If part of a kinematic loop, this should only be called by that loop's calculator */ @Override public void setQdd(double qdd) { super.setQdd(qdd); }
private RigidBodyBasics createUpperArm(RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("shoulderPitch_y", parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, THIGH_LENGTH / 2.0); return new RigidBody("upperArm", joint, 0.0437, 0.0437, 0.0054, THIGH_MASS, comOffset); }
/** * Builds a new root body. * * @param bodyName the body's name. * @param transformToParent provides the pose of this rigid-body's body-fixed-frame with respect to * the parentStationaryFrame. * @param parentStationaryFrame the parent stationary, i.e. non-moving with respect to world frame, * frame to which this rigid-body will create and attach its body fixed frame. * @return the new root body. */ default RigidBodyBasics buildRoot(String bodyName, RigidBodyTransform transformToParent, ReferenceFrame parentStationaryFrame) { return new RigidBody(bodyName, transformToParent, parentStationaryFrame); }
/** * Builds a new implementation of {@code RevoluteJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @param jointAxis the joint axis. * @return the new revolute joint. */ default RevoluteJointBasics buildRevoluteJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent, Vector3DReadOnly jointAxis) { return new RevoluteJoint(name, predecessor, transformToParent, jointAxis); }
/** * Builds a new implementation of {@code SixDoFJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @return the new 6-DoF joint. */ default SixDoFJointBasics buildSixDoFJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent) { return new SixDoFJoint(name, predecessor, transformToParent); }
@Override public String toString() { String qAsString = String.format(EuclidCoreIOTools.DEFAULT_FORMAT, getQ()); String qdAsString = String.format(EuclidCoreIOTools.DEFAULT_FORMAT, getQd()); String qddAsString = String.format(EuclidCoreIOTools.DEFAULT_FORMAT, getQdd()); String tauAsString = String.format(EuclidCoreIOTools.DEFAULT_FORMAT, getTau()); return super.toString() + ", q: " + qAsString + ", qd: " + qdAsString + ", qdd: " + qddAsString + ", tau: " + tauAsString; } }
/** * If part of a kinematic loop, this should only be called by that loop's calculator */ @Override public void setQ(double q) { super.setQ(q); }
/** * Builds a new implementation of {@code PrismaticJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @param jointAxis the joint axis. * @return the new prismatic joint. */ default PrismaticJointBasics buildPrismaticJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent, Vector3DReadOnly jointAxis) { return new PrismaticJoint(name, predecessor, transformToParent, jointAxis); }
/** * If part of a kinematic loop, this should only be called by that loop's calculator */ @Override public void setQd(double qd) { super.setQd(qd); }
/** * Builds a new implementation of {@code PlanarJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @return the new planar joint. */ default PlanarJointBasics buildPlanarJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent) { return new PlanarJoint(name, predecessor, transformToParent); }
/** * Builds a new implementation of {@code FixedJointBasics}. * * @param name the joint name. * @param predecessor the predecessor of the joint. * @param transformToParent the transform to the frame after the parent joint. * @return the new fixed joint. */ default FixedJointBasics buildFixedJoint(String name, RigidBodyBasics predecessor, RigidBodyTransform transformToParent) { return new FixedJoint(name, predecessor, transformToParent); } }
@Override public String getName() { return inverseDynamicsJoint.getName(); } }
private RigidBodyBasics createHand(RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("wristPitch_y", parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, SHIN_LENGTH / 4.0); return new RigidBody("hand", joint, 0.0437, 0.0437, 0.0054, FOOT_MASS, comOffset); }
private RigidBodyBasics createUpperArm(RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("shoulderPitch_y", parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(Math.toRadians(20)); Vector3D comOffset = new Vector3D(0.0, 0.0, THIGH_LENGTH / 2.0); return new RigidBody("upperArm", joint, 0.0437, 0.0437, 0.0054, THIGH_MASS, comOffset); }
private RigidBodyBasics createLowerArm(String suffix, RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("elbow_y_" + suffix, parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, SHIN_LENGTH / 2.0); return new RigidBody("lowerArm" + suffix, joint, 0.0437, 0.0437, 0.0054, SHIN_MASS, comOffset); }
private RigidBodyBasics createUpperArm(RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("shoulderPitch_y", parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, THIGH_LENGTH / 2.0); return new RigidBody("upperArm", joint, 0.0437, 0.0437, 0.0054, THIGH_MASS, comOffset); }
private RigidBodyBasics createHand(String suffix, RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("wristPitch_y_" + suffix, parentBody, new Vector3D(0.0, 0.0, 0.0), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, SHIN_LENGTH / 4.0); return new RigidBody("hand" + suffix, joint, 0.0437, 0.0437, 0.0054, FOOT_MASS, comOffset); }
private RigidBodyBasics createHand(String suffix, RigidBodyBasics parentBody) { RevoluteJoint joint = new RevoluteJoint("wristPitch_y_" + suffix, parentBody, new Vector3D(0.0, 0.0, SHIN_LENGTH), Y); joint.setQ(random.nextDouble()); Vector3D comOffset = new Vector3D(0.0, 0.0, SHIN_LENGTH / 4.0); return new RigidBody("hand" + suffix, joint, 0.0437, 0.0437, 0.0054, FOOT_MASS, comOffset); }