Skip to content

Commit f254414

Browse files
mkamalzaaryan-mann
authored andcommitted
changed normal sampler standard deviation json key to "stddev"
1 parent 674b22d commit f254414

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

com.unity.perception/Runtime/Randomization/Scenarios/Serialization/ScenarioSerializer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static SamplerOptions SerializeSampler(ISampler sampler)
136136
min = normalSampler.range.minimum,
137137
max = normalSampler.range.maximum,
138138
mean = normalSampler.mean,
139-
standardDeviation = normalSampler.standardDeviation
139+
stddev = normalSampler.standardDeviation
140140
};
141141
else
142142
throw new ArgumentException($"Invalid sampler type ({sampler.GetType()})");
@@ -245,7 +245,7 @@ static ISampler DeserializeSampler(ISamplerOption samplerOption)
245245
maximum = (float)normalSampler.max
246246
},
247247
mean = (float)normalSampler.mean,
248-
standardDeviation = (float)normalSampler.standardDeviation
248+
standardDeviation = (float)normalSampler.stddev
249249
};
250250
throw new ArgumentException($"Cannot deserialize unsupported sampler type {samplerOption.GetType()}");
251251
}

com.unity.perception/Runtime/Randomization/Scenarios/Serialization/SerializationStructures.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class NormalSampler : ISamplerOption
5959
public double min;
6060
public double max;
6161
public double mean;
62-
public double standardDeviation;
62+
public double stddev;
6363
}
6464

6565
class ConstantSampler : ISamplerOption

0 commit comments

Comments
 (0)