Exemple #1
0
 public async void UpdateObjectPosition()
 {
     if (RobotsList.Dropdown.dropdownItems.Count == 0 || EndEffectorList.Dropdown.dropdownItems.Count == 0)
     {
         Base.NotificationsModernUI.Instance.ShowNotification("Failed to update object position", "No robot or end effector available");
         return;
     }
     PivotEnum pivot = (PivotEnum)Enum.Parse(typeof(PivotEnum), (string)PivotList.GetValue());
     IRobot    robot = SceneManager.Instance.GetRobotByName((string)RobotsList.GetValue());
     await WebsocketManager.Instance.UpdateActionObjectPoseUsingRobot(CurrentObject.Data.Id,
                                                                      robot.GetId(), (string)EndEffectorList.GetValue(), pivot);
 }
    public async void SelectRobot(string robotName)
    {
        try {
            IRobot robot = SceneManager.Instance.GetRobotByName(robotName);
            robotId = robot.GetId();
            if (!string.IsNullOrEmpty(DropdownEndEffectors.Dropdown.GetValue().ToString()))
            {
                SelectEE(DropdownEndEffectors.Dropdown.GetValue().ToString());
            }
            await DropdownArms.Init(robotId, SelectArm);

            SelectArm(DropdownArms.Dropdown.GetValue().ToString());
        } catch (ItemNotFoundException ex) {
            Notifications.Instance.ShowNotification("Failed to select robot", "Robot " + robotName + " does not exists.");
            return;
        }
    }
Exemple #3
0
 public override string GetId()
 {
     return($"{Robot.GetId()}/{ARMId}/{EEId}");
 }
Exemple #4
0
 public void InitEE(IRobot robot, string eeId)
 {
     RobotId = robot.GetId();
     EEId    = eeId;
     SetLabel(robot.GetName(), eeId);
 }