public override void InitializeAgent() { drone = (IDrone)rotorCtrlAgent; if (detectionMode == DetectionMode.Raycast) { rayDetection = new RayDetection(); } else { cam = GetComponentInChildren <Camera>(); Texture2D tex = new Texture2D(84, 84, TextureFormat.RGB24, false); cam.GetComponent <DepthCam>().Initialize(ref tex); // TODO add tex to agent observations. } }
public override void InitializeAgent() { base.InitializeAgent(); if (dummyAgent != null && dummyAgent.gameObject.activeSelf) { drone = (IDrone)dummyAgent; } if (detectionMode != DetectionMode.Raycast) { // Camera mode. // Still need RayDetection for penalizing proximity to obtacles. // TBD: Maybe replace with collision detection. rayDetection = new RayDetection(); } }
public override void InitializeAgent() { drone = (IDrone)rotorCtrlAgent; rayDetection = new RayDetection(); }