diff --git a/ur_robot_driver/doc/usage/simulation.rst b/ur_robot_driver/doc/usage/simulation.rst index ab46d0a1e..5cf69efdb 100644 --- a/ur_robot_driver/doc/usage/simulation.rst +++ b/ur_robot_driver/doc/usage/simulation.rst @@ -7,7 +7,7 @@ Apart from being used with a real robot, the ROS driver can be used with ros2_co Additionally, the robot can be simulated using `Gazebo Classic `_ or -`GZ Sim `_ but that's +:ref:`GZ Sim ` but that's outside of this driver's scope. .. _usage_with_official_ur_simulator: @@ -15,15 +15,57 @@ outside of this driver's scope. 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). +The easiest way to use URSim is the Docker +image provided by Universal Robots. There is an image for each software generation: -To start it, we've prepared a script: +- `PolyScope 5 `_ +- `PolyScope X `_ +- `CB3 `_ + +We have prepared a script to unify the startup of the simulator independent of the software +platform version: .. code-block:: bash - ros2 run ur_client_library start_ursim.sh -m + ros2 run ur_client_library start_ursim.sh -m -v + +If you skip the ``-v`` option, the script will use the latest version of the PolyScope 5 URSim +image. If you skip the ``-m`` option, the robot model will default to a UR5(e) robot. + +**Example:** + +.. code-block:: console + + $ ros2 run ur_client_library start_ursim.sh -v 10.8.0 -m ur20 + ROBOT_MODEL: ur20 + ROBOT_SERIES: polyscopex + URSIM_VERSION: 10.8.0 + 5b140a83f8600c7ada0b7d75bc7a5808667adbeec77387e8c73b093f10fd2379 + Starting URSim. Waiting for UrService to be up................................... + UrService is up + Installing URCapX /home/feex/.ursim/polyscopex/urcaps/external-control-0.1.0.urcapx + + + To access PolyScopeX, open the following URL in a web browser. + + + http://192.168.56.101 + + To exit, press CTRL+C + + +Accessing the URSim GUI is done using a web browser. The script will print the URL to access the +GUI. Depending on the PolyScope version, this is different. + +.. tabs:: + + .. group-tab:: PolyScope 5 / CB3 + + Open http://192.168.56.101:6080/vnc.html in a web browser. + + .. group-tab:: PolyScope X + + Open http://192.168.56.101 in a web browser. With this, we can spin up a driver using @@ -31,11 +73,9 @@ With this, we can spin up a driver using ros2 launch ur_robot_driver ur_control.launch.py ur_type:= robot_ip:=192.168.56.101 launch_rviz:=true -You can view the polyscope GUI by opening ``_. - When we now move the robot in Polyscope, the robot's RViz visualization should move accordingly. -For details on the Docker image, please see the more detailed guide :ref:`here `. +For details on the (PolyScopr 5 and CB3) Docker image, please see the more detailed guide :ref:`here `. Mock hardware -------------