-
Notifications
You must be signed in to change notification settings - Fork 103
Sigma How to Define Tasks
Sigma can help guide users through tasks that are predefined in a .json file. The file is part of Sigma's persistent state, and is pointed to by the Sigma server configuration file under the <PersistentStateFilename> tag. For instance the following entry in the server configuration file:
<PersistentStateFilename>C:\psi\Applications\Sigma\Sigma\Resources\sigma.state.diamond</PersistentStateFilename>specifies that the persistent state is saved at that location on disk. The tasks are specified in a file that has the same name and .tasklibrary.json appended to it. So, in the case above the task definition file is at C:\psi\Applications\Sigma\Sigma\Resources\sigma.state.diamond.tasklibrary.json. Here is a link to an existing sample task library file in the repo.
The first few lines of this file look like this:
{
"Tasks": [
{
"Name": "Replace a hard-drive in a PC",
"Steps": [
{
"$type": "Sigma.GatherStep, Sigma",
"Label": "1",
"Verb": "Gather",
"Noun": "Objects",
"Objects": [
"hard-drive",
"screwdriver"
]
},
{
"$type": "Sigma.ComplexStep, Sigma",
"Label": "2",
"Description": "Open the PC case",
"SubSteps": [
{
"$type": "Sigma.SubStep, Sigma",
"Label": "1",
"Description": "Unscrew the case screw using the screwdriver.",
"VirtualObjects": [
{
"Name": "Unscrew PC case",
"ModelType": "Half circle",
"SpatialPose": {
"$type": "Sigma.AtKnownSpatialLocation, Sigma",
"SpatialLocationName": "unscrew PC case"
}
}
]
},
{
"$type": "Sigma.SubStep, Sigma",
"Label": "2",
"Description": "Pull the handle and open and remove the case lid. Place the case lid on the table next to you.",
"VirtualObjects": [
{
"Name": "Open PC case",
"ModelType": "Quarter Circle",
"SpatialPose": {
"$type": "Sigma.AtKnownSpatialLocation, Sigma",
"SpatialLocationName": "Open PC case"
}
}
]
}
]
},
...
...The library consists of an array of tasks. Each task has a Name (in the example above "Replace a hard-drive in a PC"), and an array of steps. The $type parameter for each step specifies the type of the step. Sigma currently supports GatherStep, ComplexStep and DoStep step types.
A Gather step can specify a set of objects (or tools, ingredients, etc.) that the system will instruct the user to gather. A DoStep contains a simple description of an instruction to execute. The ComplexStep is a step that decomposes into a number of sub-steps.
The task library therefore contains a .json-serialized version of the corresponding data types in the code, see more in GatherStep.cs, ComplexStep.cs, DoStep.cs.
- Basic Stream Operators
- Writing Components
- Pipeline Execution
- Delivery Policies
- Stream Fusion and Merging
- Interpolation and Sampling
- Windowing Operators
- Stream Generators
- Parallel Operator
- Intervals
- Data Visualization (PsiStudio)
- Data Annotation (PsiStudio)
- Distributed Systems
- Bridging to Other Ecosystems
- Debugging and Diagnostics
- Shared Objects
- Datasets
- Event Sources
- 3rd Party Visualizers
- 3rd Party Stream Readers
Components and Toolkits
- List of NuGet Packages
- List of Components
- Audio Overview
- Azure Kinect Overview
- Kinect Overview
- Speech and Language Overview
- Imaging Overview
- Media Overview
- ONNX Overview
- Finite State Machine Toolkit
- Mixed Reality Overview
- How to Build/Configure
- How to Define Tasks
- How to Place Holograms
- Data Types Collected
- System Transparency Note
Community
Project Management