adam.model.conversions.idyntree
===============================

.. py:module:: adam.model.conversions.idyntree


Functions
---------

.. autoapisummary::

   adam.model.conversions.idyntree._to_sequence
   adam.model.conversions.idyntree._to_scalar
   adam.model.conversions.idyntree.to_idyntree_solid_shape
   adam.model.conversions.idyntree.to_idyntree_link
   adam.model.conversions.idyntree.to_idyntree_joint
   adam.model.conversions.idyntree.to_idyntree_model


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

.. py:function:: _to_sequence(x) -> list[float]

   Coerce array-like objects to a plain Python list of floats.

   Supports:
   - CasADi DM, SX, MX (uses .full() when available)
   - Objects exposing an `array` attribute (e.g., CasadiLike wrapper)
   - numpy arrays, lists, tuples and other iterables
   - scalars


.. py:function:: _to_scalar(x) -> float

   Coerce a scalar-like object to float (supports CasADi and wrappers).


.. py:function:: to_idyntree_solid_shape(visual: urdf_parser_py.urdf.Visual) -> idyntree.bindings.SolidShape

   :param visual: the visual to convert
   :type visual: urdf_parser_py.urdf.Visual

   :returns: the iDynTree solid shape
   :rtype: iDynTree.SolidShape


.. py:function:: to_idyntree_link(link: adam.model.abc_factories.Link) -> tuple[idyntree.bindings.Link, list[idyntree.bindings.SolidShape]]

   :param link: the link to convert
   :type link: Link

   :returns: A tuple containing the iDynTree link and the iDynTree solid shapes


.. py:function:: to_idyntree_joint(joint: adam.model.abc_factories.Joint, parent_index: int, child_index: int) -> idyntree.bindings.IJoint

   :param joint: the joint to convert
   :type joint: Joint
   :param parent_index: the parent link index
   :type parent_index: int
   :param child_index: the child link index
   :type child_index: int

   :returns: the iDynTree joint
   :rtype: iDynTree.bindings.IJoint


.. py:function:: to_idyntree_model(model: adam.model.model.Model) -> idyntree.bindings.Model

   :param model: the model to convert
   :type model: Model

   :returns: the iDynTree model
   :rtype: iDynTree.Model


