diff --git a/ur_robot_driver/doc/dashboard_client.rst b/ur_robot_driver/doc/dashboard_client.rst index f76d72e79..5802623f3 100644 --- a/ur_robot_driver/doc/dashboard_client.rst +++ b/ur_robot_driver/doc/dashboard_client.rst @@ -1,4 +1,4 @@ -.. _dashboard_client: +.. _dashboard_client_ros2: Dashboard client ================ diff --git a/ur_robot_driver/doc/installation/install_urcap_cb3.rst b/ur_robot_driver/doc/installation/install_urcap_cb3.rst deleted file mode 100644 index bd0afdba4..000000000 --- a/ur_robot_driver/doc/installation/install_urcap_cb3.rst +++ /dev/null @@ -1,67 +0,0 @@ -.. _install-urcap-cb3: - -Installing a URCap on a CB3 robot -================================= - -For using the *ur_robot_driver* with a real robot you need to install the -**externalcontrol-1.0.5.urcap** which can be found inside the **resources** folder of this driver. - -**Note**\ : For installing this URCap a minimal PolyScope version of 3.7 is necessary. - -To install it you first have to copy it to the robot's **programs** folder which can be done either -via scp or using a USB stick. - -On the welcome screen select *Setup Robot* and then *URCaps* to enter the URCaps installation -screen. - - -.. image:: initial_setup_images/cb3_01_welcome.png - :target: initial_setup_images/cb3_01_welcome.png - :alt: Welcome screen of a CB3 robot - - -There, click the little plus sign at the bottom to open the file selector. There you should see -all urcap files stored inside the robot's programs folder or a plugged USB drive. Select and open -the **externalcontrol-1.0.5.urcap** file and click *open*. Your URCaps view should now show the -**External Control** in the list of active URCaps and a notification to restart the robot. Do that -now. - - -.. image:: initial_setup_images/cb3_05_urcaps_installed.png - :target: initial_setup_images/cb3_05_urcaps_installed.png - :alt: URCaps screen with installed urcaps - - -After the reboot you should find the **External Control** URCaps inside the *Installation* section. -For this select *Program Robot* on the welcome screen, select the *Installation* tab and select -**External Control** from the list. - - -.. image:: initial_setup_images/cb3_07_installation_excontrol.png - :target: initial_setup_images/cb3_07_installation_excontrol.png - :alt: Installation screen of URCaps - - -Here you'll have to setup the IP address of the external PC which will be running the ROS driver. -Note that the robot and the external PC have to be in the same network, ideally in a direct -connection with each other to minimize network disturbances. The custom port should be left -untouched for now. - - -.. image:: initial_setup_images/cb3_10_prog_structure_urcaps.png - :target: initial_setup_images/cb3_10_prog_structure_urcaps.png - :alt: Insert the external control node - - -To use the new URCaps, create a new program and insert the **External Control** program node into -the program tree - - -.. image:: initial_setup_images/cb3_11_program_view_excontrol.png - :target: initial_setup_images/cb3_11_program_view_excontrol.png - :alt: Program view of external control - - -If you click on the *command* tab again, you'll see the settings entered inside the *Installation*. -Check that they are correct, then save the program. Your robot is now ready to be used together with -this driver. diff --git a/ur_robot_driver/doc/installation/install_urcap_e_series.rst b/ur_robot_driver/doc/installation/install_urcap_e_series.rst deleted file mode 100644 index 7ff99bc44..000000000 --- a/ur_robot_driver/doc/installation/install_urcap_e_series.rst +++ /dev/null @@ -1,66 +0,0 @@ -.. _install-urcap-e-series: - -Installing a URCap on a e-Series robot -====================================== - -For using the *ur_robot_driver* with a real robot you need to install the -**externalcontrol-1.0.5.urcap** which can be found inside the **resources** folder of this driver. - -**Note**\ : For installing this URCap a minimal PolyScope version of 5.1 is necessary. - -To install it you first have to copy it to the robot's **programs** folder which can be done either -via scp or using a USB stick. - -On the welcome screen click on the hamburger menu in the top-right corner and select *Settings* to enter the robot's setup. There select *System* and then *URCaps* to enter the URCaps installation screen. - - -.. image:: initial_setup_images/es_01_welcome.png - :target: initial_setup_images/es_01_welcome.png - :alt: Welcome screen of an e-Series robot - - -There, click the little plus sign at the bottom to open the file selector. There you should see -all urcap files stored inside the robot's programs folder or a plugged USB drive. Select and open -the **externalcontrol-1.0.5.urcap** file and click *open*. Your URCaps view should now show the -**External Control** in the list of active URCaps and a notification to restart the robot. Do that -now. - - -.. image:: initial_setup_images/es_05_urcaps_installed.png - :target: initial_setup_images/es_05_urcaps_installed.png - :alt: URCaps screen with installed urcaps - - -After the reboot you should find the **External Control** URCaps inside the *Installation* section. -For this select *Program Robot* on the welcome screen, select the *Installation* tab and select -**External Control** from the list. - - -.. image:: initial_setup_images/es_07_installation_excontrol.png - :target: initial_setup_images/es_07_installation_excontrol.png - :alt: Installation screen of URCaps - - -Here you'll have to setup the IP address of the external PC which will be running the ROS driver. -Note that the robot and the external PC have to be in the same network, ideally in a direct -connection with each other to minimize network disturbances. The custom port should be left -untouched for now. - - -.. image:: initial_setup_images/es_10_prog_structure_urcaps.png - :target: initial_setup_images/es_10_prog_structure_urcaps.png - :alt: Insert the external control node - - -To use the new URCaps, create a new program and insert the **External Control** program node into -the program tree - - -.. image:: initial_setup_images/es_11_program_view_excontrol.png - :target: initial_setup_images/es_11_program_view_excontrol.png - :alt: Program view of external control - - -If you click on the *command* tab again, you'll see the settings entered inside the *Installation*. -Check that they are correct, then save the program. Your robot is now ready to be used together with -this driver. diff --git a/ur_robot_driver/doc/installation/robot_setup.rst b/ur_robot_driver/doc/installation/robot_setup.rst index 423488c95..c4132f6e4 100644 --- a/ur_robot_driver/doc/installation/robot_setup.rst +++ b/ur_robot_driver/doc/installation/robot_setup.rst @@ -1,98 +1,11 @@ -.. _robot_setup: - Setting up a UR robot for ur_robot_driver ========================================= -Network setup -------------- - -There are many possible ways to connect a UR robot. This section describes a good example using static IP addresses and a direct connection from the PC to the Robot to minimize latency introduced by network hardware. Though a good network switch usually works fine, as well. - - -#. - Connect the UR control box directly to the remote PC with an ethernet cable. - -#. - Open the network settings from the UR teach pendant (Setup Robot -> Network) and enter these settings: - -.. code-block:: - - IP address: 192.168.1.102 - Subnet mask: 255.255.255.0 - Default gateway: 192.168.1.1 - Preferred DNS server: 192.168.1.1 - Alternative DNS server: 0.0.0.0 - -* Enable remote control (Not applicable on PolyScope X versions) - #. Go to the hamburger menu -> settings. - #. Go to System -> Remote control. - #. Unlock the menu using the admin password, and enable Remote Control. - #. Press exit. - #. The robot can now be toggled between local and remote control in the upper right hand corner. - -.. image:: initial_setup_images/remote_control.png - :width: 600 - :alt: Screenshot showing remote control toggle. - -* **If using PolyScope 5.10 or greater:** - #. Go to the hamburger menu -> settings. - #. Go to Security -> Services. - #. Unlock the menu using the admin password. - #. Enable the Dashboard Server (Not applicable on PolyScope X versions), Primary Client Interface, Secondary Client Interface and Real-Time Data Exchange (RTDE) interfaces. - #. Lock the menu and press exit. - -* PolyScope 5 screen: - -.. image:: initial_setup_images/services_polyscope5.png - :width: 600 - :alt: Screenshot from PolyScope 5.xx services menu. - -* PolyScope X screen: - -.. image:: initial_setup_images/services_polyscopex.jpg - :width: 600 - :alt: Screenshot from PolyScope X screen. - -Remote PC Setup -~~~~~~~~~~~~~~~ -#. - On the remote PC, turn off all network devices except the "wired connection", e.g. turn off wifi. - -#. - Open Network Settings and create a new Wired connection with these settings. You may want to name this new connection ``UR`` or something similar: - -.. code-block:: - - IPv4 - Manual - Address: 192.168.1.101 - Netmask: 255.255.255.0 - Gateway: 192.168.1.1 - - -#. Verify the connection from the PC with e.g. ping. - -.. code-block:: - - ping 192.168.1.102 - -Prepare the robot ------------------ - -This section describes installation and launching of the URCap program from the pendant. It allows ROS to control the robot externally. Generally, you will launch the driver via ROS then start URCap from the pendant. - -For using the *ur_robot_driver* with a real robot you need to install the -**externalcontrol urcap**. The latest release can be downloaded from `its own repository `_. - -**Note**: For installing this URCap a minimal PolyScope version of 3.14.3 or 5.9.4 (in case of e-Series) is -necessary. - -For installing the necessary URCap and creating a program, please see the individual tutorials on -how to :ref:`setup a cb3 robot ` or how to -:ref:`setup an e-Series robot `. +Prepare robot and network connection +------------------------------------ -To setup the tool communication on an e-Series robot, please consider the :ref:`tool communication setup -guide `. +Before you can use the ``ur_robot_driver`` you need to prepare the robot and the network +connection as described in the :ref:`robot_setup` and :ref:`network_setup` section of the UR Client Library documentation. Prepare the ROS PC ------------------ diff --git a/ur_robot_driver/doc/installation/toc.rst b/ur_robot_driver/doc/installation/toc.rst index a99fa5332..6ebe477df 100644 --- a/ur_robot_driver/doc/installation/toc.rst +++ b/ur_robot_driver/doc/installation/toc.rst @@ -11,6 +11,3 @@ This chapter explains how to install the ``ur_robot_driver`` installation robot_setup - install_urcap_cb3 - install_urcap_e_series - ursim_docker diff --git a/ur_robot_driver/doc/installation/ursim_docker.rst b/ur_robot_driver/doc/installation/ursim_docker.rst deleted file mode 100644 index 855ff062b..000000000 --- a/ur_robot_driver/doc/installation/ursim_docker.rst +++ /dev/null @@ -1,99 +0,0 @@ -.. _ursim_docker: - -Setup URSim with Docker -======================= -URSim is the offline simulator by Universal Robots. Packed into a remote or virtual machine it acts almost -identically to a real robot connected over the network. While it is possible to get URSim running -locally on a Linux system or inside a VirtualBox virtual machine, we will focus on getting things -setup using Docker. Using Docker for your simulated robot allows you to very quickly spin up a robot -testing instance with very little computational overload. - -This guide will assume that you have Docker already installed and setup such that you can startup -Docker containers using your current user. - -Start a URSim docker container ------------------------------- - -To startup a simulated robot run the following command. This will start a Docker container named -``ursim`` and startup a simulated UR5e robot. It exposes ports 5900 and 6080 for the browser-based -polyscope access. Note that this will expose the simulated robot to your local area network if you -don't have any further level of security such as a firewall active. To prevent this, you can either -skip the port forwarding instructions (skip the two ``-p port:port`` statements) in which case -you'll have to use the container's IP address to access the polyscope gui rather than ``localhost`` or -you can restrict the port forwarding to a certain network interface (such as the looppack interface) -see Docker's upstream documentation on port exposure for further information. - -.. code-block:: bash - - docker run --rm -it -p 5900:5900 -p 6080:6080 --name ursim universalrobots/ursim_e-series - -External Control ----------------- - -To use the external control functionality, we will need the ``external_control`` URCap installed on -the robot and a program containing its *ExternalControl* program node. Both can be prepared on the -host machine either by creating an own Dockerfile containing those or by mounting two folders -containing installed URCaps and programs. See the Dockerfile's upstream `documentation `_. - -In this example, we will bind-mount a folder for the programs and URCaps. First, let's create a -local folder where we can store things inside: - -.. code-block:: bash - - mkdir -p ${HOME}/.ursim/programs - mkdir -p ${HOME}/.ursim/urcaps - -Then, we can "install" the URCap by placing its ``.jar`` file inside the urcaps folder - -.. code-block:: bash - - URCAP_VERSION=1.0.5 # latest version as if writing this - curl -L -o ${HOME}/.ursim/urcaps/externalcontrol-${URCAP_VERSION}.jar \ - https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap/releases/download/v${URCAP_VERSION}/externalcontrol-${URCAP_VERSION}.jar - -With this, start your URSim containers with the following command: - -.. code-block:: bash - - docker run --rm -it -p 5900:5900 -p 6080:6080 -v ${HOME}/.ursim/urcaps:/urcaps -v ${HOME}/.ursim/programs:/ursim/programs --name ursim universalrobots/ursim_e-series - -With this, you should be able to setup the ``external_control`` URCap and create a program as -described in :ref:`URCap setup guide `. - -Network setup -------------- - -As described above, you can always start the URSim container using the default network setup. As long -as you don't have any other docker containers running, it will most probably always get the same IP -address assigned every time. However, to make things a bit more explicit, we can setup our own -docker network where we can assign a static IP address to our URSim container. - -.. code-block:: bash - - docker network create --subnet=192.168.56.0/24 ursim_net - docker run --rm -it -p 5900:5900 -p 6080:6080 --net ursim_net --ip 192.168.56.101 universalrobots/ursim_e-series - -The above commands first create a network for docker and then create a container with the URSim -image attaching to this network. - -As we now have a fixed IP address we can also skip the port exposure as we know the robot's IP -address. The VNC web server will be available at ``_ - -Script startup --------------- - -All of the above is put together in a script in the ``ur_client_library`` package. - -.. code-block:: bash - - ros2 run ur_client_library start_ursim.sh - -This will start a URSim docker container running on ``192.168.56.101`` with the ``external_control`` -URCap preinstalled. Created programs and installation changes will be stored persistently inside -``${HOME}/.ursim/programs``. - -With this, you can run - -.. code-block:: bash - - ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 diff --git a/ur_robot_driver/doc/operation_modes.rst b/ur_robot_driver/doc/operation_modes.rst index b6cb06841..43af3ae14 100644 --- a/ur_robot_driver/doc/operation_modes.rst +++ b/ur_robot_driver/doc/operation_modes.rst @@ -17,8 +17,8 @@ E-series robots can operate in different command modes: It can be either in *loc The remote control mode is needed for many aspects of this driver such as - :ref:`headless_mode` -- :ref:`Sending script code to the robot` -- Many :ref:`dashboard` functionalities such as +- :ref:`Sending script code to the robot` +- Many :ref:`dashboard` functionalities such as - restarting the robot after protective / EM-Stop - powering on the robot and do brake release @@ -29,7 +29,7 @@ Driver's operation modes ------------------------ There are two fundamentally different control modes of the UR ROS driver to control a UR robot or the URSim robot simulator: -- *Teach Pendant mode* using the :ref:`External Control URCap` +- *Teach Pendant mode* using the :ref:`External Control URCap` - *Headless mode* that works without interacting with Teach pendant, when *remote control mode* has been selected on the teach pendant. .. _teach_pendant_mode: @@ -37,8 +37,8 @@ There are two fundamentally different control modes of the UR ROS driver to cont Teach Pendant Mode ^^^^^^^^^^^^^^^^^^^^^ -In Teach Pendant mode you will need the :ref:`External Control URCap` -installed on the robot. Please follow the installation guidelines for the :ref:`CB3` or :ref:`E-series`. Remember to set the correct IP address for the ROS driver host computer, and ensure the configured port number matches the ``script_sender_port`` defined in the ROS driver's launch arguments, default is 50002. +In Teach Pendant mode you will need the :ref:`External Control URCap` +installed on the robot. Remember to set the correct IP address for the ROS driver host computer, and ensure the configured port number matches the ``script_sender_port`` defined in the ROS driver's launch arguments, default is 50002. With that, create a program containing the *External Control* program node and press "play" on the teach pendant to start the program. Hereafter the URCap will request script code from the ROS driver and execute it, once the program enters that node. In addition, the ROS driver can return the control to the Teach pendent program. This gives the possibility to combine the teach pendant program and the use of the ROS driver. diff --git a/ur_robot_driver/doc/setup_tool_communication.rst b/ur_robot_driver/doc/setup_tool_communication.rst index 82ea00eec..24b4b9126 100644 --- a/ur_robot_driver/doc/setup_tool_communication.rst +++ b/ur_robot_driver/doc/setup_tool_communication.rst @@ -26,7 +26,7 @@ Robot setup ----------- For setting up the robot, please install the **rs485-1.0.urcap** found in the **resources** folder. -Installing a URCap is explained in the :ref:`setup guide ` for the **external-control** URCap. +Installing a URCap is explained in the :ref:`setup guide ` for the **external-control** URCap. After installing the URCap the robot will expose its tool communication device to the network. diff --git a/ur_robot_driver/doc/usage/script_code.rst b/ur_robot_driver/doc/usage/script_code.rst index 384e8dc4b..a6363a293 100644 --- a/ur_robot_driver/doc/usage/script_code.rst +++ b/ur_robot_driver/doc/usage/script_code.rst @@ -1,7 +1,7 @@ Sending URScript code to the robot ================================== -.. _script_command_interface: +.. _script_command_interface_ros2: Custom URScript commands ------------------------ diff --git a/ur_robot_driver/doc/usage/startup.rst b/ur_robot_driver/doc/usage/startup.rst index f6c2cfb8e..6103121d4 100644 --- a/ur_robot_driver/doc/usage/startup.rst +++ b/ur_robot_driver/doc/usage/startup.rst @@ -9,7 +9,7 @@ Prepare the robot If you want to use a real robot, or a URSim simulator, with this driver, you need to prepare it, first. Make sure that you complete all steps from the :ref:`setup instructions`, installed the External Control URCap and created a program as explained -:ref:`here`. +:ref:`here`. Launch files ------------ diff --git a/ur_robot_driver/doc/usage/toc.rst b/ur_robot_driver/doc/usage/toc.rst index a36193bd8..df378c8b6 100644 --- a/ur_robot_driver/doc/usage/toc.rst +++ b/ur_robot_driver/doc/usage/toc.rst @@ -87,8 +87,7 @@ In general, make sure you're starting up the robot as explained :ref:`here`, :ref:`e-Series robots`) +Make sure, the IP address setup is correct, as described in the :ref:`setup guide`. .. note:: @@ -111,7 +110,7 @@ On the e-Series the robot has to be in :ref:`remote control mode ` to accept certain calls on the dashboard server. See :ref:`Available dashboard commands ` for details. +On the e-Series the robot has to be in :ref:`remote control mode ` to accept certain calls on the dashboard server. See :ref:`Available dashboard commands ` for details. .. |play_button| image:: ../resources/play_button.svg :height: 20px