Skip to content

Commit da4fcde

Browse files
author
Mohsen Kamalzadeh
committed
some capitalizations and other punctuation
1 parent 2bcef20 commit da4fcde

File tree

9 files changed

+49
-49
lines changed

9 files changed

+49
-49
lines changed

com.unity.perception/Documentation~/Randomization/Index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*NOTE: The Perception package's randomization toolset is currently marked as experimental and is subject to change.*
44

5-
The randomization toolset simplifies randomizing aspects of generating synthetic data. It facilitates exposing parameters for randomization, offers samplers to pick random values from parameters, and provides scenarios to coordinate a full randomization process. Each of these also allows for custom implementations to fit particular randomization needs.
5+
The randomization toolset simplifies randomizing aspects of generating synthetic data. It facilitates exposing parameters for randomization, offers samplers to pick random values from parameters, and provides Scenarios to coordinate a full randomization process. Each of these also allows for custom implementations to fit particular randomization needs.
66

77
#### What is Domain Randomization?
88

@@ -13,18 +13,18 @@ Our use of domain randomization draws from Tobin et al.'s (2017) work on trainin
1313
#### How can a Unity project be randomized using the Perception Randomization toolset?
1414

1515
Randomizing a project involves the following steps:
16-
1. Create a scenario
17-
2. Define and add randomizers to the scenario
16+
1. Create a Scenario
17+
2. Define and add Randomizers to the Scenario
1818
3. Customize Parameters and Samplers in the Randomizers
1919
4. Generate randomized computer vision training data
2020

21-
Beginning with step 1, add a scenario component to your simulation. This scenario will act as the central hub for all randomization activities that occur when your scene is executed.
21+
Beginning with step 1, add a Scenario component to your simulation. This Scenario will act as the central hub for all randomization activities that occur when your scene is executed.
2222

23-
Next, add a few randomizers to the scenario. The randomizers, in conjunction with the scenario, will perform the actual randomization activities within the simulation.
23+
Next, add a few Randomizers to the Scenario. The Randomizers, in conjunction with the Scenario, will perform the actual randomization activities within the simulation.
2424

2525
After adding the necessary Randomizers, configure the random Parameters assigned to each Randomizer to further customize how the simulation is Randomized. The random Parameters and Samplers exposed in each Randomizer's inspector can be manipulated to specify different probability distributions to use when generating random values.
2626

27-
Once the project has been randomized and your scene has been configured with the data capture tools available in the Perception package, enter play mode in the editor or execute your scenario through the Unity Simulation Cloud service to generate domain randomized perception data.
27+
Once the project has been randomized and your scene has been configured with the data capture tools available in the Perception package, enter play mode in the editor or execute your Scenario through the Unity Simulation cloud service to generate domain randomized perception data.
2828

2929
Continue reading for more details concerning the primary components driving randomizations in the Perception package, including:
3030
1. Scenarios
@@ -36,39 +36,39 @@ Continue reading for more details concerning the primary components driving rand
3636

3737
## Scenarios
3838

39-
Within a randomized simulation, the scenario component has three responsibilities:
39+
Within a randomized simulation, the Scenario component has three responsibilities:
4040
1. Controlling the execution flow of your simulation
41-
2. Defining a list of randomizers
41+
2. Defining a list of Randomizers
4242
3. Defining constants that can be configured externally from a built Unity player
4343

44-
The fundamental principle of domain randomization is to simulate environments under a variety of randomized conditions. Each **iteration** of a scenario is intended to encapsulate one complete run of a simulated environment under uniquely randomized conditions. Scenarios futher define what conditions determine the end of an iteration and how many iterations to perform.
44+
The fundamental principle of domain randomization is to simulate environments under a variety of randomized conditions. Each Iteration of a Scenario is intended to encapsulate one complete run of a simulated environment under uniquely randomized conditions. Scenarios further define what conditions determine the end of an Iteration and how many Iterations to perform.
4545

46-
To actually randomize a simulation, randomizers can be added to a scenario to vary different simulation properties. At runtime, the scenario will execute each randomizer according to its place within the randomizers list.
46+
To actually randomize a simulation, Randomizers can be added to a Scenario to vary different simulation properties. At runtime, the Scenario will execute each Randomizer according to its place within the Randomizer list.
4747

4848
Scenarios can also define constants from which to expose global simulation behaviors automatically. By modifying serialized constants externally, users can customize their simulation runtime even after their project has been built.
4949

