lbr_bringup =========== The ``lbr_bringup`` package hosts some launch files, which can be included via standard procedures: .. code:: python from launch import LaunchDescription from launch.actions import IncludeLaunchDescription from launch.substitutions import PathSubstitution from launch_ros.substitutions import FindPackageShare def generate_launch_description() -> LaunchDescription: return LaunchDescription( [ IncludeLaunchDescription( PathSubstitution( FindPackageShare("lbr_bringup") / "launch" / "mock.launch.py" ) ) ] ) The launch files can also be run via the command line, as further described below. .. contents:: Table of Contents :depth: 2 :local: :backlinks: none Launch Files ------------ Mock Setup ~~~~~~~~~~ Useful for running a physics-free simulation of the system. This launch file will (see `mock.launch.py `_:octicon:`link-external`): #. Run the ``robot_state_publisher`` #. Run the ``ros2_control_node`` with mock components as loaded from ``robot_description`` #. Load ``ros2_controllers`` .. code:: bash ros2 launch lbr_bringup mock.launch.py \ model:=iiwa7 # [iiwa7, iiwa14, med7, med14] .. note:: List all arguments for the launch file via ``ros2 launch lbr_bringup mock.launch.py -s``. Gazebo Simulation ~~~~~~~~~~~~~~~~~ Useful for running a physics simulation the the system. This launch file will will (see `gazebo.launch.py `_:octicon:`link-external`): #. Start the ``robot_state_publisher`` #. Start the ``Gazebo`` simulation #. Spawn the selected robot model (includes the ``ros2_control_node`` within the ``Gazebo`` plugin) #. Load ``ros2_controllers`` .. code:: bash ros2 launch lbr_bringup gazebo.launch.py \ model:=iiwa7 # [iiwa7, iiwa14, med7, med14] .. note:: List all arguments for the launch file via ``ros2 launch lbr_bringup gazebo.launch.py -s``. Hardware ~~~~~~~~ .. warning:: Do always execute in ``T1`` mode first. .. note:: Make sure you have followed :doc:`Hardware Setup <../../lbr_fri_ros2_stack/doc/hardware_setup>` first. #. Client side configurations: .. dropdown:: Launch the ``LBRServer`` application on the ``KUKA smartPAD`` .. thumbnail:: ../../lbr_demos/doc/img/applications_lbr_server.png Select - ``FRI send period``: ``10 ms`` - ``IP address``: ``your configuration`` - ``FRI control mode``: ``POSITION_CONTROL`` or ``JOINT_IMPEDANCE_CONTROL`` - ``FRI client command mode``: ``POSITION`` #. Launch file: This launch file will (see `hardware.launch.py `_:octicon:`link-external`): #. Run the ``robot_state_publisher`` #. Run the ``ros2_control_node`` with the ``lbr_fri_ros2::SystemInterface`` plugin from :doc:`lbr_ros2_control <../../lbr_ros2_control/doc/lbr_ros2_control>` as loaded from ``robot_description`` (which will attempt to establish a connection to the real robot). #. Load ``ros2_controllers`` .. code:: bash ros2 launch lbr_bringup hardware.launch.py \ model:=iiwa7 # [iiwa7, iiwa14, med7, med14] .. note:: List all arguments for the launch file via ``ros2 launch lbr_bringup hardware.launch.py -s``. RViz ~~~~ This launch file will spin up ``RViz`` for visualization. It will (see `rviz.launch.py `_:octicon:`link-external`): #. Read ``RViz`` configurations. #. Run ``RViz``. .. code:: bash ros2 launch lbr_bringup rviz.launch.py \ rviz_cfg_pkg:=lbr_bringup \ rviz_cfg:=config/mock.rviz # [gazebo.rviz, hardware.rviz, mock.rviz] .. note:: List all arguments for the launch file via ``ros2 launch lbr_bringup rviz.launch.py -s``. .. note:: Requires the user to run `Mock Setup`_, `Gazebo Simulation`_ or `Hardware`_ first. MoveIt ~~~~~~ Please note that MoveIt configurations are specific and you as a user will need to create your own for your system (potentially containing multiple robots or an end-effector). .. code:: bash ros2 launch lbr_bringup move_group.launch.py \ model:=iiwa7 \ mode:=mock \ rviz:=true .. note:: Requires the user to run `Mock Setup`_, `Gazebo Simulation`_ or `Hardware`_ first. .. note:: Runs ``RViz`` with specific MoveIt configurations. General Information on the FRI ------------------------------ The ``FRI`` lets the user select a ``FRI control mode`` and a ``FRI client command mode``. When running the ``LBRServer``: - .. dropdown:: Select ``FRI control mode`` .. thumbnail:: ../../lbr_fri_ros2_stack/doc/img/controller/raw/lbr_server_control_mode.png - .. dropdown:: Select ``FRI client command mode`` .. thumbnail:: ../../lbr_fri_ros2_stack/doc/img/controller/raw/lbr_server_client_command_mode.png The ``FRI control mode`` specifies the mode in which the robot is controlled, and the ``FRI client command mode`` specifies the commands that the user sends. Troubleshooting --------------- Noisy Execution ~~~~~~~~~~~~~~~ - Frequency: Make sure the ``ros2_control_node`` frequency and the ``FRI send period`` are compatible, consider changing ``update_rate`` in `hardware_controllers.yaml `_:octicon:`link-external`. - Realtime priority: Set real time priority in ``code /etc/security/limits.conf``, add the line: ``user - rtprio 99``, where user is your username.