void Update() { if (Time.time > nextSnapshotTime && counter < nCaptures) { nextSnapshotTime += snapshotPeriod; if (snapSwitch) { LabeledDataUtil.Snapshot(agentCamera, cameraRenderTexture, readerTexture, trainingFilePath, captureFilePrefix, labelFileName, recordCategoryTags, nDirectionSensors, wallTag, counter, wallHitMultiplier: 0.4f, storeImages: true); counter++; if (counter % 1000 == 0) { Debug.Log("counter: " + counter); } } else { SetRandomPositions(); } snapSwitch = !snapSwitch; } }
void Update() { LabeledDataUtil.Snapshot(agentCamera, cameraRenderTexture, readerTexture, trainingFilePath, captureFilePrefix, labelFileName, recordCategoryTags, nDirectionSensors, wallTag, counter, wallHitMultiplier: 0.4f, storeImages: storeImages); if (agentRandomControl != null) { FileUtils.AppendStringToFile(trainingFilePath + actionFileName, agentRandomControl.currentAction.ToString() + '\n'); } counter++; if (counter % 1000 == 0) { Debug.LogFormat("counter: {0}", counter); } // if (periodicResetter.HasBeenReset()) { // Debug.Log ("Reset!"); // } }