adam.parametric.jax
===================

.. py:module:: adam.parametric.jax


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/adam/parametric/jax/computations_parametric/index


Classes
-------

.. autoapisummary::

   adam.parametric.jax.KinDynComputationsParametric


Package Contents
----------------

.. py:class:: KinDynComputationsParametric(urdfstring: str, joints_name_list: list, links_name_list: list, root_link: str = None, gravity: numpy.array = jnp.array([0, 0, -9.80665, 0, 0, 0]))

   This is a small class that retrieves robot quantities using Jax for Floating Base systems.
   This is parametric w.r.t the link length and densities.


   .. py:attribute:: math


   .. py:attribute:: links_name_list


   .. py:attribute:: g


   .. py:attribute:: urdfstring


   .. py:attribute:: joints_name_list


   .. py:attribute:: representation


   .. py:method:: set_frame_velocity_representation(representation: adam.core.constants.Representations) -> None

      Sets the representation of the velocity of the frames

      :param representation: The representation of the velocity
      :type representation: Representations



   .. py:method:: mass_matrix(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array)

      Returns the Mass Matrix functions computed the CRBA

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: Mass Matrix
      :rtype: M (jnp.array)



   .. py:method:: centroidal_momentum_matrix(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array)

      Returns the Centroidal Momentum Matrix functions computed the CRBA

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: Centroidal Momentum matrix
      :rtype: Jcc (jnp.array)



   .. py:method:: relative_jacobian(frame: str, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array)

      Returns the Jacobian between the root link and a specified frame frames

      :param frame: The tip of the chain
      :type frame: str
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: The Jacobian between the root and the frame
      :rtype: J (jnp.array)



   .. py:method:: jacobian_dot(frame: str, base_transform: jax.numpy.array, joint_positions: jax.numpy.array, base_velocity: jax.numpy.array, joint_velocities: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> jax.numpy.array

      Returns the Jacobian derivative relative to the specified frame

      :param frame: The frame to which the jacobian will be computed
      :type frame: str
      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param base_velocity: The base velocity
      :type base_velocity: jnp.array
      :param joint_velocities: The joint velocities
      :type joint_velocities: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: The Jacobian derivative relative to the frame
      :rtype: Jdot (jnp.array)



   .. py:method:: forward_kinematics(frame: str, base_transform: jax.numpy.array, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array)

      Computes the forward kinematics relative to the specified frame

      :param frame: The frame to which the fk will be computed
      :type frame: str
      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: The fk represented as Homogenous transformation matrix
      :rtype: T_fk (jnp.array)



   .. py:method:: forward_kinematics_fun(frame, length_multiplier: jax.numpy.array, densities: jax.numpy.array)


   .. py:method:: jacobian(frame: str, base_transform, joint_positions, length_multiplier: jax.numpy.array, densities: jax.numpy.array)

      Returns the Jacobian relative to the specified frame

      Args

          frame (str): The frame to which the jacobian will be computed
          base_transform (jnp.array): The homogenous transform from base to world frame
          s (jnp.array): The joints position
          length_multiplier (jnp.array): The length multiplier of the parametrized links
          densities (jnp.array): The densities of the parametrized links

      :returns: The Jacobian relative to the frame
      :rtype: J_tot (jnp.array)



   .. py:method:: bias_force(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, base_velocity: jax.numpy.array, s_dot: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> jax.numpy.array

      Returns the bias force of the floating-base dynamics ejoint_positionsuation,
      using a reduced RNEA (no acceleration and external forces)

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param base_velocity: The base velocity
      :type base_velocity: jnp.array
      :param s_dot: The joints velocity
      :type s_dot: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: the bias force
      :rtype: h (jnp.array)



   .. py:method:: coriolis_term(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, base_velocity: jax.numpy.array, s_dot: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> jax.numpy.array

      Returns the coriolis term of the floating-base dynamics ejoint_positionsuation,
      using a reduced RNEA (no acceleration and external forces)

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param base_velocity: The base velocity
      :type base_velocity: jnp.array
      :param s_dot: The joints velocity
      :type s_dot: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: the Coriolis term
      :rtype: C (jnp.array)



   .. py:method:: gravity_term(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> jax.numpy.array

      Returns the gravity term of the floating-base dynamics ejoint_positionsuation,
      using a reduced RNEA (no acceleration and external forces)

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: the gravity term
      :rtype: G (jnp.array)



   .. py:method:: CoM_position(base_transform: jax.numpy.array, joint_positions: jax.numpy.array, length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> jax.numpy.array

      Returns the CoM position

      :param base_transform: The homogenous transform from base to world frame
      :type base_transform: jnp.array
      :param joint_positions: The joints position
      :type joint_positions: jnp.array
      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: The CoM position
      :rtype: com (jnp.array)



   .. py:method:: get_total_mass(length_multiplier: jax.numpy.array, densities: jax.numpy.array) -> float

      Returns the total mass of the robot

      :param length_multiplier: The length multiplier of the parametrized links
      :type length_multiplier: jnp.array
      :param densities: The densities of the parametrized links
      :type densities: jnp.array

      :returns: The total mass
      :rtype: mass



   .. py:method:: get_original_densities() -> list[float]

      Returns the original densities of the parametric links

      :returns: The original densities of the parametric links
      :rtype: densities



