Tabnine Logo
PipeLine
Code IndexAdd Tabnine to your IDE (free)

How to use
PipeLine
in
us.ihmc.tools.taskExecutor

Best Java code snippets using us.ihmc.tools.taskExecutor.PipeLine (Showing top 20 results out of 315)

origin: us.ihmc/IHMCJavaToolkit

public void submitAll(List<Task> tasks)
{
 for (Task task : tasks)
 {
   submitSingleTaskStage(task);
 }
}
origin: us.ihmc/IHMCJavaToolkit

public void submitAll(T executorKey, List<Task> tasks)
{
 for (Task task : tasks)
 {
   submitTaskForPallelPipesStage(executorKey, task);
 }
}
origin: us.ihmc/IHMCHumanoidBehaviors

@Override
public void onBehaviorAborted()
{
 pipeLine.clearAll();
}
origin: us.ihmc/ihmc-humanoid-behaviors

private void submitFootstepPose(boolean parallelize, RobotSide robotSide, FramePose3D desiredFootstepPose)
{
 FramePose3D footPose = new FramePose3D(desiredFootstepPose);
 FootstepTask footstepTask = new FootstepTask(fullRobotModel, robotSide, footstepListBehavior, footPose);
 if (parallelize)
   pipeLine.submitTaskForPallelPipesStage(footstepListBehavior, footstepTask);
 else
   pipeLine.submitSingleTaskStage(footstepTask);
}
origin: us.ihmc/ihmc-humanoid-behaviors

private void setUpPipeline()
 pipeLine.clearAll();
 BehaviorAction setStanceTask = new BehaviorAction(footListBehavior)
 pipeLine.requestNewStage();
 pipeLine.submitSingleTaskStage(setStanceTask2);
 pipeLine.requestNewStage();
 pipeLine.submitSingleTaskStage(movePelvisTask);
 pipeLine.requestNewStage();
 pipeLine.submitTaskForPallelPipesStage(rightArmBehavior, moveRightPreTask);
 pipeLine.submitTaskForPallelPipesStage(rightArmBehavior, moveLeftPreTask);
 pipeLine.requestNewStage();
 pipeLine.submitTaskForPallelPipesStage(leftArmBehavior, moveLeftFinalTask);
 pipeLine.submitTaskForPallelPipesStage(leftArmBehavior, moveRightFinalTask);
 pipeLine.requestNewStage();
 pipeLine.submitSingleTaskStage(movePelvisTask2);
origin: us.ihmc/ihmc-humanoid-behaviors

private void setupPipeline()
{
 publishTextToSpeack("Resetting Robot Pose");
 pipeLine.clearAll();
 //RESET BODY POSITIONS *******************************************
 GoHomeMessage goHomeChestMessage = HumanoidMessageTools.createGoHomeMessage(HumanoidBodyPart.CHEST, 2);
 GoHomeTask goHomeChestTask = new GoHomeTask(goHomeChestMessage, chestGoHomeBehavior);
 GoHomeMessage goHomepelvisMessage = HumanoidMessageTools.createGoHomeMessage(HumanoidBodyPart.PELVIS, 2);
 GoHomeTask goHomePelvisTask = new GoHomeTask(goHomepelvisMessage, pelvisGoHomeBehavior);
 GoHomeMessage goHomeLeftArmMessage = HumanoidMessageTools.createGoHomeMessage(HumanoidBodyPart.ARM, RobotSide.LEFT, 2);
 GoHomeTask goHomeLeftArmTask = new GoHomeTask(goHomeLeftArmMessage, armGoHomeLeftBehavior);
 GoHomeMessage goHomeRightArmMessage = HumanoidMessageTools.createGoHomeMessage(HumanoidBodyPart.ARM, RobotSide.RIGHT, 2);
 GoHomeTask goHomeRightArmTask = new GoHomeTask(goHomeRightArmMessage, armGoHomeRightBehavior);
 pipeLine.requestNewStage();
 if (rightArm)
   pipeLine.submitSingleTaskStage(goHomeRightArmTask);
 if (leftArm)
   pipeLine.submitSingleTaskStage(goHomeLeftArmTask);
 if (chest)
   pipeLine.submitSingleTaskStage(goHomeChestTask);
 if (pelvis)
   pipeLine.submitSingleTaskStage(goHomePelvisTask);
}
origin: us.ihmc/ihmc-humanoid-behaviors

