示例#1
0
 internal void SetRayPerceptionInput(RayPerceptionInput rayInput)
 {
     // Note that change the number of rays or tags doesn't directly call this,
     // but changing them and then changing another field will.
     if (m_RayPerceptionInput.OutputSize() != rayInput.OutputSize())
     {
         Debug.Log(
             "Changing the number of tags or rays at runtime is not " +
             "supported and may cause errors in training or inference."
             );
         // Changing the shape will probably break things downstream, but we can at least
         // keep this consistent.
         SetNumObservations(rayInput.OutputSize());
     }
     m_RayPerceptionInput = rayInput;
 }
示例#2
0
        /// <summary>
        /// Creates the RayPerceptionSensor.
        /// </summary>
        /// <param name="name">The name of the sensor.</param>
        /// <param name="rayInput">The inputs for the sensor.</param>
        public RayPerceptionSensor(string name, RayPerceptionInput rayInput)
        {
            m_Name = name;
            m_RayPerceptionInput = rayInput;

            SetNumObservations(rayInput.OutputSize());

            m_DebugLastFrameCount = Time.frameCount;
            m_RayPerceptionOutput = new RayPerceptionOutput();
        }
示例#3
0
        /// <summary>
        /// Creates the RayPerceptionSensor.
        /// </summary>
        /// <param name="name">The name of the sensor.</param>
        /// <param name="rayInput">The inputs for the sensor.</param>
        public RayPerceptionSensor(string name, RayPerceptionInput rayInput)
        {
            m_Name = name;
            m_RayPerceptionInput = rayInput;

            SetNumObservations(rayInput.OutputSize());

            if (Application.isEditor)
            {
                m_DebugDisplayInfo = new DebugDisplayInfo();
            }
        }