.. _control-stiffness-api: Stiffness control API +++++++++++++++++++++ :ref:`Overview ` | API .. seealso:: - :ref:`naoqi-motion` ------------ Method list ----------- .. cpp:class:: ALMotionProxy * :cpp:func:`ALMotionProxy::stiffnessInterpolation` * :cpp:func:`ALMotionProxy::setStiffnesses` * :cpp:func:`ALMotionProxy::getStiffnesses` .. cpp:function:: void ALMotionProxy::stiffnessInterpolation( const AL::ALValue& names, const AL::ALValue& stiffnessLists, const AL::ALValue& timeLists ) Interpolates one or multiple joints to a targeted stiffness or along timed trajectories of stiffness. This is a blocking call. :param names: Name or names of joints, chains, "Body", "BodyJoints" or "BodyActuators". :param stiffnessLists: An stiffness, list of stiffnesses or list of list of stiffnesses :param timeLists: A time, list of times or list of list of times. :download:`almotion_stiffnessinterpolation.py ` .. literalinclude:: /samples/python/almotion/almotion_stiffnessinterpolation.py :language: py .. cpp:function:: void ALMotionProxy::setStiffnesses( const AL::ALValue& names, const AL::ALValue& stiffnesses ) Sets the stiffness of one or more joints. This is a non-blocking call. :param names: Names of joints, chains, "Body", "BodyJoints" or "BodyActuators". :param stiffnesses: One or more stiffnesses between zero and one. :download:`almotion_setstiffnesses.cpp ` .. literalinclude:: /samples/cpp/almotion/almotion_setstiffnesses.cpp :language: cpp :download:`almotion_setstiffnesses.py ` .. literalinclude:: /samples/python/almotion/almotion_setstiffnesses.py :language: py .. cpp:function:: std::vector ALMotionProxy::getStiffnesses(const AL::ALValue& jointName) Gets stiffness of a joint or group of joints :param jointName: Name of the joints, chains, "Body", "BodyJoints" or "BodyActuators". :return: One or more stiffnesses. 1.0 indicates maximum stiffness. 0.0 indicated minimum stiffness :download:`almotion_getstiffnesses.cpp ` .. literalinclude:: /samples/cpp/almotion/almotion_getstiffnesses.cpp :language: cpp :download:`almotion_getstiffnesses.py ` .. literalinclude:: /samples/python/almotion/almotion_getstiffnesses.py :language: py