Add opencvsharp.dll / Add Rendertexture observation / add Canny

This commit is contained in:
Tobi committed 2019-05-15 12:07:27 +02:00
1 parent 19fa5027ee
commit 7317135cd3
33 files changed
+484569 -424

No files matched your search

+35
View File
@@ -6,4 +6,39 @@ using UnityEngine;
public class CozmoAgent : Agent
{
public Camera renderCamera;
public Academy academy;
public float timeBetweenDecisionsAtInference;
private float timeSinceDecision;
public void FixedUpdate()
{
WaitTimeInference();
}
private void WaitTimeInference()
{
if (renderCamera != null)
{
renderCamera.Render();
}
if (!academy.GetIsInference())
{
RequestDecision();
}
else
{
if (timeSinceDecision >= timeBetweenDecisionsAtInference)
{
timeSinceDecision = 0f;
RequestDecision();
}
else
{
timeSinceDecision += Time.fixedDeltaTime;
}
}
}
}