Skip to content

Latest commit

 

History

History
190 lines (127 loc) · 5.39 KB

ros_conditions.rst

File metadata and controls

190 lines (127 loc) · 5.39 KB

ROS & ROS2: Conditions

Conditions make it possible to monitor the robot control and trigger specific reactions (termination of a running motion) if definable limits are exceeded or not reached

Reset conditions

Reset all conditions

Default service name Message type (srv)
/iiwa/reset_conditions std_srvs/Empty
.. tabs::

    .. group-tab:: ROS

        .. tabs::

            .. group-tab:: Command-line tool (rosservice)

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-reset_conditions-1]
                    :end-before: [end-command-line-reset_conditions-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: python
                    :start-after: [start-python-reset_conditions-1]
                    :end-before: [end-python-reset_conditions-1]

    .. group-tab:: ROS2

        .. tabs::

            .. group-tab:: Command-line tool (ros2 service)

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-reset_conditions-1]
                    :end-before: [end-command-line-reset_conditions-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: python
                    :start-after: [start-python-reset_conditions-1]
                    :end-before: [end-python-reset_conditions-1]

Force conditions

Define the force condition (threshold and tolerance) for each Cartesian axis

Default service name Message type (srv) Units
/iiwa/set_force_condition libiiwa_msgs/SetArray # TODO

Implementation details

Note

The current implementation links each defined condition by a logic OR operation

# TODO

Example

.. tabs::

    .. group-tab:: ROS

        .. tabs::

            .. group-tab:: Command-line tool (rosservice)

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-set_force_condition-1]
                    :end-before: [end-command-line-set_force_condition-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: python
                    :start-after: [start-python-set_force_condition-1]
                    :end-before: [end-python-set_force_condition-1]

    .. group-tab:: ROS2

        .. tabs::

            .. group-tab:: Command-line tool (ros2 service)

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-set_force_condition-1]
                    :end-before: [end-command-line-set_force_condition-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: python
                    :start-after: [start-python-set_force_condition-1]
                    :end-before: [end-python-set_force_condition-1]

Joint torque conditions

Define the joint torque condition (lower and upper limits) for each joint axis

Default service name Message type (srv) Units
/iiwa/set_joint_torque_condition libiiwa_msgs/SetArray # TODO

Implementation details

Note

The current implementation links each defined condition by a logic OR operation

# TODO

Example

.. tabs::

    .. group-tab:: ROS

        .. tabs::

            .. group-tab:: Command-line tool (rosservice)

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-set_joint_torque_condition-1]
                    :end-before: [end-command-line-set_joint_torque_condition-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros_conditions.txt
                    :language: python
                    :start-after: [start-python-set_joint_torque_condition-1]
                    :end-before: [end-python-set_joint_torque_condition-1]

    .. group-tab:: ROS2

        .. tabs::

            .. group-tab:: Command-line tool (ros2 service)

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: bash
                    :start-after: [start-command-line-set_joint_torque_condition-1]
                    :end-before: [end-command-line-set_joint_torque_condition-1]

            .. group-tab:: Python

                .. literalinclude:: ../snippets/ros2_conditions.txt
                    :language: python
                    :start-after: [start-python-set_joint_torque_condition-1]
                    :end-before: [end-python-set_joint_torque_condition-1]