public Reach doReach(Graspable ob,String kind)
    {
        Reach r=null;
        callexe=false;
        recordit=false;
        recognize=false;
        //nslrun=false;
        Hand me=(Hand)this;
        obj=ob;
        me.makeNeutral();
        double[] pre_t=new double[5];
        double[] pre_v=new double[5];
        int pc=0;
        pre_t[pc]=0;
        pre_v[pc++]=0;
        pre_t[pc]=0.5;
        pre_v[pc++]=0.45;
        pre_t[pc]=0.75;
        pre_v[pc++]=1.2;
        pre_t[pc]=1;
        pre_v[pc++]=1;
        kol=getJoint("WRISTz");
        teta1=new double[segc];
        storeAngles(teta1);
        dis=1e10;
        HV.self.reportStart("     Starting reach of type:"+kind);
        if (kind.equals("visual") )
            r=fireVisualSearch();
        else if (kind.equals("silent") )
            r=fireSilentSearch();
        else if (kind.equals("execute") )
            r=fireExecution();
        else if (kind.equals("record") )
        {
            recordit=true;
            System.out.println("recorit =true done");
            Learn.prepareForPattern();
            r=fireExecution();
        }
        else if (kind.equals("recognize") )
        {
            recognize=true;
            System.out.println("recognize =true done");
            Learn.prepareForPattern();
            r=fireExecution();
        }
        /*
        else if (kind.equals("nslrun") )
        {
            nslrun=true;
            System.out.println("nslrun =true done");
            Learn.prepareForPattern();
            r=fireExecution();
        }
        */
        else if (kind.equals("babble") )
        {
            //babble=true;
            System.out.println(" babble=true done ...");
            // Motor.initBabble();
            r=fireBabbleLearn();
        }
        else if (kind.equals("PDFgrasp") )
        {
            r=firePDFgrasp();
        }
        else if (kind.equals("PDFwristgrasp") )
        {
            r=firePDFwristgrasp();
        }
        //if (r!=null) me.makeNeutral();
        return r;
    }