Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            double[] L = { 25, 25, 120, 60, 60, 25, 25 };
            Robot = new RobotArmState(L, RobotArmState.EXPRESSION_METHOD.EULER_ZYX);
            Idraw = new IsometricDraw(pb3DView.Width, pb3DView.Height, 500);


            double[] angle = { 0, 0, 0, 0, 0, 0, 0 };

            Bitmap bitmap = new Bitmap(pb3DView.Width, pb3DView.Height);

            Idraw.DrawOriginalAxis(bitmap);
            DrawRobot(bitmap, Robot.LinkPos);

            InitTrackBar(tbJ0, -180, 180);
            InitTrackBar(tbJ1, -180, 180);
            InitTrackBar(tbJ2, -180, 180);
            InitTrackBar(tbJ3, -180, 180);
            InitTrackBar(tbJ4, -180, 180);
            InitTrackBar(tbJ5, -180, 180);

            InitTrackBar(tbRX, -180, 180);
            InitTrackBar(tbRY, -180, 180);
            InitTrackBar(tbRZ, -180, 180);

            UpdateAllUIFromState(Robot);
        }
Ejemplo n.º 2
0
 public void UpdateAllUIFromState(RobotArmState state)
 {
     WriteAngleToTrackbar(state.JointAngle);
     WriteAngleToTextBox(state.JointAngle);
     WriteEndPosToTextBox(state.EndPos);
     WriteEndAngleToTextBox(state.CoordinateAngle);
     WriteEndAngleToTrackBar(state.CoordinateAngle);
 }