コード例 #1
0
ファイル: LbcbConversion.cs プロジェクト: mbletzinger/lbcb-om
 public LbcbConversion(String label, Lbcb lbcb, RigidTransform transform)
 {
     String newlabel = lbcb.getLabel() + "_" + label;
     this.lbcb = new Lbcb( newlabel, lbcb.getActuatorPins());
     this.transform = transform;
     this.label = label;
 }
コード例 #2
0
        public void setLbcb(bool isLbcb2, double[] flattenedPinArray, double[] motionCenter, double[] flattenedTransformation)
        {
            double[][] pins = new double[6][];
            double[,] xform = new double[6, 6];
            double[,] xpins = new double[6, 6];
            List2String l2s = new List2String();
            DenseMatrix2String m2s = new DenseMatrix2String();

            for (int r = 0; r < 6; r++)
            {
                pins[r] = new double[6];
                for (int c = 0; c < 6; c++)
                {
                    pins[r][c] = flattenedPinArray[r * 6 + c];
                    xpins[r,c] = flattenedPinArray[r * 6 + c];
                    xform[r, c] = flattenedTransformation[r * 6 + c];

                }
            }

            log.Info("Creating " + (isLbcb2 ? "LBCB 2" : "LBCB 1")
                + " with \n]\t Motion Center: " + l2s.ToString(motionCenter)
               + "\n\t Transformation Matrix: " + m2s.ToString(DenseMatrix.OfArray(xform))
               + "\n\t Pins Locations: " + m2s.ToString(DenseMatrix.OfArray(xpins)));
               Lbcb lbcb = new Lbcb((isLbcb2 ? "LBCB 2" : "LBCB 1"), pins);
            lbcbs[(isLbcb2 ? 1 : 0)] = lbcb;
            RigidTransform transform = new RigidTransform(motionCenter,xform);
            transforms[(isLbcb2 ? 1 : 0)] = transform;
        }