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: 15.0.2.11458
Syntax
C#
public static double[] PenaltyMethod(
	ScriptingObject robot,
	Matrix targetMatrix
)

Parameters

robot
Type: Demo3D.VisualsScriptingObject
The robot to solve.
targetMatrix
Type: Microsoft.DirectXMatrix
The world transformation matrix for the target.

Return Value

Type: 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