Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        distances = new List <long>();
        strengths = new List <long>();

        urg = this.gameObject.AddComponent <UrgDeviceEthernet>();
        urg.StartTCP(ip_address, port_number);

        if (ifDetectCollision)
        {
            if (testPanel == null)
            {
                Debug.LogError("testPannel is null");
            }

            detectRegionNumber = testPanel.LedPin.Length;
            DetecRegions       = new bool[detectRegionNumber];
            regionPointCount   = new int[detectRegionNumber];
            for (int i = 0; i < DetecRegions.Length; i++)
            {
                DetecRegions[i]     = false;
                regionPointCount[i] = 0;
            }
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        distances = new List <long>();
        strengths = new List <long>();

        urg = this.gameObject.AddComponent <UrgDeviceEthernet>();
        urg.StartTCP(ip_address, port_number);
    }
Exemplo n.º 3
0
    void Start()
    {
        sensingAreaTrs = sensingAreaRenderer.transform;
        urgControl     = GetComponent <UrgControl>();
        urg            = GetComponent <UrgDeviceEthernet>();

        distanceDataBuffer = new ComputeBuffer(urgControl.endStep - urgControl.startStep + 1, sizeof(float));
    }
Exemplo n.º 4
0
        // Use this for initialization
        private void Start()
        {
            croppedDistances = new List <long>();
            strengths        = new List <long>();
            detectedObjects  = new List <ProcessedObject>();

            urg = gameObject.AddComponent <UrgDeviceEthernet>();
            urg.StartTCP(ip_address, port_number);

            StartMeasureDistance();
        }
Exemplo n.º 5
0
    private void Start()
    {
        urgControl    = GetComponent <UrgControl>();
        urg           = GetComponent <UrgDeviceEthernet>();
        urg.onReadMD += OnReadMD;
        urg.onReadME += OnReadME;

        sensedObjs     = new List <SensedObject>();
        lockObj        = new object();
        verticesBuffer = new ComputeBuffer(1080, sizeof(float) * 3);
        verticesData   = new List <Vector3>();
    }
Exemplo n.º 6
0
 // Start is called before the first frame update
 void Start()
 {
     urg = GetComponent <UrgDeviceEthernet>();
     urg.StartTCP(ip, port);
     urg.Write(SCIP_library.SCIP_Writer.MD(startStep, endStep));
 }