adam.model.abc_factories
========================

.. py:module:: adam.model.abc_factories


Classes
-------

.. autoapisummary::

   adam.model.abc_factories.Pose
   adam.model.abc_factories.Inertia
   adam.model.abc_factories.Limits
   adam.model.abc_factories.Joint
   adam.model.abc_factories.Inertial
   adam.model.abc_factories.Link
   adam.model.abc_factories.ModelFactory


Module Contents
---------------

.. py:class:: Pose

   Pose class


   .. py:attribute:: xyz
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: rpy
      :type:  numpy.typing.ArrayLike


   .. py:method:: build(xyz: numpy.typing.ArrayLike, rpy: numpy.typing.ArrayLike, math: adam.core.spatial_math.SpatialMath) -> Pose
      :staticmethod:



   .. py:method:: zero(math: adam.core.spatial_math.SpatialMath) -> Pose
      :staticmethod:



   .. py:method:: get_xyz() -> numpy.typing.ArrayLike


   .. py:method:: get_rpy() -> numpy.typing.ArrayLike


.. py:class:: Inertia

   .. py:attribute:: matrix
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: ixx
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: ixy
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: ixz
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: iyy
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: iyz
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: izz
      :type:  numpy.typing.DTypeLike


   .. py:method:: build(ixx: numpy.typing.DTypeLike, ixy: numpy.typing.DTypeLike, ixz: numpy.typing.DTypeLike, iyy: numpy.typing.DTypeLike, iyz: numpy.typing.DTypeLike, izz: numpy.typing.DTypeLike, math: adam.core.spatial_math.SpatialMath) -> Inertia
      :staticmethod:



   .. py:method:: zero(math: adam.core.spatial_math.SpatialMath) -> Inertia
      :staticmethod:



   .. py:method:: get_matrix() -> numpy.typing.ArrayLike


.. py:class:: Limits

   Limits class


   .. py:attribute:: lower
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: upper
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: effort
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: velocity
      :type:  numpy.typing.ArrayLike


.. py:class:: Joint

   Bases: :py:obj:`abc.ABC`


   Base Joint class. You need to fill at least these fields


   .. py:attribute:: math
      :type:  adam.core.spatial_math.SpatialMath


   .. py:attribute:: name
      :type:  str


   .. py:attribute:: parent
      :type:  str


   .. py:attribute:: child
      :type:  str


   .. py:attribute:: type
      :type:  str


   .. py:attribute:: axis
      :type:  numpy.typing.ArrayLike


   .. py:attribute:: origin
      :type:  Pose


   .. py:attribute:: limit
      :type:  Limits


   .. py:attribute:: idx
      :type:  int

      Abstract base class for all joints.


   .. py:method:: spatial_transform(q: numpy.typing.ArrayLike) -> numpy.typing.ArrayLike
      :abstractmethod:


      :param q: joint motion
      :type q: npt.ArrayLike

      :returns: spatial transform of the joint given q
      :rtype: npt.ArrayLike



   .. py:method:: motion_subspace() -> numpy.typing.ArrayLike
      :abstractmethod:


      :returns: motion subspace of the joint
      :rtype: npt.ArrayLike



   .. py:method:: homogeneous(q: numpy.typing.ArrayLike) -> numpy.typing.ArrayLike
      :abstractmethod:


      :param q: joint value
      :type q: npt.ArrayLike

      :returns: homogeneous transform given the joint value
      :rtype: npt.ArrayLike



.. py:class:: Inertial

   Inertial description


   .. py:attribute:: mass
      :type:  numpy.typing.DTypeLike


   .. py:attribute:: inertia
      :type:  Inertia


   .. py:attribute:: origin
      :type:  Pose


   .. py:method:: zero(math: adam.core.spatial_math.SpatialMath) -> Inertial
      :staticmethod:


      Returns an Inertial object with zero mass and inertia



   .. py:method:: set_mass(mass: numpy.typing.ArrayLike) -> Inertial

      Set the mass of the inertial object



   .. py:method:: set_inertia(inertia: Inertia) -> Inertial

      Set the inertia of the inertial object



   .. py:method:: set_origin(origin: Pose) -> Inertial

      Set the origin of the inertial object



.. py:class:: Link

   Bases: :py:obj:`abc.ABC`


   Base Link class. You need to fill at least these fields


   .. py:attribute:: math
      :type:  adam.core.spatial_math.SpatialMath


   .. py:attribute:: name
      :type:  str


   .. py:attribute:: visuals
      :type:  list


   .. py:attribute:: inertial
      :type:  Inertial


   .. py:attribute:: collisions
      :type:  list


   .. py:method:: spatial_inertia() -> numpy.typing.ArrayLike
      :abstractmethod:


      :returns:

                the 6x6 inertia matrix expressed at
                               the origin of the link (with rotation)
      :rtype: npt.ArrayLike



   .. py:method:: homogeneous() -> numpy.typing.ArrayLike
      :abstractmethod:


      :returns: the homogeneous transform of the link
      :rtype: npt.ArrayLike



.. py:class:: ModelFactory

   Bases: :py:obj:`abc.ABC`


   The abstract class of the model factory.

   The model factory is responsible for creating the model.

   You need to implement all the methods in your concrete implementation


   .. py:attribute:: math
      :type:  adam.core.spatial_math.SpatialMath


   .. py:attribute:: name
      :type:  str


   .. py:method:: build_link() -> Link
      :abstractmethod:


      build the single link
      :returns: Link



   .. py:method:: build_joint() -> Joint
      :abstractmethod:


      build the single joint

      :returns: Joint



   .. py:method:: get_links() -> list[Link]
      :abstractmethod:


      :returns: the list of the link
      :rtype: list[Link]



   .. py:method:: get_frames() -> list[Link]
      :abstractmethod:


      :returns: the list of the frames
      :rtype: list[Link]



   .. py:method:: get_joints() -> list[Joint]
      :abstractmethod:


      :returns: the list of the joints
      :rtype: list[Joint]



