Add opencvsharp.dll / Add Rendertexture observation / add Canny

This commit is contained in:
Tobi
2019-05-15 12:07:27 +02:00
parent 19fa5027ee
commit 7317135cd3
33 changed files with 484569 additions and 424 deletions
+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;
}
}
}
}