예제 #1
0
        IEnumerator <ITask> OnApplyJointParametersHandler(OnApplyJointParameters onApply)
        {
            arm.SetJointTargetPoseRequest req = new arm.SetJointTargetPoseRequest();
            req.JointName = onApply.JointName;
            AxisAngle aa = new AxisAngle(
                new Vector3(1, 0, 0),
                (float)(Math.PI * 2 * ((double)onApply.Angle / 360)));

            req.TargetOrientation = aa;

            _articulatedArmPort.SetJointTargetPose(req);
            yield break;
        }
예제 #2
0
 private void btnJointParamsApply_Click(object sender, EventArgs e)
 {
     try
     {
         short angle = short.Parse(textBoxJointAngle.Text);
         OnApplyJointParameters j = new OnApplyJointParameters(this,
                                                               angle,
                                                               lblActiveJointValue.Text);
         _eventsPort.Post(j);
     }
     catch
     {
         MessageBox.Show("Invalid angle", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }