From c3d5adc373d464cc1a999fb34063f6739538ef0e Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Tue, 19 Apr 2022 22:49:30 +0200 Subject: [PATCH] URSim-Docker section --- ur_bringup/CMakeLists.txt | 4 + ur_bringup/scripts/start_ursim.sh | 141 ++++++++++++ ur_robot_driver/doc/installation/toc.rst | 1 + .../doc/installation/ursim_docker.rst | 99 +++++++++ ur_robot_driver/doc/usage.md | 120 ----------- ur_robot_driver/doc/usage.rst | 200 ++++++++++++++++++ 6 files changed, 445 insertions(+), 120 deletions(-) create mode 100755 ur_bringup/scripts/start_ursim.sh create mode 100644 ur_robot_driver/doc/installation/ursim_docker.rst delete mode 100644 ur_robot_driver/doc/usage.md create mode 100644 ur_robot_driver/doc/usage.rst diff --git a/ur_bringup/CMakeLists.txt b/ur_bringup/CMakeLists.txt index b4eedf832..457158a5a 100644 --- a/ur_bringup/CMakeLists.txt +++ b/ur_bringup/CMakeLists.txt @@ -7,4 +7,8 @@ install(DIRECTORY config launch DESTINATION share/${PROJECT_NAME} ) +install(PROGRAMS scripts/start_ursim.sh + DESTINATION lib/${PROJECT_NAME} +) + ament_package() diff --git a/ur_bringup/scripts/start_ursim.sh b/ur_bringup/scripts/start_ursim.sh new file mode 100755 index 000000000..4f421e4a8 --- /dev/null +++ b/ur_bringup/scripts/start_ursim.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +# copyright 2022 Universal Robots A/S +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the {copyright_holder} nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +PERSISTENT_BASE="${HOME}/.ursim" +URCAP_VERSION="1.0.5" + +help() +{ + # Display Help + echo "Starts URSim inside a docker container" + echo + echo "Syntax: `basename "$0"` [-m|s|h]" + echo "options:" + echo " -m Robot model. One of [UR3, UR5, UR10, UR16]. Defaults to UR5." + echo " -s Robot series. One of [cb3, e-series]. Defaults to e-series." + echo " -h Print this Help." + echo +} + +ROBOT_MODEL=UR5 +ROBOT_SERIES=e-series + +validate_model() +{ + case $ROBOT_MODEL in + UR3|UR5|UR10|UR16) + ;; + *) + echo "Not a valid robot model: $ROBOT_MODEL" + exit + ;; + esac +} + +validate_series() +{ + case $ROBOT_SERIES in + e-series) + ;; + cb3) + if [[ "$ROBOT_MODEL" == "UR16" ]]; then + echo "No valid cb3 robot: UR16" + exit + fi + ;; + *) + echo "Not a valid robot series: $ROBOT_SERIES" + exit + ;; + esac + +} + +while getopts ":hm:s:" option; do + case $option in + h) # display Help + help + exit;; + m) # robot model + ROBOT_MODEL=${OPTARG} + validate_model + ;; + s) # robot series + ROBOT_SERIES=${OPTARG} + validate_series + ;; + \?) # invalid option + echo "Error: Invalid option" + help + exit;; + esac +done + + +URCAP_STORAGE="${PERSISTENT_BASE}/${ROBOT_SERIES}/urcaps" +PROGRAM_STORAGE="${PERSISTENT_BASE}/${ROBOT_SERIES}/programs" + +# Create local storage for programs and URCaps +mkdir -p "${URCAP_STORAGE}" +mkdir -p "${PROGRAM_STORAGE}" + +# Download external_control URCap +if [[ ! -f "${URCAP_STORAGE}/externalcontrol-${URCAP_VERSION}.jar" ]]; then + curl -L -o "${URCAP_STORAGE}/externalcontrol-${URCAP_VERSION}.jar" \ + "https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap/releases/download/v${URCAP_VERSION}/externalcontrol-${URCAP_VERSION}.jar" +fi + +# Check whether network already exists +docker network inspect ursim_net > /dev/null +if [ $? -eq 0 ]; then + echo "ursim_net already exists" +else + echo "Creating ursim_net" + docker network create --subnet=192.168.56.0/24 ursim_net +fi + +# run docker container +docker run --rm -d --net ursim_net --ip 192.168.56.101\ + -v "${URCAP_STORAGE}":/urcaps \ + -v "${PROGRAM_STORAGE}":/ursim/programs \ + -e ROBOT_MODEL="${ROBOT_MODEL}" \ + --name ursim \ + universalrobots/ursim_${ROBOT_SERIES} || exit + +trap "echo killing; docker container kill ursim; exit" SIGINT SIGTERM + +echo "Docker URSim is running" +printf "\nTo access Polyscope, open the following URL in a web browser.\n\thttp://192.168.56.101:6080/vnc.html\n\n" +echo "To exit, press CTRL+C" + +while : +do + sleep 1 +done diff --git a/ur_robot_driver/doc/installation/toc.rst b/ur_robot_driver/doc/installation/toc.rst index 7724979c4..926be1acd 100644 --- a/ur_robot_driver/doc/installation/toc.rst +++ b/ur_robot_driver/doc/installation/toc.rst @@ -13,3 +13,4 @@ This chapter explains how to install the ``ur_robot_driver`` 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 new file mode 100644 index 000000000..da7d66961 --- /dev/null +++ b/ur_robot_driver/doc/installation/ursim_docker.rst @@ -0,0 +1,99 @@ +.. _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_bringup`` package. + +.. code-block:: bash + + ros2 run ur_bringup 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_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 diff --git a/ur_robot_driver/doc/usage.md b/ur_robot_driver/doc/usage.md deleted file mode 100644 index 426c1d45c..000000000 --- a/ur_robot_driver/doc/usage.md +++ /dev/null @@ -1,120 +0,0 @@ -# Usage - -## Launch files - -For starting the driver there are two main launch files in the `ur_bringup` package. - - - `ur_control.launch.py` - starts ros2_control node including hardware interface, joint state broadcaster and a controller. This launch file also starts `dashboard_client` if real robot is used. - - `ur_dashboard_client.launch.py` - start the dashboard client for UR robots. - -Also, there are predefined launch files for all supported types of UR robots. - -The arguments for launch files can be listed using `ros2 launch ur_bringup .launch.py --show-args`. -The most relevant arguments are the following: - - - `ur_type` (*mandatory* ) - a type of used UR robot (*ur3*, *ur3e*, *ur5*, *ur5e*, *ur10*, *ur10e*, or *ur16e*). - - `robot_ip` (*mandatory* ) - IP address by which the root can be reached. - - `use_fake_hardware` (default: *false* ) - use simple hardware emulator from ros2_control. - Useful for testing launch files, descriptions, etc. See explanation below. - - `initial_positions` (default: dictionary with all joint values set to 0) - Allows passing a dictionary to set the initial joint values for the fake hardware from [ros2_control](http://control.ros.org/). It can also be set from a yaml file with the `load_yaml` commands as follows: - ``` - - ``` - In this example, the **initial_positions_file** is a xacro argument that contains the absolute path to a yaml file. An example of the initial positions yaml file is as follows: - ``` - elbow_joint: 1.158 - shoulder_lift_joint: -0.953 - shoulder_pan_joint: 1.906 - wrist_1_joint: -1.912 - wrist_2_joint: -1.765 - wrist_3_joint: 0.0 - ``` - - - `fake_sensor_commands` (default: *false* ) - enables setting sensor values for the hardware emulators. - Useful for offline testing of controllers. - - `robot_controller` (default: *joint_trajectory_controller* ) - controller for robot joints to be started. - Available controllers: - * joint_trajectory_controller - * scaled_joint_trajectory_controller - - Note: *joint_state_broadcaster*, *speed_scaling_state_broadcaster*, *force_torque_sensor_broadcaster*, and *io_and_status_controller* will always start. - - *HINT* : list all loaded controllers using `ros2 control list_controllers` command. - -**NOTE**: The package can simulate hardware with the ros2_control `FakeSystem`. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see [ros2_control documentation](https://ros-controls.github.io/control.ros.org/) for more details. - -## Modes of operation -As mentioned in the last section the driver has two basic modes of operation: Using fake hardware or -using real hardware(Or the URSim simulator, which is equivalent from the driver's perspective). -Additionally, the robot can be simulated using -[Gazebo](https://github.com/UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation) or -[ignition](https://github.com/UniversalRobots/Universal_Robots_ROS2_Ignition_Simulation) but that's -outside of this driver's scope. - -| mode | available controllers | -| ------- | ---- | -| fake_hardware |
  • joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