private void setupPipeline()
 pipeLine.clearAll();
 BehaviorAction resetRobot = new BehaviorAction(resetRobotBehavior);
 pipeLine.submitSingleTaskStage(moveHandToApproachPoint);
 pipeLine.submitSingleTaskStage(moveHandCloseToValve);
 pipeLine.submitSingleTaskStage(resetRobot);
origin: us.ihmc/ihmc-humanoid-behaviors

@Override
public void doControl()
{
 pipeLine.doControl();
}
origin: us.ihmc/IHMCHumanoidBehaviors

@Override
public boolean isDone()
{
 return pipeLine.isDone();
}
origin: us.ihmc/ihmc-humanoid-behaviors

private void flexUp()
{
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLYING_PALMS_UP);
 pipeLine.requestNewStage();
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLEX_UP);
 pipeLine.requestNewStage();
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLYING_PALMS_UP);
 pipeLine.requestNewStage();
}
origin: us.ihmc/IHMCHumanoidBehaviors

private void submitFootstepPose(boolean parallelize, RobotSide robotSide, FramePose desiredFootstepPose)
{
 FramePose footPose = new FramePose(desiredFootstepPose);
 FootstepTask footstepTask = new FootstepTask(fullRobotModel, robotSide, footstepListBehavior, footPose);
 if (parallelize)
   pipeLine.submitTaskForPallelPipesStage(footstepListBehavior, footstepTask);
 else
   pipeLine.submitSingleTaskStage(footstepTask);
}
origin: us.ihmc/IHMCHumanoidBehaviors

private void setupPipeline()
{
 TextToSpeechPacket p1 = new TextToSpeechPacket("Resetting Robot Pose");
 sendPacket(p1);
 pipeLine.clearAll();
 //RESET BODY POSITIONS *******************************************
 GoHomeMessage goHomeChestMessage = new GoHomeMessage(BodyPart.CHEST, 2);
 GoHomeTask goHomeChestTask = new GoHomeTask(goHomeChestMessage, chestGoHomeBehavior);
 GoHomeMessage goHomepelvisMessage = new GoHomeMessage(BodyPart.PELVIS, 2);
 GoHomeTask goHomePelvisTask = new GoHomeTask(goHomepelvisMessage, pelvisGoHomeBehavior);
 GoHomeMessage goHomeLeftArmMessage = new GoHomeMessage(BodyPart.ARM, RobotSide.LEFT, 2);
 GoHomeTask goHomeLeftArmTask = new GoHomeTask(goHomeLeftArmMessage, armGoHomeLeftBehavior);
 GoHomeMessage goHomeRightArmMessage = new GoHomeMessage(BodyPart.ARM, RobotSide.RIGHT, 2);
 GoHomeTask goHomeRightArmTask = new GoHomeTask(goHomeRightArmMessage, armGoHomeRightBehavior);
 pipeLine.requestNewStage();
 if (rightArm)
   pipeLine.submitSingleTaskStage(goHomeRightArmTask);
 if (leftArm)
   pipeLine.submitSingleTaskStage(goHomeLeftArmTask);
 if (chest)
   pipeLine.submitSingleTaskStage(goHomeChestTask);
 if (pelvis)
   pipeLine.submitSingleTaskStage(goHomePelvisTask);
}
origin: us.ihmc/IHMCHumanoidBehaviors

private void setupPipeline()
 pipeLine.clearAll();
 BehaviorAction<TurnValveBehaviorState> resetRobot = new BehaviorAction<TurnValveBehaviorState>(TurnValveBehaviorState.RESET_ROBOT, resetRobotBehavior);
 pipeLine.submitSingleTaskStage(moveHandToApproachPoint);
 pipeLine.submitSingleTaskStage(moveHandCloseToValve);
 pipeLine.submitSingleTaskStage(resetRobot);
origin: us.ihmc/ihmc-humanoid-behaviors

@Override
public void doControl()
{
 pipeLine.doControl();
}
origin: us.ihmc/IHMCHumanoidBehaviors

@Override
public boolean isDone()
{
 return pipeLine.isDone();
}
origin: us.ihmc/IHMCHumanoidBehaviors

private void flexUp()
{
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLYING_PALMS_UP);
 pipeLine.requestNewStage();
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLEX_UP);
 pipeLine.requestNewStage();
 submitSymmetricHumanoidArmPose(HumanoidArmPose.FLYING_PALMS_UP);
 pipeLine.requestNewStage();
}
origin: us.ihmc/ihmc-humanoid-behaviors

private void submitChestHomeCommand(boolean parallelize)
{
 GoHomeMessage goHomeMessage = HumanoidMessageTools.createGoHomeMessage(HumanoidBodyPart.CHEST, trajectoryTime.getDoubleValue());
 GoHomeTask goHomeTask = new GoHomeTask(goHomeMessage, chestGoHomeBehavior);
 if (parallelize)
 {
   pipeLine.submitTaskForPallelPipesStage(chestGoHomeBehavior, goHomeTask);
   pipeLine.submitTaskForPallelPipesStage(chestGoHomeBehavior, createSleepTask(sleepTimeBetweenPoses.getDoubleValue()));
 }
 else
 {
   pipeLine.submitSingleTaskStage(goHomeTask);
   pipeLine.submitSingleTaskStage(createSleepTask(sleepTimeBetweenPoses.getDoubleValue()));
 }
}
origin: us.ihmc/IHMCHumanoidBehaviors

private void setupPipeline()
 pipeLine.clearAll();
 pipeLine.requestNewStage();
 pipeLine.submitSingleTaskStage(wakeup);
 pipeLine.submitSingleTaskStage(requestPlan);
 pipeLine.submitSingleTaskStage(waitForPlan);
 pipeLine.submitSingleTaskStage(processPlan);
origin: us.ihmc/IHMCHumanoidBehaviors

pipeLine.clearAll();
pipeLine.submitSingleTaskStage(enableLidarTask);
pipeLine.submitSingleTaskStage(setLidarMediumRangeTask);
pipeLine.submitSingleTaskStage(lookDownAction);
origin: us.ihmc/ihmc-java-toolkit

public void submitAll(List<Task> tasks)
{
 for (Task task : tasks)
 {
   submitSingleTaskStage(task);
 }
}
us.ihmc.tools.taskExecutorPipeLine

Javadoc

Block diagram representation of a PipeLine:
 
| 
----- 
| A |              Stage 1 
----- 
|            \ 
-------------       | 
|     |     |       | 
----- ------ ------   | 
|   | | B0 | | C0 |   | 
| A | ------ ------   | 
|   |   |      |      |  Stage 2 
----- ------   |      | 
|   | B1 | ------   | 
|   ------ | C1 |   | 
|     |    ------   | 
|     |      |      | 
--------------      | 
|            / 
------------- 
|           | 
-----       ----- 
| A |       | B |        Stage 3 
-----       ----- 
|           | 
------------- 
| 
----- 
| A |              Stage 4 
----- 
| 

Each block represents a Task to be executed.

The tasks are submitted to the master TaskExecutor and can be executed sequentially (as stages 1 and 4) or in parallel (as stages 2 and 3). The parallel tasks run using ParallelTask which uses "slave TaskExecutors" (one slave TaskExecutor per task to be parallelized).

Note about Stage 2: As for each key (A, B, and C) a slave TaskExecutor is used, it is possible to execute a pile of sequential tasks associated with each of the key. When all the slave TaskExecutors are done with their pile of tasks, the master TaskExecutor can go to the next stage, for instance Stage 3.

Note about how to create the transition from Stage 2 to Stage 3: To be able to execute two consecutive stages consisting of parallel tasks, it is necessary to call the methods requestNextStage().

Most used methods

  • submitSingleTaskStage
    Submit a new single Task stage that will be executed in a new stage.
  • submitTaskForPallelPipesStage
    Submit a new Task to be parallelized. Two possible cases: If the last stage is a single task stage,
  • clearAll
    Remove all the stages from the master TaskExecutor.
  • doControl
  • isDone
  • requestNewStage
    Create a new stage in the master TaskExecutor. Helpful especially when two consecutive stages have p

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Kernel (java.awt.image)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JTable (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now