potentialParentJoints.get(parentIndex).addJoint(currentJoint); RevoluteJoint inverseDynamicsParentJoint = potentialInverseDynamicsParentJoints.get(parentIndex); inverseDynamicsParentBody = inverseDynamicsParentJoint.getSuccessor();
pinJointTwo.addJointWrenchSensor(jointWrenchSensorTwo); assertTrue(jointWrenchSensorTwo == pinJointTwo.getJointWrenchSensor()); pinJointOne.addJoint(pinJointTwo);
robot.addRootJoint(currentJoint); else previousJoint.addJoint(currentJoint);
pinJointTwo.addJointWrenchSensor(jointWrenchSensorTwo); assertTrue(jointWrenchSensorTwo == pinJointTwo.getJointWrenchSensor()); pinJointOne.addJoint(pinJointTwo);
private void createHandle() { // create handle handlePinJoint = new PinJoint("handlePinJoint", new Vector3D(handleOffset.getX(), 0.0, handleOffset.getY()), this, Axis.Y); // handle link handleLink = new Link("handleHorizontalLink"); handleLink.setMass(0.2); handleLink.setMomentOfInertia(0.1, 0.1, 0.1); // TODO handlePinJoint.setLink(handleLink); doorHingePinJoint.addJoint(handlePinJoint); handlePinJoint.setKd(2.0); handlePinJoint.setKp(0.5); }
robotArmPinJoints.get(armJoint).addJoint(robotArmPinJoints.get(armJoint.getChildJoint()));
robotArmPinJoints.get(armJoint).addJoint(robotArmPinJoints.get(armJoint.getChildJoint()));
l_hip_roll.setLink(l_hip_differential2); r_hip_roll.setLink(r_hip_differential2); l_hip_yaw.addJoint(l_hip_roll); r_hip_yaw.addJoint(r_hip_roll); l_hip_pitch.setLink(leftThigh); r_hip_pitch.setLink(rightThigh); l_hip_roll.addJoint(l_hip_pitch); r_hip_roll.addJoint(r_hip_pitch); l_knee_pitch.setLink(l_shin); r_knee_pitch.setLink(r_shin); l_hip_pitch.addJoint(l_knee_pitch); r_hip_pitch.addJoint(r_knee_pitch); l_ankle_pitch.setLink(l_ankle_differential); r_ankle_pitch.setLink(r_ankle_differential); l_knee_pitch.addJoint(r_ankle_pitch); l_knee_pitch.addJoint(r_ankle_pitch); l_ankle_roll.setLink(l_foot); r_ankle_roll.setLink(r_foot); l_ankle_pitch.addJoint(l_ankle_roll); r_ankle_pitch.addJoint(r_ankle_roll);
public TwoLinkRobotForTesting() { super("TwoLink"); this.gravity = 9.81; this.setGravity(0.0, 0.0, -gravity); upperJoint = new PinJoint("upper", new Vector3D(0.0, 0.0, 4.0 * linkLength), this, Axis.Y); //upperJoint.setCartesianPosition(0.0, activeLegLength + passiveLegLength + footLength + 0.13); Link upperArmLink = upperArm(); upperJoint.setLink(upperArmLink); //upperJoint.setDamping(1.0); upperJoint.setLimitStops(-2.0, 5.0, 2.0, 1000.0); upperJoint.setVelocityLimits(7.0, 1000.0); upperJoint.setDynamic(true); this.addRootJoint(upperJoint); elbowJoint = new PinJoint("elbow", new Vector3D(0.0, 0.0, -linkLength), this, Axis.Y); upperJoint.addJoint(elbowJoint); Link lowerArmLink = lowerArm(); elbowJoint.setLink(lowerArmLink); //elbowJoint.setDamping(1.0); elbowJoint.setLimitStops(-4.0, 3.0, 2.0, 1.0); elbowJoint.setVelocityLimits(4.0, 1.0); }
public DoublePendulum() { super("DoublePendulum"); j1 = new PinJoint("j1", new Vector3D(0, 0, 2), this, Axis.X); Link l1 = new Link("l1"); l1.setComOffset(0, 0, 0.5); l1.setMassAndRadiiOfGyration(1.0, 0.05, 0.05, 0.3); l1.addEllipsoidFromMassProperties(YoAppearance.Pink()); j1.setLink(l1); j2 = new PinJoint("j2", new Vector3D(0.0, 0.0, 1.0), this, Axis.X); Link l2 = new Link("l2"); l2.setComOffset(0, 0, 0.5); l2.setMassAndRadiiOfGyration(1.0, 0.05, 0.05, 0.3); l2.addEllipsoidFromMassProperties(YoAppearance.Purple()); j2.setLink(l2); j1.addJoint(j2); addRootJoint(j1); }
public DoublePendulumRobot(String name, double initialQFirstJoint, double initialQdFirstJoint, double initialQSecondJoint, double initialQdSecondJoint) { super(name); pinJoint1 = new PinJoint(name + "Joint1", new Vector3D(), this, axis); Link link1 = new Link(name + "Link1"); link1.setMass(mass1); link1.setMomentOfInertia(Ixx1CoM, 0.0, 0.0); link1.setComOffset(0.0, 0.0, - lengthCoM1); pinJoint1.setLink(link1); pinJoint1.setDamping(damping1); pinJoint2 = new PinJoint(name + "Joint2", new Vector3D(0.0, 0.0, -length1), this, axis); Link link2 = new Link(name + "Link2"); link2.setMass(mass2); link2.setMomentOfInertia(Ixx2CoM, 0.0, 0.0); link2.setComOffset(0.0, 0.0, - lengthCoM2); pinJoint2.setLink(link2); pinJoint2.setDamping(damping2); pinJoint1.addJoint(pinJoint2); pinJoint1.setQ(initialQFirstJoint); pinJoint1.setQd(initialQdFirstJoint); pinJoint2.setQ(initialQSecondJoint); pinJoint2.setQd(initialQdSecondJoint); addRootJoint(pinJoint1); }
pinJoint1.addJoint(pinJoint2);