Skip to content

Latest commit

 

History

History
243 lines (162 loc) · 7.05 KB

ros_motion_and_control.rst

File metadata and controls

243 lines (162 loc) · 7.05 KB

ROS & ROS2: Motion and control configuration


Control mode

The KUKA LBR iiwa can be operated with a number of different controllers

Default service name Service type (srv) Allowed values (case-insensitive)
/iiwa/set_control_mode libiiwa_msgs/SetString POSITION, JOINT_IMPEDANCE, CARTESIAN_IMPEDANCE, CARTESIAN_SINE_IMPEDANCE

Example:

.. tabs::

    .. group-tab:: ROS

        .. tabs::

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

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

            .. group-tab:: Python

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

    .. group-tab:: ROS2

        .. tabs::

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

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

            .. group-tab:: Python

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


Motion type

The KUKA LBR iiwa can programmed to perform different types of motion

Default service name Service type (srv) Allowed values (case-insensitive)
/iiwa/set_motion_type libiiwa_msgs/SetString PTP, LIN, LIN_REL, CIRC

Example:

.. tabs::

    .. group-tab:: ROS

        .. tabs::

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

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

            .. group-tab:: Python

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

    .. group-tab:: ROS2

        .. tabs::

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

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

            .. group-tab:: Python

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


Control interface

The KUKA LBR iiwa can be operated with a number of different motion classes

Default service name Service type (srv) Allowed values (case-insensitive)
/iiwa/set_control_interface libiiwa_msgs/SetString STANDARD, SERVO

Example:

.. tabs::

    .. group-tab:: ROS

        .. tabs::

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

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

            .. group-tab:: Python

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

    .. group-tab:: ROS2

        .. tabs::

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

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

            .. group-tab:: Python

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


Execution type

Motion commands can be executed synchronously or asynchronously

Default service name Service type (srv) Allowed values (case-insensitive)
/iiwa/set_execution_type libiiwa_msgs/SetString ASYNCHRONOUS, SYNCHRONOUS

Example:

.. tabs::

    .. group-tab:: ROS

        .. tabs::

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

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

            .. group-tab:: Python

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

    .. group-tab:: ROS2

        .. tabs::

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

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

            .. group-tab:: Python

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