50-
To read more about scenarios and how to customize them, navigate over to the [scenarios doc](Scenarios.md).
50+
To read more about Scenarios and how to customize them, navigate over to the **[Scenarios documentation](Scenarios.md)**.
5151

5252

5353
## Randomizers
5454

55-
Randomizers encapsulate specific randomization activities to perform during the lifecycle of a randomized simulation. For example, randomizers exist for spawning objects, repositioning lights, varying the color of objects, etc. Randomizers expose random Parameters to their inspector interface to further customize these variations.
55+
Randomizers encapsulate specific randomization activities to perform during the lifecycle of a randomized simulation. For example, Randomizers exist for spawning objects, repositioning lights, varying the color of objects, etc. Randomizers expose random Parameters to their inspector interface to further customize these variations.
5656

57-
To read more about how to create custom Parameter types, navigate over to the **[Randomizers doc](Randomizers.md)**.
57+
To read more about how to create custom Parameter types, navigate over to the **[Randomizers documentation](Randomizers.md)**.
5858

5959

6060
## Randomizer Tags
6161

62-
RandomizerTags are the primary mechanism by which randomizers query for a certain subset of GameObjects to randoize within a simulation. For example, a rotation randomizer could query for all GameObjects with a RotationRandomizerTag component to obtain an array of all objects the randomizer should vary for the given simulation iteration.
62+
RandomizerTags are the primary mechanism by which Randomizers query for a certain subset of GameObjects to randomize within a simulation. For example, a rotation Randomizer could query for all GameObjects with a RotationRandomizerTag component to obtain an array of all objects the Randomizer should vary for the given simulation Iteration.
6363

64-
To read more about how to use RandomizerTags, navigate over to the **[RandomizerTags doc](RandomizerTags.md)**.
64+
To read more about how to use RandomizerTags, navigate over to the **[RandomizerTags documentation](RandomizerTags.md)**.
6565

6666

6767
## Parameters
6868

69-
Parameters are classes that utilize samplers to deterministically generate random typed values. Parameters are often exposed within the inspector interface of randomizers to allow users to customize said randomizer's behavior. To accomplish this, Parameters combine and transform the float values produced by one or more samplers into various C# types. For example, a Vector3 Parameter can be used to map three samplers to the x, y, and z dimensions of a GameObject. Or a material Parameter can utilize a sampler to randomly select one material from a list of possible options.
69+
Parameters are classes that utilize Samplers to deterministically generate random typed values. Parameters are often exposed within the inspector interface of Randomizers to allow users to customize said Randomizer's behavior. To accomplish this, Parameters combine and transform the float values produced by one or more Samplers into various C# types. For example, a Vector3 Parameter can be used to map three Samplers to the x, y, and z dimensions of a GameObject. Or a material Parameter can utilize a Sampler to randomly select one material from a list of possible options.
7070

71-
To read more about how to create custom Parameter types, navigate over to the **[Parameters doc](Parameters.md)**.
71+
To read more about how to create custom Parameter types, navigate over to the **[Parameters documentation](Parameters.md)**.
7272

7373

7474
## Samplers

com.unity.perception/Documentation~/Randomization/RandomizerTags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RandomizerTags are the primary mechanism by which Randomizers query for a certain subset of GameObjects to randomize within a simulation.
44

5-
More specifically, RandomizerTags are components that can be added to GameObjects to register them with the active scenario's TagManager. This TagManager is aware of all objects with tags in the scene and can be queried to find all GameObjects that contain a specific tag. Below is a simple example of a ColorRandomizer querying for all GameObjects with a ColorRandomizerTag that it will apply a random material base color to:
5+
More specifically, RandomizerTags are components that can be added to GameObjects to register them with the active Scenario's TagManager. This TagManager is aware of all objects with tags in the scene and can be queried to find all GameObjects that contain a specific tag. Below is a simple example of a ColorRandomizer querying for all GameObjects with a ColorRandomizerTag that it will apply a random material base color to:
66

