Skip to content

Commit 557645d

Browse files
committed
Add documentation for robot_state_helper
1 parent 01aa6e8 commit 557645d

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

ur_dashboard_msgs/action/SetMode.action

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# This action is for setting the robot into a desired mode (e.g. RUNNING) and safety mode into a
22
# non-critical state (e.g. NORMAL or REDUCED), for example after a safety incident happened.
33

4-
# goal
4+
# Target modes can be one of
5+
# - 3: ROBOT_MODE_POWER_OFF
6+
# - 5: ROBOT_MODE_IDLE
7+
# - 7: ROBOT_MODE_RUNNING
58
int8 target_robot_mode
69

710
# Stop program execution before restoring the target mode. Can be used together with 'play_program'.

ur_robot_driver/doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ ur_robot_driver
1717
setup_tool_communication
1818
hardware_interface_parameters
1919
dashboard_client
20+
robot_state_helper
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.. _robot_state_helper:
2+
3+
Robot state helper
4+
==================
5+
After switching on the robot, it has to be manually started, the brakes have to be released and a
6+
program has to be started in order to make the robot ready to use. This is usually done using the
7+
robot's teach pendant.
8+
9+
Whenever the robot encounters an error, manual intervention is required to resolve the issue. For
10+
example, if the robot goes into a protective stop, the error has to be acknowledged and the robot
11+
program has to be unpaused.
12+
13+
When the robot is in :ref:`remote_control_mode <operation_modes>`, most interaction with the robot can be done
14+
without using the teach pendant, many of that through the :ref:`dashboard client
15+
<dashboard_client_ros2>`.
16+
17+
The ROS driver provides a helper node that can be used to automate some of these tasks. The
18+
``robot_state_helper`` node can be used to start the robot, release the brakes, and (re-)start the
19+
program through an action call. It is started by default and provides a
20+
`dashboard_msgs/action/SetMode
21+
<https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_dashboard_msgs/action/SetMode.action>`_ action.
22+
23+
For example, to make the robot ready to be used by the ROS driver, call
24+
25+
.. code-block:: console
26+
27+
$ ros2 action send_goal /ur_robot_state_helper/set_mode ur_dashboard_msgs/action/SetMode "{ target_robot_mode: 7, stop_program: true, play_program: true}"
28+
29+
The ``target_robot_mode`` can be one of the following:
30+
31+
.. table:: target_robot_mode
32+
:widths: auto
33+
34+
===== =====
35+
index meaning
36+
===== =====
37+
3 POWER_OFF -- Robot is powered off
38+
5 IDLE -- Robot is powered on, but brakes are engaged
39+
7 RUNNING -- Robot is powered on, brakes are released, ready to run a program
40+
===== =====
41+
42+
.. note::
43+
44+
When the ROBOT_STATE is in ``RUNNING``, that is equivalent to the robot showing the green dot in
45+
the lower left corner of the teach pendant (On PolyScope 5). The program state is independent of
46+
that and shows with the text next to that button.
47+
48+
The ``stop_program`` flag is used to stop the currently running program before changing the robot
49+
state. In combination with the :ref:`controller_stopper`, this will deactivate any motion
50+
controller and therefore stop any ROS action being active on those controllers.
51+
52+
.. warning::
53+
A robot's protective stop or emergency stop is only pausing the running program. If the program
54+
is resumed after the P-Stop or EM-Stop is released, the robot will continue executing what it
55+
has been doing. Therefore, it is advised to stop and re-start the program when recovering from a
56+
fault.
57+
58+
The ``play_program`` flag is used to start the program after the robot state has been set. This has
59+
the same effects as explained in :ref:`continuation_after_interruptions`.

0 commit comments

Comments
 (0)