particle_source_or_sink
ParticleSink
Bases: ParticleRemover
ParticleRemover where physical particles are removed continuously within a cylindrical volume located at the metalink pose.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
StatefulObject
|
Object to which this state will be applied |
required |
conditions
|
dict
|
Dictionary mapping the names of ParticleSystem (str) to None or list of 2-tuples, where None represents "never", empty list represents "always", or each 2-tuple is interpreted as a single condition in the form of (ParticleModifyCondition, value) necessary in order for this particle modifier to be able to modify particles belonging to @ParticleSystem. Expected types of val are as follows: SATURATED: string name of the desired system that this modifier must be saturated by, e.g., "water" TOGGLEDON: boolean T/F; whether this modifier must be toggled on or not GRAVITY: boolean T/F; whether this modifier must be pointing downwards (T) or upwards (F) FUNCTION: a function, whose signature is as follows:
For a given ParticleSystem, the list of 2-tuples will be converted into a list of function calls of the form above -- if all of its conditions evaluate to True and particles are detected within this particle modifier area, then we potentially modify those particles |
required |
sink_radius
|
None or float
|
Radius of the cylinder representing particles' sinking volume, if specified. If both @sink_radius and @sink_height are None, values will be inferred directly from the underlying object asset, otherwise, it will be set to a default value |
None
|
sink_height
|
None or float
|
Height of the cylinder representing particles' sinking volume, if specified. If both @sink_radius and @sink_height are None, values will be inferred directly from the underlying object asset, otherwise, it will be set to a default value |
None
|
default_fluid_conditions
|
None or list
|
Condition(s) needed to remove any fluid particles not explicitly specified in @conditions. If None, then it is assumed that no other physical particles can be removed. If not None, should be in same format as an entry in @conditions, i.e.: list of (ParticleModifyCondition, val) 2-tuples |
None
|
default_non_fluid_conditions
|
None or list
|
Condition(s) needed to remove any physical (excluding fluid) particles not explicitly specified in @conditions. If None, then it is assumed that no other physical particles can be removed. If not None, should be in same format as an entry in @conditions, i.e.: list of (ParticleModifyCondition, val) 2-tuples |
None
|
default_visual_conditions
|
None or list
|
Condition(s) needed to remove any visual particles not explicitly specified in @conditions. If None, then it is assumed that no other visual particles can be removed. If not None, should be in same format as an entry in @conditions, i.e.: list of (ParticleModifyCondition, val) 2-tuples |
None
|
Source code in omnigibson/object_states/particle_source_or_sink.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
ParticleSource
Bases: ParticleApplier
ParticleApplier where physical particles are spawned continuously in a cylindrical fashion from the metalink pose.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
StatefulObject
|
Object to which this state will be applied |
required |
conditions
|
dict
|
Dictionary mapping the names of ParticleSystem (str) to None or list of 2-tuples, where None represents "never", empty list represents "always", or each 2-tuple is interpreted as a single condition in the form of (ParticleModifyCondition, value) necessary in order for this particle modifier to be able to modify particles belonging to @ParticleSystem. Expected types of val are as follows: SATURATED: string name of the desired system that this modifier must be saturated by, e.g., "water" TOGGLEDON: boolean T/F; whether this modifier must be toggled on or not GRAVITY: boolean T/F; whether this modifier must be pointing downwards (T) or upwards (F) FUNCTION: a function, whose signature is as follows:
For a given ParticleSystem, the list of 2-tuples will be converted into a list of function calls of the form above -- if all of its conditions evaluate to True and particles are detected within this particle modifier area, then we potentially modify those particles |
required |
source_radius
|
None or float
|
Radius of the cylinder representing particles' spawning volume, if specified. If both @source_radius and @source_height are None, values will be inferred directly from the underlying object asset, otherwise, it will be set to a default value |
None
|
source_height
|
None or float
|
Height of the cylinder representing particles' spawning volume, if specified. If both @source_radius and @source_height are None, values will be inferred directly from the underlying object asset, otherwise, it will be set to a default value |
None
|
initial_speed
|
float
|
The initial speed for generated particles. Note that the direction of the velocity is inferred from the particle sampling process |
0.0
|
Source code in omnigibson/object_states/particle_source_or_sink.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|