public void applyForceDelayed(StateTransitionCondition pushCondition, double timeDelay, Vector3DReadOnly direction, double magnitude, double duration) { this.pushCondition = pushCondition; setPushDuration(duration); setPushForceDirection(direction); setPushForceMagnitude(magnitude); setPushDelay(timeDelay); applyForce(); }
public void applyForceDelayed(StateTransitionCondition pushCondition, double timeDelay, Vector3d direction, double magnitude, double duration) { this.pushCondition = pushCondition; setPushDuration(duration); setPushForceDirection(direction); setPushForceMagnitude(magnitude); setPushDelay(timeDelay); applyForce(); }
private boolean standAndPush() throws SimulationExceededMaximumTimeException { assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(1.0)); pushController.applyForce(new Vector3D(1.0, 0.0, 0.0), getDoubleSupportPushMagnitude(), getDoubleSupportPushDuration()); return drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(10.0); }
@ContinuousIntegrationTest(estimatedDuration = 0.1, categoriesOverride = IntegrationCategory.EXCLUDE) @Test(timeout=300000) public void TestPushTowardsTheFront() throws SimulationExceededMaximumTimeException, InterruptedException, ControllerFailureException { BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows()); setupTest(getRobotModel()); // setup all parameters Vector3D forceDirection = new Vector3D(0.5, 1.0, 0.0); double magnitude = 8000.0; double duration = 0.05; // double percentInSwing = 0.4; // RobotSide side = RobotSide.LEFT; // apply the push // testPush(forceDirection, magnitude, duration, percentInSwing, side, swingStartConditions, swingTime); blockingSimulationRunner.simulateAndBlock(8.0); pushRobotController.applyForce(forceDirection, magnitude, duration); BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows()); }
pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration); pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration);
pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration); pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration);
@ContinuousIntegrationTest(estimatedDuration = 42.1) @Test(timeout = 210000) public void testPushForwardInDoubleSupport() throws SimulationExceededMaximumTimeException, InterruptedException, ControllerFailureException { BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows()); setupTest(getRobotModel()); SimulationConstructionSet scs = drcFlatGroundWalkingTrack.getSimulationConstructionSet(); double forceMagnitude = 400.0; double forceDuration = 0.15; Vector3D forceDirection = new Vector3D(1.0, 0.0, 0.0); blockingSimulationRunner = new BlockingSimulationRunner(scs, 1000.0); YoBoolean walk = (YoBoolean) scs.getVariable("ContinuousStepGenerator", "walkCSG"); // disable walking walk.set(false); blockingSimulationRunner.simulateAndBlock(3.0); // push the robot pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration); // simulate for a little while longer blockingSimulationRunner.simulateAndBlock(forceDuration + 5.0); assertRobotDidNotFall(); BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows()); }
@ContinuousIntegrationTest(estimatedDuration = 65.0) @Test(timeout = 320000) public void testPushForwardInDoubleSupportAndContinueWalking() throws SimulationExceededMaximumTimeException, InterruptedException, ControllerFailureException { BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows()); setupTest(getRobotModel()); SimulationConstructionSet scs = drcFlatGroundWalkingTrack.getSimulationConstructionSet(); double forceMagnitude = 400.0; double forceDuration = 0.15; Vector3D forceDirection = new Vector3D(1.0, 0.0, 0.0); blockingSimulationRunner = new BlockingSimulationRunner(scs, 1000.0); YoBoolean walk = (YoBoolean) scs.getVariable("ContinuousStepGenerator", "walkCSG"); // disable walking walk.set(false); blockingSimulationRunner.simulateAndBlock(3.0); // push the robot pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration); // simulate for a little while longer blockingSimulationRunner.simulateAndBlock(forceDuration + 4.0); assertRobotDidNotFall(); //re-enable walking walk.set(true); blockingSimulationRunner.simulateAndBlock(6.0); assertRobotDidNotFall(); BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows()); }
@ContinuousIntegrationTest(estimatedDuration = 58.8) @Test(timeout = 290000) public void testPushBackwardInDoubleSupportAndContinueWalking() throws SimulationExceededMaximumTimeException, InterruptedException, ControllerFailureException { BambooTools.reportTestStartedMessage(simulationTestingParameters.getShowWindows()); setupTest(getRobotModel()); SimulationConstructionSet scs = drcFlatGroundWalkingTrack.getSimulationConstructionSet(); double forceMagnitude = -400.0; double forceDuration = 0.15; Vector3D forceDirection = new Vector3D(1.0, 0.0, 0.0); blockingSimulationRunner = new BlockingSimulationRunner(scs, 1000.0); YoBoolean walk = (YoBoolean) scs.getVariable("ContinuousStepGenerator", "walkCSG"); // disable walking walk.set(false); blockingSimulationRunner.simulateAndBlock(3.0); // push the robot pushRobotController.applyForce(forceDirection, forceMagnitude, forceDuration); // simulate for a little while longer blockingSimulationRunner.simulateAndBlock(forceDuration + 3.0); assertRobotDidNotFall(); //re-enable walking walk.set(true); blockingSimulationRunner.simulateAndBlock(6.0); assertRobotDidNotFall(); BambooTools.reportTestFinishedMessage(simulationTestingParameters.getShowWindows()); }
1.0 / forceMagnitude); drcSimulationTestHelper.getSimulationConstructionSet().addYoGraphic(pushController.getForceVisualizer()); pushController.applyForce(new Vector3D(0.0, 0.0, 1.0), forceMagnitude, Double.POSITIVE_INFINITY);
private boolean stepAndPush() throws SimulationExceededMaximumTimeException { assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(1.0)); FootstepDataListMessage message = HumanoidMessageTools.createFootstepDataListMessage(3.0, 0.3); FootstepDataMessage footstepData = new FootstepDataMessage(); RobotSide stepSide = RobotSide.LEFT; double xOffset = getXOffsetForSteps(); ReferenceFrame soleFrame = drcSimulationTestHelper.getControllerFullRobotModel().getSoleFrame(stepSide); FramePoint3D placeToStepInWorld = new FramePoint3D(soleFrame, 0.3, 0.0, 0.0); placeToStepInWorld.changeFrame(worldFrame); footstepData.getLocation().set(placeToStepInWorld); footstepData.getOrientation().set(new Quaternion(0.0, 0.0, 0.0, 1.0)); footstepData.setRobotSide(stepSide.toByte()); message.getFootstepDataList().add().set(footstepData); drcSimulationTestHelper.publishToController(message); assertTrue(drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(2.0)); // push the robot pushController.applyForce(new Vector3D(0.0, -1.0, 0.0), getSingleSupportPushMagnitude(), getSingleSupportPushDuration()); return drcSimulationTestHelper.simulateAndBlockAndCatchExceptions(5.0); }
1.0 / forceMagnitude); drcSimulationTestHelper.getSimulationConstructionSet().addYoGraphic(pushController.getForceVisualizer()); pushController.applyForce(new Vector3D(1.0, 0.0, 0.0), forceMagnitude, Double.POSITIVE_INFINITY);
double magnitude = percentWeight * totalMass * 9.81; double duration = 2.0; pushRobotController.applyForce(forceDirection, magnitude, duration);