浏览代码

DatasetCapture resets simulation on scenario termination

/usim-randomization
Steven Leal 4 年前
当前提交
b7446c59
共有 1 个文件被更改,包括 10 次插入13 次删除
  1. 23
      com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs

23
com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs


/// </summary>
public abstract void Deserialize();
if (deserializeOnStart)
Deserialize();
StopCoroutine(UpdateLoop());
void Start()
IEnumerator Start()
if (deserializeOnStart)
Deserialize();
// TODO: remove this yield when the perception camera no longer skips the first frame of the simulation
yield return null;
// TODO: remove this yield when the perception camera no longer skips the first frame of the simulation
yield return null;
while (!isScenarioComplete)
{
DatasetCapture.StartNewSequence();

currentIterationFrame++;
framesSinceInitialization++;
}
OnIterationTeardown();
OnIterationTeardown();
// Disable perception cameras
foreach (var perceptionCamera in FindObjectsOfType<PerceptionCamera>())
perceptionCamera.enabled = false;
DatasetCapture.ResetSimulation();
if (quitOnComplete)
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;

正在加载...
取消
保存