Randomizes all the materials in the scene. Each object may only randomize to sensible materials from a similar material type. For instance, an
Specifies if the randomization should include materials found in training rooms. Training rooms consist of all of the following:
If the agent is in one of the above scenes and
An exception is thrown if you are in a train scene, and you pass in
Specifies if the randomization should include materials found in validation rooms. Validation rooms consist of all of the following:
If the agent is in one of the above scenes and
An exception is thrown if you are in a validation scene, and you pass in
Specifies if the randomization should include materials found in testing rooms. Testing rooms consist of all of the following:
If the agent is in one of the above scenes and
An exception is thrown if you are in a testing scene, and you pass in
Specifies which room types the randomizable materials may come from.
Valid room types include
If
An exception is thrown if the current room type is not included in
Sets the bounds with which a light's intensity may be multiplied by. Higher values are brighter. Both values must be greater than . The order of the values does not matter.
Specifies if the color should be randomized. If set to
Sets the domain of possible hue values for each light, which affects its color. Valid values are ranges between , where:
Sets the domain of possible saturation values for each light. Valid values are ranges between , where corresponds to grayscale and corresponds to full saturation.
Specifies if all lights in the room should be randomized with the same values (i.e., intensity and color). When
After calling initial random spawn, each object will have its objectId recomputed (in the form of "objectType|x|y|z"). Thus, objects that move will have their objectId's changed. This is necessary to prevent collisions between objectId's, since initial random spawn may be used to duplicate existing objects in the scene.
controller.step(
action="InitialRandomSpawn",
randomSeed=0,
forceVisible=False,
numPlacementAttempts=5,
placeStationary=True,
numDuplicatesOfType = [
{
"objectType": "Statue"
"count": 20
},
{
"objectType": "Bowl"
"count": 20,
}
],
excludedReceptacles=["CounterTop", "DiningTable"],
excludedObjectIds=["Apple|1|1|2"]
)
Used to seed the randomization for duplicatable scene states. Because this seed depends on the current state of the scene, remember to reset the scene with controller.reset() before running InitialRandomSpawn(), otherwise the seeded randomization will not be accurate.
When enabled, the scene will attempt to randomize all moveable objects outside of receptacles in plain view. Use this if you want to avoid objects spawning out of view inside closed drawers, cabinets, etc.
How many times each object in the scene attempts to randomly spawn. Setting this value higher will lead to fewer spawn failures at the cost of performance.
Determines if spawned objects will be settled completely static and unmoving, or if non-determenistic physics resolve their final position. Setting this to False will allow physics to resolve final positions, which can be used to spawn an object on a sloped receptacle but have it end up rolling off.
Used to specify how many objects of a certain type will attempt to be duplicated somewhere in the scene. It does not guarantee this number of duplicated objects, only the number of attempted spawned objects, so this is the max it will be. This will only create copies of objects already in the scene, so if you request an object which is not in the scene upon reset, it will not work.
A list of receptacle object types to exclude from valid receptacles that can be randomly chosen as a spawn location. An example use case is excluding all CounterTop receptacles to allow for a scene configuration that has more free space on CounterTops in case you need free space for interaction. Note that this will not guarantee all listed receptacles as being completely clear of objects, as any objects that failed to reposition will remain in their default position, which might have been on the excluded receptacle type. Check the Actionable Properties section of the Objects documentation for a full list of Receptacle objects.
Used to prevent certain objects from changing in position.
This is often nice for rearrangement related tasks.
controller.step(action="RandomizeColors")
Randomizes the color of each object in the scene. Compared to
Each color is uniformly sampled with a hue between , a saturation in , and a value in .