Пример #1
0
        public void NewRobotSelected(GameObject robot)
        {
            //Debug.Log("new Robot Selected: " + robot.name);

            if (robot.GetComponent <RosConnector>() == null)
            {
                Debug.Log("Error: No rosConnector found");
                return;
            }

            robotManager         = robot;
            rosConnector         = robotManager.GetComponent <RosConnector>();
            jointStatePublisher  = robotManager.GetComponent <JointStatePublisher>();
            jointStateSubscriber = robotManager.GetComponent <JointStateSubscriber>();
            poseStampedPublisher = robotManager.GetComponent <CustomPoseStampedPublisher>();
            rosMode  = dropdownRobotManager.robotConfigs[dropdownRobotManager.robotDropdown.value].rosMode;
            poseMode = dropdownRobotManager.robotConfigs[dropdownRobotManager.robotDropdown.value].poseMode;
            rosModeDropdown.value   = rosMode;
            poseStampDropdown.value = poseMode;
            intervalSlider.value    = dropdownRobotManager.robotConfigs[dropdownRobotManager.robotDropdown.value].poseInterval;
        }
Пример #2
0
        public void NewRobotSelected(GameObject robot)
        {
            if (robot.GetComponent <RosConnector>() == null)
            {
                Debug.Log("Error: No rosConnector found");
                return;
            }

            robotManager         = robot;
            rosConnector         = robotManager.GetComponent <RosConnector>();
            jointStatePublisher  = robotManager.GetComponent <JointStatePublisher>();
            jointStateSubscriber = robotManager.GetComponent <JointStateSubscriber>();
            poseStampedPublisher = robotManager.GetComponent <CustomPoseStampedPublisher>();
            rosMode  = dropdownRobotManager.robotConfigs[dropdownRobotManager.currentRobot].rosMode;
            poseMode = dropdownRobotManager.robotConfigs[dropdownRobotManager.currentRobot].poseMode;
            rosModeDropdown.value   = rosMode;
            poseStampDropdown.value = poseMode;


            //intervalSlider.value = dropdownRobotManager.robotConfigs[dropdownRobotManager.currentRobot].poseInterval;   //Activate for non-MRTK applications
            intervalSlider.SliderValue = dropdownRobotManager.robotConfigs[dropdownRobotManager.currentRobot].poseInterval;
        }