| -| real hardware / URSim |
  • joint_trajectory_controller
  • scaled_joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
| - -## Example Commands for Testing the Driver - -Allowed UR - Type strings: `ur3`, `ur3e`, `ur5`, `ur5e`, `ur10`, `ur10e`, `ur16e`. - -### 1. Start hardware, simulator or mockup - -- To do test with hardware, use: - ``` - ros2 launch ur_bringup ur_control.launch.py ur_type:= robot_ip:= launch_rviz:=true - ``` - For more details check the argument documentation with `ros2 launch ur_bringup ur_control.launch.py --show-arguments` - - After starting the launch file start the external_control URCap program from the pendant, as described above. - -- To do an offline test with URSim check details about it in [this section](#usage-with-official-ur-simulator) - -- To use mocked hardware(capability of ros2_control), use `use_fake_hardware` argument, like: - ``` - ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=true - ``` - - **NOTE**: Instead of using the global launch file for control stack, there are also prepeared launch files for each type of UR robots named. They accept the same arguments are the global one and are used by: - ``` - ros2 launch ur_bringup .launch.py - ``` - -### 2. Sending commands to controllers - -Before running any commands, first check the controllers' state using `ros2 control list_controllers`. - -- Send some goal to the Joint Trajectory Controller by using a demo node from [ros2_control_demos](https://github.com/ros-controls/ros2_control_demos) package by starting the following command in another terminal: - ``` - ros2 launch ur_bringup test_scaled_joint_trajectory_controller.launch.py - ``` - After a few seconds the robot should move. - -- To test another controller, simply define it using `initial_joint_controller` argument, for example when using fake hardware: - ``` - ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy initial_joint_controller:=joint_trajectory_controller use_fake_hardware:=true launch_rviz:=true - ``` - And send the command using demo node: - ``` - ros2 launch ur_bringup test_joint_trajectory_controller.launch.py - ``` - After a few seconds the robot should move(or jump when using emulation). - -- To test the driver with the example MoveIt-setup, first start the controllers then start MoveIt. (This requires a `vcs import` of MoveIt packages): - ``` - ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=false - - (then start the external_control URCap program from the pendant, as described above) - - ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e use_fake_hardware:=true launch_rviz:=true - ``` - Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the robot. - -### 3. Using only robot description - -If you just want to test description of the UR robots, e.g., after changes you can use the following command: -``` -ros2 launch ur_description view_ur.launch.py ur_type:=ur5e -``` diff --git a/ur_robot_driver/doc/usage.rst b/ur_robot_driver/doc/usage.rst new file mode 100644 index 000000000..347daf022 --- /dev/null +++ b/ur_robot_driver/doc/usage.rst @@ -0,0 +1,200 @@ +.. role:: raw-html-m2r(raw) + :format: html + + +Usage +===== + +Launch files +------------ + +For starting the driver there are two main launch files in the ``ur_bringup`` package. + + +* ``ur_control.launch.py`` - starts ros2_control node including hardware interface, joint state broadcaster and a controller. This launch file also starts ``dashboard_client`` if real robot is used. +* ``ur_dashboard_client.launch.py`` - start the dashboard client for UR robots. + +Also, there are predefined launch files for all supported types of UR robots. + +The arguments for launch files can be listed using ``ros2 launch ur_bringup .launch.py --show-args``. +The most relevant arguments are the following: + + +* ``ur_type`` (\ *mandatory* ) - a type of used UR robot (\ *ur3*\ , *ur3e*\ , *ur5*\ , *ur5e*\ , *ur10*\ , *ur10e*\ , or *ur16e*\ ). +* ``robot_ip`` (\ *mandatory* ) - IP address by which the root can be reached. +* ``use_fake_hardware`` (default: *false* ) - use simple hardware emulator from ros2_control. + Useful for testing launch files, descriptions, etc. See explanation below. +* ``initial_positions`` (default: dictionary with all joint values set to 0) - Allows passing a dictionary to set the initial joint values for the fake hardware from `ros2_control `_. It can also be set from a yaml file with the ``load_yaml`` commands as follows: + + .. code-block:: + + + + In this example, the **initial_positions_file** is a xacro argument that contains the absolute path to a yaml file. An example of the initial positions yaml file is as follows: + + .. code-block:: + + elbow_joint: 1.158 + shoulder_lift_joint: -0.953 + shoulder_pan_joint: 1.906 + wrist_1_joint: -1.912 + wrist_2_joint: -1.765 + wrist_3_joint: 0.0 + +* ``fake_sensor_commands`` (default: *false* ) - enables setting sensor values for the hardware emulators. + Useful for offline testing of controllers. + +* ``robot_controller`` (default: *joint_trajectory_controller* ) - controller for robot joints to be started. + Available controllers: + + + * joint_trajectory_controller + * scaled_joint_trajectory_controller + + Note: *joint_state_broadcaster*\ , *speed_scaling_state_broadcaster*\ , *force_torque_sensor_broadcaster*\ , and *io_and_status_controller* will always start. + + *HINT* : list all loaded controllers using ``ros2 control list_controllers`` command. + +**NOTE**\ : The package can simulate hardware with the ros2_control ``FakeSystem``. This emulator enables an environment for testing of "piping" of hardware and controllers, as well as testing robot's descriptions. For more details see `ros2_control documentation `_ for more details. + +Modes of operation +------------------ + +As mentioned in the last section the driver has two basic modes of operation: Using fake hardware or +using real hardware(Or the URSim simulator, which is equivalent from the driver's perspective). +Additionally, the robot can be simulated using +`Gazebo `_ or +`ignition `_ but that's +outside of this driver's scope. + +.. list-table:: + :header-rows: 1 + + * - mode + - available controllers + * - fake_hardware + - :raw-html-m2r:`
  • joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
