|
| 1 | +.. _ur_robot_driver_startup: |
| 2 | + |
| 3 | +Startup the driver |
| 4 | +================== |
| 5 | + |
| 6 | +Prepare the robot |
| 7 | +----------------- |
| 8 | + |
| 9 | +If you want to use a real robot, or a URSim simulator, with this driver, you need to prepare it, |
| 10 | +first. Make sure that you complete all steps from the :ref:`setup instructions<robot_setup>`, |
| 11 | +installed the External Control URCap and created a program as explained |
| 12 | +:ref:`here<install_urcap>`. |
| 13 | + |
| 14 | +Launch files |
| 15 | +------------ |
| 16 | + |
| 17 | +For starting the driver it is recommended to start the ``ur_control.launch.py`` launchfile from the |
| 18 | +``ur_robot_driver`` package. It starts the driver, a set of controllers and a couple of helper |
| 19 | +nodes for UR robots. The only required arguments are the ``ur_type`` and ``robot_ip`` parameters. |
| 20 | + |
| 21 | +.. code-block:: console |
| 22 | +
|
| 23 | + $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 |
| 24 | +
|
| 25 | +Allowed ``ur_type`` strings: ``ur3``, ``ur3e``, ``ur5``, ``ur5e``, ``ur10``, ``ur10e``, ``ur16e``, |
| 26 | +``ur20``, ``ur30``. |
| 27 | + |
| 28 | +Other important arguments are: |
| 29 | + |
| 30 | + |
| 31 | +* ``kinematics_params_file`` (default: *None*) - Path to the calibration file extracted from the robot, as described in :ref:`calibration_extraction`. |
| 32 | +* ``use_mock_hardware`` (default: *false* ) - Use simple hardware emulator from ros2_control. Useful for testing launch files, descriptions, etc. |
| 33 | +* ``headless_mode`` (default: *false*) - Start driver in :ref:`headless_mode`. |
| 34 | +* ``launch_rviz`` (default: *true*) - Start RViz together with the driver. |
| 35 | +* ``initial_joint_controller`` (default: *scaled_joint_trajectory_controller*) - Use this if you |
| 36 | + want to start the robot with another controller. |
| 37 | + |
| 38 | + .. note:: |
| 39 | + When the driver is started, you can list all loaded controllers using the ``ros2 control |
| 40 | + list_controllers`` command. For this, the package ``ros2controlcli`` must be installed (``sudo |
| 41 | + apt-get install ros-${ROS_DISTRO}-ros2controlcli``). |
| 42 | + |
| 43 | + |
| 44 | +For all other arguments, please see |
| 45 | + |
| 46 | + |
| 47 | +.. code-block:: console |
| 48 | +
|
| 49 | + $ ros2 launch ur_robot_driver ur_control.launch.py --show-args |
| 50 | +
|
| 51 | +Also, there are predefined launch files for all supported types of UR robots. |
| 52 | + |
| 53 | +.. _robot_startup_program: |
| 54 | + |
| 55 | +Finish startup on the robot |
| 56 | +--------------------------- |
| 57 | + |
| 58 | +Unless :ref:`headless_mode` is used, you will now have to start the *External Control URCap* program on |
| 59 | +the robot that you have created earlier. |
| 60 | + |
| 61 | +Depending on the :ref:`robot control mode<operation_modes>` do the following: |
| 62 | + |
| 63 | +* In *local control mode*, load the program on the robot and press the "Play" button |play_button| on the teach pendant. |
| 64 | +* In *remote control mode* load and start the program using the following dashboard calls: |
| 65 | + |
| 66 | + .. code-block:: console |
| 67 | +
|
| 68 | + $ ros2 service call /dashboard_client/load_program ur_dashboard_msgs/srv/Load "filename: my_robot_program.urp"`` |
| 69 | + $ ros2 service call /dashboard_client/play std_srvs/srv/Trigger {} |
| 70 | +
|
| 71 | +* When the driver is started with ``headless_mode:=true`` nothing is needed. The driver is running |
| 72 | + already. |
| 73 | + |
| 74 | + |
| 75 | +.. _verify_calibration: |
| 76 | + |
| 77 | +Verify calibration info is being used correctly |
| 78 | +----------------------------------------------- |
| 79 | + |
| 80 | + |
| 81 | +If you passed a path to an extracted calibration via the *kinematics_params_file* |
| 82 | +parameter, ensure that the loaded calibration matches that of the robot by inspecting the console |
| 83 | +output after launching the ``ur_robot_driver``. If the calibration does not match, you will see an error: |
| 84 | + |
| 85 | +.. code-block:: |
| 86 | +
|
| 87 | + [INFO] [1694437690.406932381] [URPositionHardwareInterface]: Calibration checksum: 'calib_xxxxxxxxxxxxxxxxxxx' |
| 88 | + [ERROR] [1694437690.516957265] [URPositionHardwareInterface]: The calibration parameters of the connected robot don't match the ones from the given kinematics config file. |
| 89 | +
|
| 90 | +With the correct calibration you should see: |
| 91 | + |
| 92 | +.. code-block:: |
| 93 | +
|
| 94 | + [INFO] [1694437690.406932381] [URPositionHardwareInterface]: Calibration checksum: 'calib_xxxxxxxxxxxxxxxxxxx' |
| 95 | + [INFO] [1694437690.516957265] [URPositionHardwareInterface]: Calibration checked successfully. |
| 96 | +
|
| 97 | +Alternatively, search for the term *checksum* in the console output after launching the driver. |
| 98 | +Verify that the printed checksum matches that on the final line of your extracted calibration file. |
| 99 | + |
| 100 | + |
| 101 | +.. _continuation_after_interruptions: |
| 102 | + |
| 103 | +Continuation after interruptions |
| 104 | +-------------------------------- |
| 105 | + |
| 106 | + |
| 107 | +Whenever the *External Control URCap* program gets interrupted, it has to be unpaused / restarted. |
| 108 | + |
| 109 | +If that happens, you will see the output ``Connection to reverse interface dropped.`` |
| 110 | + |
| 111 | +This can happen, e,g, when |
| 112 | + |
| 113 | +* The running program is actively stopped. |
| 114 | +* The robot goes into a protective stop / EM stop. (The program will be paused, then) |
| 115 | +* The communication is stopped, since the external source did not receive a command in time. |
| 116 | +* There was another script sent for execution e.g. |
| 117 | + |
| 118 | + * Script code was sent to the robot via its primary interface |
| 119 | + * Robot motion is performed using the Teach pendant |
| 120 | + |
| 121 | +Depending on the operation mode, perform one of the following steps: |
| 122 | + |
| 123 | +* In *local control mode*, simply press the "Play" button |play_button| on the teach pendant. |
| 124 | +* In *remote control mode* start the program using the following dashboard call: |
| 125 | + |
| 126 | + .. code-block:: console |
| 127 | +
|
| 128 | + $ ros2 service call /dashboard_client/play std_srvs/srv/Trigger {} |
| 129 | +
|
| 130 | +* When the driver is started with ``headless_mode:=true`` perform the following service call: |
| 131 | + |
| 132 | + .. code-block:: console |
| 133 | +
|
| 134 | + $ ros2 service call /io_and_status_controller/resend_robot_program std_srvs/srv/Trigger {} |
| 135 | +
|
| 136 | +
|
| 137 | +
|
| 138 | +
|
| 139 | +
|
| 140 | +.. |play_button| image:: ../resources/play_button.svg |
| 141 | + :height: 20px |
| 142 | + :width: 20px |
0 commit comments