77
```
88
[Serializable]

com.unity.perception/Documentation~/Randomization/Randomizers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ To define an entirely new Randomizer, derive the Randomizer class and implement
77

88
## Randomizer Hooks
99

10-
1. OnCreate() - called when the Randomizer is added or loaded to a scenario
11-
2. OnIterationStart() - called at the start of a new scenario iteration
12-
3. OnIterationEnd() - called the after a scenario iteration has completed
13-
4. OnScenarioComplete() - called the after the entire scenario has completed
10+
1. OnCreate() - called when the Randomizer is added or loaded to a Scenario
11+
2. OnIterationStart() - called at the start of a new Scenario Iteration
12+
3. OnIterationEnd() - called the after a Scenario Iteration has completed
13+
4. OnScenarioComplete() - called the after the entire Scenario has completed
1414
5. OnStartRunning() - called on the first frame a Randomizer is enabled
1515
6. OnStopRunning() - called on the first frame a disabled Randomizer is updated
1616
7. OnUpdate() - executed every frame for enabled Randomizers
@@ -38,5 +38,5 @@ public class RotationRandomizer : Randomizer
3838

3939
There are a few key things to note from this example:
4040
1. Make sure to add the [Serializable] tag to all Randomizer implementations to ensure that the Randomizer can be customized and saved within the Unity Editor.
41-
2. The [AddRandomizerMenu] attribute customizes the "Add Randomizer" sub menu path in the scenario inspector for a particular randomizer. In this example, the RotationRandomizer can be added to a scenario by opening the _**Add Randomizer**_ menu and clicking `Perception -> Rotation Randomizer`.
41+
2. The [AddRandomizerMenu] attribute customizes the "Add Randomizer" sub menu path in the Scenario inspector for a particular Randomizer. In this example, the RotationRandomizer can be added to a Scenario by opening the _**Add Randomizer**_ menu and clicking `Perception -> Rotation Randomizer`.
4242
3. The line `var taggedObjects = tagManager.Query<RotationRandomizerTag>();` uses RandomizerTags in combination with the current Scenario's tagManager to query for all objects with RotationRandomizerTags and obtain the subset of GameObjects within the simulation that need to have their rotations randomzied. To learn more about how RandomizerTags work, visit the [RandomizerTags documentation page](RandomizerTags.md).

com.unity.perception/Documentation~/Randomization/Samplers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Generates random samples from a truncated normal distribution bounded by a speci
2626

2727

2828
## Random Seeding
29-
Samplers generate random values that are seeded by the active scenario's current random state. Changing the scenario's random seed will result in Samplers generating different values. Changing the order of Samplers, Parameters, or Randomizers will also result in different values being sampled during a simulation.
29+
Samplers generate random values that are seeded by the active Scenario's current random state. Changing the Scenario's random seed will result in Samplers generating different values. Changing the order of Samplers, Parameters, or Randomizers will also result in different values being sampled during a simulation.
3030

3131
It is recommended that users do not generate random values using the UnityEngine.Random() class or the System.Random() class within a simulation since both of these classes can potentially generate non-deterministic or improperly seeded random values. Using only Perception Samplers to generate random values will help ensure that Perception simulations generate consistent results during local execution and on Unity Simulation in the cloud.
3232

com.unity.perception/Documentation~/Randomization/Scenarios.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@ Scenarios have three responsibilities:
55
2. Defining a list of Randomizers
66
3. Defining constants that can be configured externally from a built Unity player
77

8-
By default, the perception package includes one ready-made scenario, the `FixedLengthScenario` class. This scenario runs each iteration for a fixed number of frames and is compatible with the Run in Unity Simulation window for cloud simulation execution.
8+
By default, the Perception package includes one ready-made Scenario, the `FixedLengthScenario` class. This Scenario runs each Iteration for a fixed number of frames and is compatible with the Run in Unity Simulation window for cloud simulation execution.
99

1010
## Scenario Cloud Execution (Unity Simulation)
1111

12-
Users can utilize Unity's Unity Simulation service to execute a scenario in the cloud through the perception package's Run in Unity Simulation window. To open this window from the Unity editor using the top menu bar, navigate to `Window -> Run in Unity Simulation`.
12+
Users can utilize Unity's Unity Simulation service to execute a Scenario in the cloud through the perception package's Run in Unity Simulation window. To open this window from the Unity editor using the top menu bar, navigate to `Window -> Run in Unity Simulation`.
1313

1414
From the newly opened editor window, customize the following settings to configure a new Unity Simulation run:
1515
1. **Run Name** - the name of the Unity Simulation run (example: TestRun0)
16-
2. **Total Iterations** - The number of scenario iterations to complete during the run
16+
2. **Total Iterations** - The number of Scenario Iterations to complete during the run
1717
3. **Instance Count** - The number of Unity Simulation worker instances to distribute execution between
1818
4. **Main Scene** - The Unity scene to execute
19-
5. **Scenario** - The scenario to execute
20-
6. **Sys-Param** - The system parameters or the hardware configuration of Unity Simulation worker instances to execute the scenario with. Determines per instance specifications such as the number of CPU cores, amount of memory, and presence of a GPU for accelerated execution.
19+
5. **Scenario** - The Scenario to execute
20+
6. **Sys-Param** - The system parameters or the hardware configuration of Unity Simulation worker instances to execute the Scenario with. Determines per instance specifications such as the number of CPU cores, amount of memory, and presence of a GPU for accelerated execution.
2121

22-
NOTE: To execute a scenario using the Run in Unity Simulation window, the scenario class must implement the UnitySimulationScenario class.
22+
NOTE: To execute a Scenario using the Run in Unity Simulation window, the Scenario class must implement the UnitySimulationScenario class.
2323

2424

2525
## Custom Scenarios
2626

27-
For use cases where the scenario should run for an arbitrary number of frames, implementing a custom scenario may be necessary. Below are the two most common scenario properties a user might want to override to implement custom scenario iteration conditions:
28-
1. **isIterationComplete** - determines the conditions that cause the end of a scenario iteration
29-
2. **isScenarioComplete** - determines the conditions that cause the end of a scenario
27+
For use cases where the Scenario should run for an arbitrary number of frames, implementing a custom Scenario may be necessary. Below are the two most common Scenario properties a user might want to override to implement custom Scenario Iteration conditions:
28+
1. **isIterationComplete** - determines the conditions that cause the end of a Scenario Iteration
29+
2. **isScenarioComplete** - determines the conditions that cause the end of a Scenario
3030

3131

3232

3333
## JSON Configuration
3434

35-
Scenarios can be serialized to JSON, modified, and reimported at runtime to configure simulation behavior even after a Unity player has been built. Constants and Randomizer Sampler settings are the two primary sections generated when serializing a scenario. Note that currently, only numerical samplers are serialized. Below is the contents of a JSON configuration file created when serializing the scenario used in Phase 1 of the [Perception Tutorial](../Tutorial/TUTORIAL.md):
35+
Scenarios can be serialized to JSON, modified, and reimported at runtime to configure simulation behavior even after a Unity player has been built. Constants and Randomizer Sampler settings are the two primary sections generated when serializing a Scenario. Note that currently, only numerical samplers are serialized. Below is the contents of a JSON configuration file created when serializing the Scenario used in Phase 1 of the [Perception Tutorial](../Tutorial/TUTORIAL.md):
3636
```
3737
{
3838
"constants": {
@@ -81,7 +81,7 @@ Scenarios can be serialized to JSON, modified, and reimported at runtime to conf
8181

8282

8383
### Constants
84-
Constants can include properties such as starting iteration value or total iteration count, and you can always add your own custom constants. Below is an example of the Constants class used in the `FixedLengthScenario` class:
84+
Constants can include properties such as starting Iteration value or total Iteration count, and you can always add your own custom constants. Below is an example of the Constants class used in the `FixedLengthScenario` class:
8585
```
8686
[Serializable]
8787
public class Constants : UnitySimulationScenarioConstants
@@ -93,10 +93,10 @@ public class Constants : UnitySimulationScenarioConstants
9393
There are a few key things to note here:
9494
1. The Constants class will need to inherit from `UnitySimulationScenarioConstants` to be compatible with the Run in Unity Simulation window. Deriving from `UnitySimulationScenarioConstants` will add a few key properties to the Constants class that are needed to coordinate a Unity Simulation run.
9595
2. Make sure to include the `[Serializable]` attribute on a constant class. This will ensure that the Constants can be manipulated from the Unity inspector.
96-
3. A scenario class's `SerializeToJson()` and `DeserializeFromJson()` methods can be overridden to implement custom serialization strategies.
96+
3. A Scenario class's `SerializeToJson()` and `DeserializeFromJson()` methods can be overridden to implement custom serialization strategies.
9797

9898

99-
Follow the instructions below to generate a scenario configuration file to modify your scenario Constants and Randomizers in a built player:
100-
1. Click the serialize constants button in the scenario's inspector window. This will generate a `scenario_configuration.json` file and place it in the project's Assets/StreamingAssets folder.
99+
Follow the instructions below to generate a Scenario configuration file to modify your Scenario Constants and Randomizers in a built player:
100+
1. Click the _**Serialize Constants**_ button in the Scenario's inspector window. This will generate a `scenario_configuration.json` file and place it in the project's Assets/StreamingAssets folder.
101101
2. Build your player. The new player will have a [ProjectName]_Data/StreamingAssets folder. A copy of the `scenario_configuration.json` file previously constructed in the editor will be found in this folder.
102102
3. Change the contents of the `scenario_configuration.json` file. Any running player thereafter will utilize the newly authored values.

0 commit comments

Comments
 (0)