solve_inverse_kinematics Function

public function solve_inverse_kinematics(mdl, qo, constraints, df, slvr, ib, args, err) result(rst)

Solves the inverse kinematics problem for a linkage. An iterative solution procedure is utilized.

Arguments

Type IntentOptional Attributes Name
procedure(vecfcn), intent(in), pointer :: mdl

A routine used to compute the error in the kinematics equations based upon the current solution estimate.

real(kind=real64), intent(in), dimension(:) :: qo

An M-element array containing an initial estimate of the M joint variables.

real(kind=real64), intent(in), target, dimension(:) :: constraints

An N-element array containing the target values (constraints) for each of the N kinematic equations in the model. N must be at least equal to M (the number of joint variables).

real(kind=real64), intent(out), optional, target, dimension(:) :: df

An optional N-element array that, if supplied, can be used to retrieve the residuals of each of the N kinematic equations.

class(least_squares_solver), intent(inout), optional, target :: slvr

An optional solver that can be used in place of the default Levenberg-Marquardt solver.

type(iteration_behavior), intent(out), optional :: ib

An optional output that can be used to gather information on the solver.

class(*), intent(inout), optional, target :: args

An optional argument that can be used to communicate with mdl.

class(errors), intent(inout), optional, target :: err

An errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution.

Return Value real(kind=real64), allocatable, dimension(:)

An M-element array containing the computed joint variables.


Contents