` + * - real hardware / URSim + - :raw-html-m2r:`
  • joint_trajectory_controller
  • scaled_joint_trajectory_controller
  • forward_velocity_controller
  • forward_position_controller
` + + +Usage with official UR simulator +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The easiest way to use URSim is the `Docker +image `_ provided by Universal Robots (See +`this link `_ for a CB3-series image). + +For a quick test, you can run + +.. code-block:: + + docker run --rm -it -p 5900:5900 -p 6080:6080 --name ursim universalrobots/ursim_e-series + +This will (given a correctly setup Docker environment) spawn a URSim docker container. It will print +instructions to the shell it has been started in showing how to connect to Polyscope using your web +browser. To start the driver with this container, we first need to query it's IP address: + +.. code-block:: + + $ docker container inspect ursim | grep IPAddress + "SecondaryIPAddresses": null, + "IPAddress": "172.17.0.2", + "IPAddress": "172.17.0.2", + +In this example, the URSim instance is reachable with the IP address ``172.17.0.2`` + +Therefore, we can spin up a driver using + +.. code-block:: bash + + # The default robot is a ur5e + ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=172.17.0.2 launch_rviz:=true + +When we now move the robot in Polyscope, the robot's RViz visualization should move accordingly. + +To control the robot we will (as with the real robot) need the ``external_control`` URCap installed on +the robot and a program running its control node. For this, please see the more detailed guide +:ref:`here `. + +Example Commands for Testing the Driver +--------------------------------------- + +Allowed UR - Type strings: ``ur3``\ , ``ur3e``\ , ``ur5``\ , ``ur5e``\ , ``ur10``\ , ``ur10e``\ , ``ur16e``. + +1. Start hardware, simulator or mockup +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +* To do test with hardware, use: + + .. code-block:: + + ros2 launch ur_bringup ur_control.launch.py ur_type:= robot_ip:= launch_rviz:=true + + For more details check the argument documentation with ``ros2 launch ur_bringup ur_control.launch.py --show-arguments`` + + After starting the launch file start the external_control URCap program from the pendant, as described above. + +* To do an offline test with URSim check details about it in `this section <#usage-with-official-ur-simulator>`_ + +* To use mocked hardware(capability of ros2_control), use ``use_fake_hardware`` argument, like: + + .. code-block:: + + ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=true + + **NOTE**\ : Instead of using the global launch file for control stack, there are also prepeared launch files for each type of UR robots named. They accept the same arguments are the global one and are used by: + + .. code-block:: + + ros2 launch ur_bringup .launch.py + +2. Sending commands to controllers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Before running any commands, first check the controllers' state using ``ros2 control list_controllers``. + + +* Send some goal to the Joint Trajectory Controller by using a demo node from `ros2_control_demos `_ package by starting the following command in another terminal: + + .. code-block:: + + ros2 launch ur_bringup test_scaled_joint_trajectory_controller.launch.py + + After a few seconds the robot should move. + +* To test another controller, simply define it using ``initial_joint_controller`` argument, for example when using fake hardware: + + .. code-block:: + + ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy initial_joint_controller:=joint_trajectory_controller use_fake_hardware:=true launch_rviz:=true + + And send the command using demo node: + + .. code-block:: + + ros2 launch ur_bringup test_joint_trajectory_controller.launch.py + + After a few seconds the robot should move(or jump when using emulation). + +* To test the driver with the example MoveIt-setup, first start the controllers then start MoveIt. (This requires a ``vcs import`` of MoveIt packages): + + .. code-block:: + + ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=false + + (then start the external_control URCap program from the pendant, as described above) + + ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e use_fake_hardware:=true launch_rviz:=true + + Now you should be able to use the MoveIt Plugin in rviz2 to plan and execute trajectories with the robot. + +3. Using only robot description +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you just want to test description of the UR robots, e.g., after changes you can use the following command: + +.. code-block:: + + ros2 launch ur_description view_ur.launch.py ur_type:=ur5e