serial_linkage Derived Type

type, public :: serial_linkage

Defines a serial linkage.


Contents


Constructor

public interface serial_linkage

  • private function sl_init(lnks) result(rst)

    Initializes a new serial_linkage object.

    Arguments

    Type IntentOptional Attributes Name
    class(binary_link), intent(in), dimension(:) :: lnks

    A collection of binary_link objects. The collection starts with the first link and progresses to the end-effector in a sequential manner.

    Return Value type(serial_linkage)

    The serial_linkage instance.


Type-Bound Procedures

procedure, public :: forward_kinematics => sl_forward_kinematics

  • private function sl_forward_kinematics(this, q, err) result(rst)

    Computes the forward kinematics for the linkage resulting in a transformation matrix between world and end-effector coordinate frames.

    Arguments

    Type IntentOptional Attributes Name
    class(serial_linkage), intent(in) :: this

    The serial_linkage object.

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

    The array of joint variables. This array must be the same size as there are number of links in this linkage.

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

    An errors-based object providing error handling in the event the array size is incorrect.

    Return Value real(kind=real64), (4,4)

    The resulting 4-by-4 transformation matrix.

procedure, public :: get_link => sl_get_link

  • private function sl_get_link(this, i) result(rst)

    Gets a pointer to the requested link object.

    Arguments

    Type IntentOptional Attributes Name
    class(serial_linkage), intent(in) :: this

    The serial_linkage object.

    integer(kind=int32), intent(in) :: i

    The index of the link to retrieve (1 = first link).

    Return Value class(binary_link), pointer

    A pointer to the requested link.

procedure, public :: get_link_count => sl_get_link_count

  • private pure function sl_get_link_count(this) result(rst)

    Gets the number of links in the linkage.

    Arguments

    Type IntentOptional Attributes Name
    class(serial_linkage), intent(in) :: this

    The serial_linkage object.

    Return Value integer(kind=int32)

    The link count.

procedure, public :: inverse_kinematics => sl_inverse_kinematics_1

  • private function sl_inverse_kinematics_1(this, qo, trg, ib, err) result(rst)

    Solves the inverse kinematics problem for the linkage.

    Arguments

    Type IntentOptional Attributes Name
    class(serial_linkage), intent(in), target :: this

    The serial_linkage object.

    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) :: trg(4,4)

    A transformation matrix relating the end-effector coordinate frame and the world coordinate frame. This transformation matrix defines the end-effector target for the solver.

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

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

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

    An optional error handling object used to retrieve any errors regarding the solver.

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

    An M-element array containing the computed joint variables that satisfy the constraints.

procedure, public :: jacobian => sl_jacobian

  • private function sl_jacobian(this, q, err) result(rst)

    Constructs the Jacobian matrix for the linkage. The Jacobian matrix relates the joint velocities to the end-effector velocity by .

    Arguments

    Type IntentOptional Attributes Name
    class(serial_linkage), intent(in) :: this

    The serial_linkage object.

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

    The array of joint variables. This array must be the same size as there are number of links in this linkage.

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

    An errors-based object providing error handling in the event the array size is incorrect.

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

    The resulting 6-by-N Jacobian matrix where N is the number of links in the linkage.