Click or drag to resize

GenericNumericOptimizationPenaltyMethod Method

Solves the specified robot numerically by attempting to minimize a sum-of-squares objective function.

Namespace: Demo3D.IK
Assembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntax
C#
public static double[] PenaltyMethod(
	ScriptingObject robot,
	Matrix targetMatrix
)

Parameters

robot  ScriptingObject
The robot to solve.
targetMatrix  Matrix
The world transformation matrix for the target.

Return Value

Double
Array of solved joint angles (in radians).
Remarks
The objective function returns a sum-of-squares of "distances". The distances are as follows:
  • The distance between the TCP and Target.
  • The Euler angles for the rotation that aligns the axes of the TCP with the axes of the target.
  • A penalty term for joint limit violations.
This is an unconstrained minimization problem. We use the BFGS method with backtracking line search to find a local minima.
See Also