Beispiel #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;
        }
Beispiel #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.PostUnknownType(j);
     }
     catch
     {
         MessageBox.Show("Invalid angle", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);                
     }
 }