Learn how to use the HAL Robotics Framework from Rhinoceros and Grasshopper.

• table of contents
• back to main site
• issues and bugs

5. Flow Control

5.1. Wait for a Time

5.2. Wait for Synchronization

5.3. Create a Loop [Coming Soon]

5.4. Create a Condition [Coming Soon]


5.1. Wait for a Time

Objective:

In this tutorial we’ll create a Wait Action that pauses Robot execution for a fixed period of time using the HAL Robotics Framework for Grasshopper.

Demo Files:

Wait for a Time.gh

Requirements to follow along:

Background:

In certain scenarios it may be necessary to have your Robot Wait in its current position. This could be because it’s taking a measurement, a Tool is working or simply because something else is happening in the environment. If the time to Wait is a constant, such as the time required for a gripper to open, then a Wait Time Action is a good solution.

How to:

We can create a Wait Action from the HAL Robotics tab, Procedure panel. The only thing required is the Duration. We can assign a time, say 2 seconds, and remember, if it’s more natural to work in some other unit, the time unit can be changed by right-clicking on the Duration input. The output of this component is an Action which can be merged into any other sequence of Actions you may have. Once that’s merged, we can see in the Procedure Browser that we our Wait Action is listed and when we Simulate the Robot pauses for 2 seconds.


5.2. Wait for Synchronization

Objective:

In this tutorial we’ll create a Wait Action that pauses Robot execution to synchronize multiple machines using the HAL Robotics Framework for Grasshopper.

Demo Files:

Wait for Synchronization.gh

Requirements to follow along:

Background:

In certain scenarios it may be necessary to have your Robot Wait in its current position. This could be because it’s taking a measurement, a Tool is working or simply because something else is happening in the environment. If the Wait duration is conditional on another Robot reaching a particular point in its Procedure then a Wait Sync Action is a good solution.

How to:

We can create a Wait Action from the HAL Robotics tab, Procedure panel and switching to the Wait Sync overload. The only thing required here are our Sync Settings. We can create Sync Settings from the Motion panel. It’s important to give our Sync Settings an identifiable name. The output of this component is an Action which can be merged into any other sequence of Actions you may have but given that this is a synchronization Action it only really makes sense if it’s used in more than one Procedure. I have prepared a very simple demo here with two Robots performing a single Move Action each. I’m going to copy and paste my Wait to ensure that the same Sync Settings is used for both Wait Actions and use Wait before Move in one case and after in the other. Once that’s merged and Solved, we can see that the first Robot moves, the other waits until both synchronized Waits are executed and then the second Robot follows. This is a simple way to organize multiple Robots without synchronizing their Motion.


5.3. Create a Loop

Coming Soon


5.4. Create a Condition

Coming Soon


Continue to: 6. Control