public void initializeRobot(Robot robot, DRCRobotModel robotModel, YoGraphicsListRegistry yoGraphicsListRegistry) { robot.setGravity(gravity); LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, robot.getRobotsYoVariableRegistry()); robotModel.getContactPointParameters().setupGroundContactModelParameters(groundContactModel, simulateDT); if (enableGroundSlipping) groundContactModel.enableSlipping(); if (Double.isFinite(groundAlphaStick) && Double.isFinite(groundAlphaSlip)) groundContactModel.setAlphaStickSlip(groundAlphaStick, groundAlphaSlip); if (groundProfile3D != null) groundContactModel.setGroundProfile3D(groundProfile3D); robot.setGroundContactModel(groundContactModel); }
@Override public void setupGroundContactModelParameters(LinearGroundContactModel linearGroundContactModel) { linearGroundContactModel.setZStiffness(1500.0); linearGroundContactModel.setZDamping(750.0); linearGroundContactModel.setXYStiffness(25000.0); linearGroundContactModel.setXYDamping(750.0); } }
groundContactModel = new LinearGroundContactModel(sdfRobot.get(), sdfRobot.get().getRobotsYoVariableRegistry()); groundContactModel.setZStiffness(groundContactParameters.get().getZStiffness()); groundContactModel.setZDamping(groundContactParameters.get().getZDamping()); groundContactModel.setXYStiffness(groundContactParameters.get().getXYStiffness()); groundContactModel.setXYDamping(groundContactParameters.get().getXYDamping()); groundContactModel.setGroundProfile3D(groundProfile3D);
public void initializeRobot(Robot robot, DRCRobotModel robotModel, YoGraphicsListRegistry yoGraphicsListRegistry) { robot.setGravity(gravity); LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, robot.getRobotsYoVariableRegistry()); robotModel.getContactPointParameters().setupGroundContactModelParameters(groundContactModel); // if ((commonTerrain.getSteppingStones() != null) && (yoGraphicsListRegistry != null)) // commonTerrain.registerSteppingStonesArtifact(yoGraphicsListRegistry); // groundContactModel.setGroundProfile(commonTerrain.getGroundProfile()); if (groundProfile3D != null) groundContactModel.setGroundProfile3D(groundProfile3D); // TODO: change this to scs.setGroundContactModel(groundContactModel); robot.setGroundContactModel(groundContactModel); }
public DRCDrillEnvironment() { double forceVectorScale = 1.0 / 500.0; combinedTerrainObject = new CombinedTerrainObject3D(getClass().getSimpleName()); combinedTerrainObject.addTerrainObject(setUpGround("Ground", tableCenter, 0.1)); RigidBodyTransform initialDrillTransform = new RigidBodyTransform(new AxisAngle4d(), tableCenter); drillRobot = new ContactableCylinderRobot("drill", initialDrillTransform , drillRadius, drillHeight, drillMass, "models/drill.obj"); final int groundContactGroupIdentifier = 0; drillRobot.createAvailableContactPoints(groundContactGroupIdentifier, 30, forceVectorScale, true); for (int i = 0; i < 4; i++) { double angle = i * 2.0 * Math.PI / 4.0; double x = 1.5 * drillRadius * Math.cos(angle); double y = 1.5 * drillRadius * Math.sin(angle); GroundContactPoint groundContactPoint = new GroundContactPoint("gc_drill_" + i, new Vector3d(x, y, 0.0), drillRobot); drillRobot.getRootJoints().get(0).addGroundContactPoint(groundContactPoint); } GroundContactModel groundContactModel = new LinearGroundContactModel(drillRobot, groundContactGroupIdentifier,1422.0, 150.6, 50.0, 600.0, drillRobot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(combinedTerrainObject); drillRobot.setGroundContactModel(groundContactModel); robots.add(drillRobot); }
public void initializeRobot(Robot robot, DRCRobotModel robotModel, YoGraphicsListRegistry yoGraphicsListRegistry) { robot.setGravity(gravity); LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, robot.getRobotsYoVariableRegistry()); robotModel.getContactPointParameters().setupGroundContactModelParameters(groundContactModel); // if ((commonTerrain.getSteppingStones() != null) && (yoGraphicsListRegistry != null)) // commonTerrain.registerSteppingStonesArtifact(yoGraphicsListRegistry); // groundContactModel.setGroundProfile(commonTerrain.getGroundProfile()); if (groundProfile3D != null) groundContactModel.setGroundProfile3D(groundProfile3D); // TODO: change this to scs.setGroundContactModel(groundContactModel); robot.setGroundContactModel(groundContactModel); }
public HandDrillManipulationEnvironment() { double forceVectorScale = 1.0 / 500.0; combinedTerrainObject = new CombinedTerrainObject3D(getClass().getSimpleName()); combinedTerrainObject.addTerrainObject(setUpGround("Ground", tableCenter, 0.1)); RigidBodyTransform initialDrillTransform = new RigidBodyTransform(new AxisAngle(), tableCenter); drillRobot = new ContactableCylinderRobot("drill", initialDrillTransform , drillRadius, drillHeight, drillMass, "models/drill.obj"); final int groundContactGroupIdentifier = 0; drillRobot.createAvailableContactPoints(groundContactGroupIdentifier, 30, forceVectorScale, true); for (int i = 0; i < 4; i++) { double angle = i * 2.0 * Math.PI / 4.0; double x = 1.5 * drillRadius * Math.cos(angle); double y = 1.5 * drillRadius * Math.sin(angle); GroundContactPoint groundContactPoint = new GroundContactPoint("gc_drill_" + i, new Vector3D(x, y, 0.0), drillRobot); drillRobot.getRootJoints().get(0).addGroundContactPoint(groundContactPoint); } GroundContactModel groundContactModel = new LinearGroundContactModel(drillRobot, groundContactGroupIdentifier,1422.0, 150.6, 50.0, 600.0, drillRobot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(combinedTerrainObject); drillRobot.setGroundContactModel(groundContactModel); robots.add(drillRobot); }
@Override public void setupGroundContactModelParameters(LinearGroundContactModel linearGroundContactModel) { linearGroundContactModel.setZStiffness(1500.0); linearGroundContactModel.setZDamping(750.0); linearGroundContactModel.setXYStiffness(25000.0); linearGroundContactModel.setXYDamping(750.0); } }
double groundBxy = 2000.0; LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, groundKxy, groundBxy, groundKz, groundBz, robot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(groundProfile3D);
private void createDrill() { Vector3D tableCenter = new Vector3D(-0.851, -6.833, 1.118); double drillHeight = 0.3; double drillRadius = 0.03; double drillMass = 1.5; double forceVectorScale = 1.0 / 500.0; RigidBodyTransform initialDrillTransform = new RigidBodyTransform(new AxisAngle(), tableCenter); ContactableCylinderRobot drillRobot = new ContactableCylinderRobot("drill", initialDrillTransform, drillRadius, drillHeight, drillMass, "models/drill.obj"); final int groundContactGroupIdentifier = 0; drillRobot.createAvailableContactPoints(groundContactGroupIdentifier, 30, forceVectorScale, true); for (int i = 0; i < 4; i++) { double angle = i * 2.0 * Math.PI / 4.0; double x = 1.5 * drillRadius * Math.cos(angle); double y = 1.5 * drillRadius * Math.sin(angle); GroundContactPoint groundContactPoint = new GroundContactPoint("gc_drill_" + i, new Vector3D(x, y, 0.0), drillRobot); drillRobot.getRootJoints().get(0).addGroundContactPoint(groundContactPoint); } GroundContactModel groundContactModel = new LinearGroundContactModel(drillRobot, groundContactGroupIdentifier, 1422.0, 150.6, 50.0, 600.0, drillRobot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(combinedTerrainObject); drillRobot.setGroundContactModel(groundContactModel); contactableRobots.add(drillRobot); combinedTerrainObject.addBox(-0.777, -6.916, -0.947, -6.746, 1.061, 1.08); }
public void setupGroundContactModelParameters(LinearGroundContactModel linearGroundContactModel) { if (useSoftGroundContactParameters) { linearGroundContactModel.setZStiffness(4000.0); linearGroundContactModel.setZDamping(750.0); linearGroundContactModel.setXYStiffness(50000.0); linearGroundContactModel.setXYDamping(1000.0); } else { linearGroundContactModel.setZStiffness(2000.0); linearGroundContactModel.setZDamping(1500.0); linearGroundContactModel.setXYStiffness(50000.0); linearGroundContactModel.setXYDamping(2000.0); } }
double groundBxy = 2000.0; LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, groundKxy, groundBxy, groundKz, groundBz, robot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(groundProfile3D);
private void createDrill() { Vector3d tableCenter = new Vector3d(-0.851, -6.833, 1.118); double drillHeight = 0.3; double drillRadius = 0.03; double drillMass = 1.5; double forceVectorScale = 1.0 / 500.0; RigidBodyTransform initialDrillTransform = new RigidBodyTransform(new AxisAngle4d(), tableCenter); ContactableCylinderRobot drillRobot = new ContactableCylinderRobot("drill", initialDrillTransform, drillRadius, drillHeight, drillMass, "models/drill.obj"); final int groundContactGroupIdentifier = 0; drillRobot.createAvailableContactPoints(groundContactGroupIdentifier, 30, forceVectorScale, true); for (int i = 0; i < 4; i++) { double angle = i * 2.0 * Math.PI / 4.0; double x = 1.5 * drillRadius * Math.cos(angle); double y = 1.5 * drillRadius * Math.sin(angle); GroundContactPoint groundContactPoint = new GroundContactPoint("gc_drill_" + i, new Vector3d(x, y, 0.0), drillRobot); drillRobot.getRootJoints().get(0).addGroundContactPoint(groundContactPoint); } GroundContactModel groundContactModel = new LinearGroundContactModel(drillRobot, groundContactGroupIdentifier, 1422.0, 150.6, 50.0, 600.0, drillRobot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(combinedTerrainObject); drillRobot.setGroundContactModel(groundContactModel); contactableRobots.add(drillRobot); combinedTerrainObject.addBox(-0.777, -6.916, -0.947, -6.746, 1.061, 1.08); }
public void setupGroundContactModelParameters(LinearGroundContactModel linearGroundContactModel, double simDT) { // The gains were computed for simDT = 0.0001sec. This assumes that the gains should be inversely proportional to the simulation DT. double simDTRef = 0.0001; if (useSoftGroundContactParameters) { double scale = Math.pow(simDTRef / simDT, 0.25); linearGroundContactModel.setZStiffness(4000.0 * scale); linearGroundContactModel.setZDamping(750.0 * scale); linearGroundContactModel.setXYStiffness(50000.0 * scale); linearGroundContactModel.setXYDamping(1000.0 * scale); } else { double scale = Math.pow(simDTRef / simDT, 0.6); linearGroundContactModel.setZStiffness(2000.0 * scale); linearGroundContactModel.setZDamping(1500.0 * scale); linearGroundContactModel.setXYStiffness(50000.0 * scale); linearGroundContactModel.setXYDamping(2000.0 * scale); } }
double groundBxy = 2000.0; LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, groundKxy, groundBxy, groundKz, groundBz, robot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(groundProfile3D);
public FootstepVisualizer(GroundProfile3D groundProfile, Graphics3DObject linkGraphics, int maxNumberOfFootstepsPerSide, int maxContactPointsPerFoot, String description) { nullRobot = new Robot("FootstepVisualizerRobot"); if (groundProfile != null) { GroundContactModel gcModel = new LinearGroundContactModel(nullRobot, nullRobot.getRobotsYoVariableRegistry()); gcModel.setGroundProfile3D(groundProfile); nullRobot.setGroundContactModel(gcModel); } scs = new SimulationConstructionSet(nullRobot); if (linkGraphics != null) { scs.setGroundVisible(false); scs.addStaticLinkGraphics(linkGraphics); } printifdebug("Attaching exit listener"); scs.setDT(1, 1); yoGraphicsListRegistry = new YoGraphicsListRegistry(); bagOfSingleFootstepVisualizers = new BagOfSingleFootstepVisualizers(maxNumberOfFootstepsPerSide, maxContactPointsPerFoot, registry, yoGraphicsListRegistry); addText(scs, yoGraphicsListRegistry, description); }
double groundBxy = 2000.0; LinearGroundContactModel groundContactModel = new LinearGroundContactModel(robot, groundKxy, groundBxy, groundKz, groundBz, robot.getRobotsYoVariableRegistry()); groundContactModel.setGroundProfile3D(groundProfile3D);
public FootstepVisualizer(GroundProfile3D groundProfile, Graphics3DObject linkGraphics, int maxNumberOfFootstepsPerSide, int maxContactPointsPerFoot, String description) { nullRobot = new Robot("FootstepVisualizerRobot"); if (groundProfile != null) { GroundContactModel gcModel = new LinearGroundContactModel(nullRobot, nullRobot.getRobotsYoVariableRegistry()); gcModel.setGroundProfile3D(groundProfile); nullRobot.setGroundContactModel(gcModel); } scs = new SimulationConstructionSet(nullRobot); if (linkGraphics != null) { scs.setGroundVisible(false); scs.addStaticLinkGraphics(linkGraphics); } printifdebug("Attaching exit listener"); scs.setDT(1, 1); yoGraphicsListRegistry = new YoGraphicsListRegistry(); bagOfSingleFootstepVisualizers = new BagOfSingleFootstepVisualizers(maxNumberOfFootstepsPerSide, maxContactPointsPerFoot, registry, yoGraphicsListRegistry); addText(scs, yoGraphicsListRegistry, description); }
ballRobot.getRootJoints().get(0).addGroundContactPoint(gc); LinearGroundContactModel ballGCModel = new LinearGroundContactModel(ballRobot, ballRobot.getRobotsYoVariableRegistry()); ballGCModel.setGroundProfile3D(terrain); ballRobot.setGroundContactModel(ballGCModel); ballRobot.setPosition(centerX, centerY, 0.8 + ballRadius + 0.1);