Esempio n. 1
0
    public void Enable(bool enabled)
    {
        isEnabled = enabled;
        objId     = 0;

        if (isEnabled && isFirstEnabled)
        {
            isFirstEnabled = false;
            RobotSetup robotSetup = GetComponentInParent <RobotSetup>();
            if (robotSetup != null && robotSetup.NeedsBridge != null)
            {
                robotSetup.AddToNeedsBridge(this);
            }
        }

        if (detectedObjects != null)
        {
            detectedObjects.Clear();
        }

        if (lidarDetectedColliders != null)
        {
            lidarDetectedColliders.Clear();
        }
    }
    public void Enable(bool enabled)
    {
        isEnabled = enabled;
        objId     = 0;

        if (isEnabled && isFirstEnabled)
        {
            isFirstEnabled = false;
            RobotSetup robotSetup = GetComponentInParent <RobotSetup>();
            if (robotSetup != null && robotSetup.NeedsBridge != null)
            {
                robotSetup.AddToNeedsBridge(this);
            }
        }

        groundTruthCamera.enabled = enabled;
        cameraPreview.gameObject.SetActive(enabled);

        if (detectedObjects != null)
        {
            detectedObjects.Clear();
        }

        if (cameraDetectedColliders != null)
        {
            cameraDetectedColliders.Clear();
        }
    }
Esempio n. 3
0
    public void EnableLidarPrediction(bool enabled)
    {
        isLidarPredictionEnabled = enabled;

        if (isLidarPredictionEnabled && isFirstEnabled)
        {
            isFirstEnabled = false;
            RobotSetup robotSetup = GetComponentInParent <RobotSetup>();
            if (robotSetup != null && robotSetup.NeedsBridge != null)
            {
                robotSetup.AddToNeedsBridge(this);
            }
        }

        if (lidarPredictedVisuals != null)
        {
            lidarPredictedVisuals.Clear();
        }

        if (lidarPredictedObjects != null)
        {
            lidarPredictedObjects.Clear();
        }
    }