public GroundTruthGenerator(DepthRenderingManager drm, ViewManager vm, PointCloudManager pcm, OccupancyGridManager ogm, StudyObjectMamanger som, float requiredAccuracy = 0.99f)
 {
     // Save function messes up executable file, must make due without it
     _path = _basePath + "_" + vm.Count().ToString() + ".txt";
     _drm  = drm;
     _vm   = vm;
     _pcm  = pcm;
     _ogm  = ogm;
     _som  = som;
     this.requiredAccuracy = requiredAccuracy;
     //Generate(false); // Do not count tallies
     //Save();
     _grids = Load();
     CountGrids();
 }
    public SystemInterface(Camera depthCamera)
    {
        //Prepare depth rendering texture
        _depthCamera = depthCamera;
        RenderTexture rTex = _depthCamera.targetTexture;

        rTex.width  = _textureResolution;
        rTex.height = _textureResolution;

        //Setup Managers
        _vm  = new ViewManager(_viewGridLayers, _sphereRadius, _numberViews);
        _som = new StudyObjectMamanger(_objectPosition);
        _drm = new DepthRenderingManager(_depthCamera, _nearClipPlane, _farClipPlane);
        _pcm = new PointCloudManager(rTex, _depthSawOff, _depthCamera);
        _ogm = new OccupancyGridManager(_occupancyGridCount, _studyGridSize, _gridPosition);
        _gtg = new GroundTruthGenerator(_drm, _vm, _pcm, _ogm, _som);
        _rm  = new RewardManager(_gtg, _ogm, _som, _vm, _requiredAccuracy);

        Reset();
    }
Beispiel #3
0
    private void Start()
    {
        _timer = new Stopwatch();


        RenderTexture rTex = _depthCamera.targetTexture;

        rTex.width  = _textureResolution;
        rTex.height = _textureResolution;

        //Setup Managers
        _vm  = new ViewManager(_viewGridLayers, _sphereRadius, _numberViews);
        _som = new StudyObjectMamanger(_objectPosition);
        _drm = new DepthRenderingManager(_depthCamera, _nearClipPlane, _farClipPlane);
        _pcm = new PointCloudManager(rTex, _depthSawOff, _depthCamera);
        _ogm = new OccupancyGridManager(_occupancyGridCount, _studyGridSize, _gridPosition);
        _gtg = new GroundTruthGenerator(_drm, _vm, _pcm, _ogm, _som);
        _rm  = new RewardManager(_gtg, _ogm, _som, _vm, 0.95f);

        Vector3 v = _vm.GetView(0);

        _drm.SetCameraView(v);
    }