Пример #1
0
 public void add(subactInfo subact)
 {
     for (int i = 0; i < subact.Count(); i++)
     {
         txt.WriteLine(subact.infotxt[i]);
     }
 }
Пример #2
0
        public static subactInfo Pick(Object cup)
        {
            subactInfo    rtn   = new subactInfo();
            URCoordinates up    = new URCoordinates(cup.gripPos());
            URCoordinates debug = new URCoordinates(up);
            URCoordinates down  = new URCoordinates(up);

            debug.Y -= 0.02f;//上升
            rtn.infotxt.Add("position");
            rtn.infotxt.Add(debug.ToPos());
            rtn.infotxt.Add(up.ToPos());

            rtn.infotxt.Add("gripper");
            rtn.infotxt.Add("0");

            rtn.infotxt.Add("sleep");
            rtn.infotxt.Add("1000");

            down.Y += 0.07f;//下降
            rtn.infotxt.Add("position");
            rtn.infotxt.Add(down.ToPos());

            rtn.infotxt.Add("gripper");
            rtn.infotxt.Add("35");

            rtn.infotxt.Add("sleep");
            rtn.infotxt.Add("1000");

            up.Y -= 0.02f;//上升
            rtn.infotxt.Add("position");
            rtn.infotxt.Add(up.ToPos());
            return(rtn);
        }
Пример #3
0
        public static subactInfo Stir(Object toCup)
        {
            subactInfo    rtn = new subactInfo();
            URCoordinates up  = new URCoordinates(toCup.gripPos());

            up.X -= 0.015f;
            up.Z += 0.015f;
            up.Y -= 0.06f;//上升
            URCoordinates now = new URCoordinates(up);

            rtn.infotxt.Add("pmovej");
            rtn.infotxt.Add(up.ToPos());
            now.Y += 0.05f;//下去

            now.X -= 0.01f;
            rtn.infotxt.Add(now.ToPos());
            now.X += 0.01f;
            now.Z += 0.01f;
            rtn.infotxt.Add(now.ToPos());
            now.X += 0.01f;
            now.Z -= 0.01f;
            rtn.infotxt.Add(now.ToPos());
            now.X -= 0.01f;
            now.Z -= 0.01f;
            rtn.infotxt.Add(now.ToPos());
            now.X -= 0.01f;
            now.Z += 0.01f;
            rtn.infotxt.Add(now.ToPos());
            rtn.infotxt.Add(up.ToPos());
            return(rtn);
        }
Пример #4
0
        public static subactInfo AddaSpoon(Object toCup)
        {
            subactInfo    rtn = new subactInfo();
            URCoordinates up  = new URCoordinates(toCup.gripPos());

            up.Rx = 2.2f;
            up.Ry = -2.2f;
            up.Rz = 0;
            up.X -= 0.09f;
            up.Z += 0.02f;
            up.Y += 0.03f;//下降

            URCoordinates upper = new URCoordinates(up);

            upper.Y -= 0.07f;//上
            rtn.infotxt.Add("pmovej");
            rtn.infotxt.Add(upper.ToPos());


            URCoordinates add = new URCoordinates(up);

            add.Rx = 3.14f;
            add.Ry = 0f;
            add.Rz = 0f;
            add.Y -= 0.09f;//上升
            add.X += 0.05f;
            rtn.infotxt.Add("pmovej");
            rtn.infotxt.Add(up.ToPos());
            rtn.infotxt.Add("pmovej");
            rtn.infotxt.Add(add.ToPos());
            rtn.infotxt.Add("pmovej");
            add.Y -= 0.03f;//上升
            rtn.infotxt.Add(add.ToPos());
            return(rtn);
        }
Пример #5
0
        public static subactInfo Scoop()
        {
            subactInfo rtn = new subactInfo();

            rtn.AddFile("Path//Scoop.path");
            return(rtn);
        }
Пример #6
0
        public static subactInfo Trigger()
        {
            subactInfo rtn = new subactInfo();

            rtn.AddFile("Path//trigger.path");
            return(rtn);
        }
Пример #7
0
        public static subactInfo Pour(Object toCup)
        {
            subactInfo    rtn = new subactInfo();
            URCoordinates up  = new URCoordinates(toCup.gripPos());

            up.Y -= 0.03f;//上升
            URCoordinates debug = new URCoordinates(up);

            debug.Y -= 0.01f;//上升
            URCoordinates now = new URCoordinates(up);

            rtn.infotxt.Add("position");
            rtn.infotxt.Add(debug.ToPos());
            rtn.infotxt.Add(up.ToPos());
            now.X -= 0.09f;
            rtn.infotxt.Add(now.ToPos());
            now.Rx -= 1.57f;
            now.Ry += 1.57f;
            rtn.infotxt.Add(now.ToPos());
            now.Rx -= 1.13f;
            now.Ry += 1.13f;
            now.X  += 0.06f;
            rtn.infotxt.Add(now.ToPos());
            up.Y -= 0.02f;//上升
            rtn.infotxt.Add(up.ToPos());
            rtn.infotxt.Add(debug.ToPos());
            return(rtn);
        }
Пример #8
0
        public static subactInfo Place(Object cup, URCoordinates Wpoint)
        {
            cup.setNowPos(Wpoint);

            subactInfo    rtn   = new subactInfo();
            URCoordinates up    = new URCoordinates(cup.gripPos());
            URCoordinates debug = new URCoordinates(up);
            URCoordinates down  = new URCoordinates(up);

            down.Y += 0.07f;  //下降

            debug.Y -= 0.02f; //上升
            rtn.infotxt.Add("position");
            rtn.infotxt.Add(debug.ToPos());
            rtn.infotxt.Add(up.ToPos());
            rtn.infotxt.Add(down.ToPos());
            rtn.infotxt.Add("gripper");
            rtn.infotxt.Add("0");

            rtn.infotxt.Add("sleep");
            rtn.infotxt.Add("1000");

            rtn.infotxt.Add("position");
            rtn.infotxt.Add(up.ToPos());
            return(rtn);
        }
Пример #9
0
        public static subactInfo Place(subactInfo.place ThePlace)
        {
            subactInfo rtn = new subactInfo();

            if (ThePlace == subactInfo.place.DripTray)
            {
                string[] file = System.IO.File.ReadAllLines($"Path//toDripTray.path");
                foreach (string line in file)
                {
                    rtn.infotxt.Add(line);
                }
            }
            rtn.infotxt.Add("gripper");
            rtn.infotxt.Add("0");
            rtn.infotxt.Add("sleep");
            rtn.infotxt.Add("1000");
            return(rtn);
        }