示例#1
0
        public DepthCloudModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.Topic, constructor.Type)
        {
            panel = DataPanelManager.GetPanelByResourceType <DepthCloudPanelContents>(ModuleType.DepthCloud);

            controller = new DepthCloudController(this);
            if (constructor.Configuration != null)
            {
                controller.Config = (DepthCloudConfiguration)constructor.Configuration;
            }

            UpdateModuleButton();
        }
示例#2
0
        public GridModuleData([NotNull] ModuleDataConstructor constructor) : base(constructor.Topic, constructor.Type)
        {
            panel = DataPanelManager.GetPanelByResourceType <GridPanelContents>(ModuleType.Grid);

            GridController = new GridController(this);
            if (constructor.Configuration != null)
            {
                GridController.Config = (GridConfiguration)constructor.Configuration;
            }

            UpdateModuleButton();

            ARController.ARCameraViewChanged += OnARCameraViewChanged;
        }
示例#3
0
        public JoystickModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.Topic, constructor.Type)
        {
            panel = DataPanelManager.GetPanelByResourceType <JoystickPanelContents>(ModuleType.Joystick);

            controller = new JoystickController(this);
            if (constructor.Configuration != null)
            {
                controller.Config = (JoystickConfiguration)constructor.Configuration;
            }
            controller.Joystick = ModuleListPanel.TwistJoystick;

            UpdateModuleButton();
        }
示例#4
0
        public SimpleRobotModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.Topic, constructor.Type)
        {
            RobotController = new SimpleRobotController(this);
            if (constructor.Configuration != null)
            {
                RobotController.Config = (RobotConfiguration)constructor.Configuration;
            }

            panel = DataPanelManager.GetPanelByResourceType <SimpleRobotPanelContents>(ModuleType.Robot);
            UpdateModuleButton();

            ConnectionManager.Connection.ConnectionStateChanged += OnConnectionStateChanged;
        }
示例#5
0
        public ARModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.Topic, constructor.Type)
        {
            panel = DataPanelManager.GetPanelByResourceType <ARPanelContents>(ModuleType.AugmentedReality);

            controller = Resource.Controllers.AR.Instantiate <ARFoundationController>();

            controller.ModuleData = this;
            if (constructor.Configuration != null)
            {
                controller.Config = (ARConfiguration)constructor.Configuration;
            }

            UpdateModuleButton();
        }
示例#6
0
        public PointCloudModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <PointCloudConfiguration>()?.Topic ?? constructor.Topic, constructor.Type)
        {
            panel    = DataPanelManager.GetPanelByResourceType <PointCloudPanelContents>(ModuleType.PointCloud);
            listener = new PointCloudListener(this);
            if (constructor.Configuration == null)
            {
                listener.Config.Topic = Topic;
            }
            else
            {
                listener.Config = (PointCloudConfiguration)constructor.Configuration;
            }

            listener.StartListening();
            UpdateModuleButton();
        }
示例#7
0
        public TfModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <TfConfiguration>()?.Topic ?? constructor.Topic,
                 constructor.Type)
        {
            panel    = DataPanelManager.GetPanelByResourceType <TfPanelContents>(ModuleType.TF);
            listener = new TfListener(this);
            if (constructor.Configuration != null)
            {
                listener.Config = (TfConfiguration)constructor.Configuration;
            }
            else
            {
                listener.Config.Topic = Topic;
            }

            listener.StartListening();
            UpdateModuleButton();
        }
示例#8
0
        public MarkerModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <MarkerConfiguration>()?.Topic ?? constructor.Topic,
                 constructor.GetConfiguration <MarkerConfiguration>()?.Type ?? constructor.Type)
        {
            panel    = DataPanelManager.GetPanelByResourceType <MarkerPanelContents>(ModuleType.Marker);
            listener = new MarkerListener(this);
            if (constructor.Configuration == null)
            {
                listener.Config.Topic = Topic;
                listener.Config.Type  = Type;
            }
            else
            {
                listener.Config = (MarkerConfiguration)constructor.Configuration;
            }

            listener.StartListening();
            UpdateModuleButton();
        }
示例#9
0
        public JointStateModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <JointStateConfiguration>()?.Topic ?? constructor.Topic,
                 constructor.Type)
        {
            panel    = DataPanelManager.GetPanelByResourceType <JointStatePanelContents>(ModuleType.JointState);
            listener = new JointStateListener(this);
            if (constructor.Configuration != null)
            {
                listener.Config = (JointStateConfiguration)constructor.Configuration;
                listener.Robot  = GetRobotWithName(listener.RobotName);
            }
            else
            {
                listener.Config.Topic = Topic;
            }

            listener.StartListening();
            UpdateModuleButton();
        }
        public InteractiveMarkerModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <InteractiveMarkerConfiguration>()?.Topic ?? constructor.Topic,
                 constructor.Type)
        {
            panel = DataPanelManager.GetPanelByResourceType <InteractiveMarkerPanelContents>(
                ModuleType.InteractiveMarker);
            listener = new InteractiveMarkerListener(this);
            if (constructor.Configuration != null)
            {
                listener.Config = (InteractiveMarkerConfiguration)constructor.Configuration;
            }
            else
            {
                listener.Config.Topic = Topic;
            }

            Interactable = ModuleListPanel.SceneInteractable;
            listener.StartListening();
            UpdateModuleButton();
        }
示例#11
0
        public GuiDialogModuleData([NotNull] ModuleDataConstructor constructor) :
            base(constructor.GetConfiguration <GuiDialogConfiguration>()?.Topic ?? constructor.Topic,
                 constructor.GetConfiguration <GuiDialogConfiguration>()?.Type ?? constructor.Type)
        {
            dialogPanel    = DataPanelManager.GetPanelByResourceType <GuiDialogPanelContents>(ModuleType.GuiDialog);
            dialogListener = new GuiDialogListener(this);
            if (constructor.Configuration == null)
            {
                dialogListener.Config.Topic = Topic;
                dialogListener.Config.Type  = Type;
            }
            else
            {
                dialogListener.Config = (GuiDialogConfiguration)constructor.Configuration;
            }

            Interactable = ModuleListPanel.SceneInteractable;
            dialogListener.StartListening();
            UpdateModuleButton();
        }