Skip to content

Commit 7c54a6e

Browse files
urrskurfeex
andauthored
Improved controller usage documentation (#1754)
Improved controller usage documentation adding a dedicate page for * Position and Velocity related controllers * Force Torque related controllers * Utility controller page for all others controllers And * Add a Test verifying that all the controllers have been mentioned * Document tcp_pose_broadcaster in more detail --------- Co-authored-by: Felix Exner <feex@universal-robots.com>
1 parent 37887bb commit 7c54a6e

10 files changed

Lines changed: 696 additions & 102 deletions

File tree

.github/workflows/sphinx_build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install -r doc_requirements.txt
28+
- name: Verify controller documentation coverage
29+
run: python ur_robot_driver/test/test_controller_doc_coverage.py
2830
- name: Build documentation
2931
run: |
3032
sphinx-build -W -b html ur_calibration/doc _doc_build_calibration && \

ur_controllers/doc/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
:github_url: https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_controllers/doc/index.rst
22

3+
.. _ur_controllers:
4+
35
ur_controllers
46
==============
57

@@ -461,3 +463,29 @@ The controller provides one action for enabling tool contact. For the controller
461463
.. code-block::
462464
463465
ros2 action send_goal /tool_contact_controller/detect_tool_contact ur_msgs/action/ToolContact
466+
467+
.. _ur_configuration_controller:
468+
469+
ur_controllers/URConfigurationController
470+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
471+
472+
This controller provides access to UR-specific robot configuration data. Currently, it provides a
473+
service to query the robot's software version.
474+
475+
Parameters
476+
""""""""""
477+
478+
+-------------------------+--------+---------------+---------------------------------------------------------------------------------------+
479+
| Parameter name | Type | Default value | Description |
480+
| | | | |
481+
+-------------------------+--------+---------------+---------------------------------------------------------------------------------------+
482+
| ``tf_prefix`` | string | <empty> | Urdf prefix of the corresponding arm |
483+
+-------------------------+--------+---------------+---------------------------------------------------------------------------------------+
484+
485+
Service interface / usage
486+
"""""""""""""""""""""""""
487+
488+
* ``~/get_software_version [ur_msgs/srv/GetRobotSoftwareVersion]``: Get the robot's software
489+
version. The response contains the major, minor and patch version of the robot's software, as
490+
well as the build number if available. For example, for a robot running PolyScope 5.12.1 the
491+
response would be major version 5, minor version 12 and patch version 1.

ur_robot_driver/doc/features.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ Feature list and roadmap
99
:header-rows: 1
1010

1111
* - Feature
12-
- ROS2 Driver
12+
- ROS 2 Driver
1313
* - joint-position-based control
1414
- yes
1515
* - scaled joint-position-based control
1616
- yes (:ref:`scaled_jtc`)
1717
* - joint-velocity-based control
1818
- yes\ :raw-html-m2r:`<sup>1</sup>`
19+
* - joint-effort-based control (torque control)
20+
- yes (:ref:`force_torque_control`)
1921
* - Cartesian position-based control
2022
- no
2123
* - Cartesian twist-based control

ur_robot_driver/doc/hardware_interface.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ comfortably used through the ``ros2 control`` `command line tool
5050

5151
E.g. ``ros2 control list_hardware_components`` will list all hardware components, including the UR
5252
hardware interface with its interfaces as listed above.
53+
54+
When the launch files from this driver are used, a predefined set of controllers is already loaded.
55+
See :ref:`usage_controllers` for a description of the available controllers grouped by control mode.
56+
57+
Users can also load other controllers that use the interfaces provided by the hardware interface.
Lines changed: 17 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
:github_url: https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_robot_driver/doc/usage/controllers.rst
22

3-
.. _ur_controllers:
3+
.. _usage_controllers:
44

55
Controllers
66
===========
77

88
This help page describes the different controllers available for the ``ur_robot_driver``. This
99
should help users finding the right controller for their specific use case.
1010

11-
Where are controllers defined?
12-
------------------------------
11+
Available Controllers
12+
---------------------
13+
.. toctree::
14+
:maxdepth: 2
1315

14-
Controllers are defined in the ``config/ur_controllers.yaml`` file.
16+
position_velocity_control
17+
force_torque_control
18+
utility_controllers
1519

1620
How do controllers get loaded and started?
1721
------------------------------------------
1822

1923
As this driver uses `ros2_control <https://control.ros.org>`_ all controllers are managed by the
20-
controller_manager. During startup, a default set of running controllers is loaded and started,
21-
another set is loaded in stopped mode. Stopped controllers won't be usable right away, but they
22-
need to be started individually.
24+
controller_manager. During startup, a default set of running controllers is loaded and activated,
25+
another set is loaded in inactive mode. Inactive controllers won't be usable right away, but they
26+
need to be activated individually.
2327

2428
Controllers that are actually writing to some command interfaces (e.g. joint positions) will claim
2529
those interfaces. Only one controller claiming a certain interface can be active at one point.
2630

2731
Controllers can be switched either through the controller_manager's service calls, through the
28-
`rqt_controller_manager <https://control.ros.org/rolling/doc/ros2_control/controller_manager/doc/userdoc.html#rqt-controller-manager>`_ gui or through the ``ros2 control`` verb from the package ``ros-${ROS_DISTRO}-ros2controlcli`` package.
32+
`rqt_controller_manager
33+
<https://control.ros.org/rolling/doc/ros2_control/controller_manager/doc/userdoc.html#rqt-controller-manager>`_
34+
gui or through the ``ros2 control`` verb from the ``ros-${ROS_DISTRO}-ros2controlcli`` package.
2935

3036
For example, to switch from the default ``scaled_joint_trajectory_controller`` to the
3137
``forward_position_controller`` you can call
@@ -37,97 +43,7 @@ For example, to switch from the default ``scaled_joint_trajectory_controller`` t
3743
[INFO 2024-09-23 20:32:04.373] [_ros2cli_1207798]: waiting for service /controller_manager/switch_controller to become available...
3844
Successfully switched controllers
3945
40-
Read-only broadcasters
41-
----------------------
42-
43-
These broadcasters are read-only. They read states from the robot and publish them on a ROS topic.
44-
As they are read-only, they don't claim any resources and can be combined freely. By default, they
45-
are all started and running. Those controllers do not require the robot to have the
46-
external_control script running.
47-
48-
joint_state_broadcaster
49-
^^^^^^^^^^^^^^^^^^^^^^^
50-
51-
Type: `joint_state_broadcaster/JointStateBroadcaster <https://control.ros.org/rolling/doc/ros2_controllers/joint_state_broadcaster/doc/userdoc.html>`_
52-
53-
Publishes all joints' positions, velocities, and motor currents as ``sensor_msgs/JointState`` on the ``joint_states`` topic.
54-
55-
.. note::
56-
57-
The effort field contains the currents reported by the joints and not the actual efforts in a
58-
physical sense.
59-
60-
speed_scaling_state_broadcaster
61-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62-
63-
Type: :ref:`ur_controllers/SpeedScalingStateBroadcaster <speed_scaling_state_broadcaster>`
64-
65-
This broadcaster publishes the current actual execution speed as reported by the robot. Values are
66-
floating points between 0 and 1.
67-
68-
force_torque_sensor_broadcaster
69-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70-
71-
Type: `force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster <https://control.ros.org/rolling/doc/ros2_controllers/force_torque_sensor_broadcaster/doc/userdoc.html>`_
72-
73-
Publishes the robot's wrench as reported from the controller.
74-
75-
Commanding controllers
76-
----------------------
77-
78-
The commanding controllers control the robot's motions. Those controllers can't be combined
79-
arbitrarily, as they will claim hardware resources. Only one controller can claim one hardware
80-
resource at a time.
81-
82-
scaled_joint_trajectory_controller (Default motion controller)
83-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84-
85-
Type: :ref:`ur_controllers/ScaledJointTrajectoryController <scaled_jtc>`
86-
87-
Scaled version of the
88-
`joint_trajectory_controller
89-
<https://control.ros.org/master/doc/ros2_controllers/joint_trajectory_controller/doc/userdoc.html>`_.
90-
It uses the robot's speed scaling information and thereby the safety compliance features, like pause on safeguard stop. In addition, it also makes it possible to adjust execution speed using the speed slider on the teach pendant or set the program in pause and restart it again.
91-
See it's linked documentation for details.
92-
93-
io_and_status_controller
94-
^^^^^^^^^^^^^^^^^^^^^^^^
95-
96-
Type: :ref:`ur_controllers/GPIOController <io_and_status_controller>`
97-
98-
Allows setting I/O ports, controlling some UR-specific functionality and publishes status information about the robot.
99-
100-
forward_effort_controller
101-
^^^^^^^^^^^^^^^^^^^^^^^^^
102-
Type: `effort_controllers/JointGroupEffortController <https://control.ros.org/rolling/doc/ros2_controllers/effort_controllers/doc/userdoc.html#effort-controllers-jointgroupeffortcontroller>`_
103-
104-
Allows setting target joint efforts (torques) directly. The user is therefore responsible for sending commands that are achievable. This controller is useful when implementing compliance or force control strategies.
105-
106-
forward_velocity_controller
107-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
108-
109-
Type: `velocity_controllers/JointGroupVelocityController <https://control.ros.org/rolling/doc/ros2_controllers/velocity_controllers/doc/userdoc.html#velocity-controllers-jointgroupvelocitycontroller>`_
110-
111-
Allows setting target joint velocities directly. The user is therefore responsible for sending commands that are achievable. This controller is particularly useful when doing servoing such as ``moveit_servo``.
112-
113-
forward_position_controller
114-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
115-
116-
Type: `position_controllers/JointGroupPositionController <https://control.ros.org/rolling/doc/ros2_controllers/position_controllers/doc/userdoc.html#position-controllers-jointgrouppositioncontroller>`_
117-
118-
Allows setting target joint positions directly. The robot tries to reach the target position as fast as possible. The user is responsible for sending commands that are achievable. This controller is particularly useful when doing servoing such as ``moveit_servo``.
119-
120-
force_mode_controller
121-
^^^^^^^^^^^^^^^^^^^^^
122-
123-
Type: :ref:`ur_controllers/ForceModeController <force_mode_controller>`
124-
125-
Allows utilizing the robot's builtin *Force Mode*.
126-
127-
freedrive_mode_controller
128-
^^^^^^^^^^^^^^^^^^^^^^^^^
129-
130-
Type: :ref:`ur_controllers/FreedriveModeController <freedrive_mode_controller>`
46+
Where are controllers defined?
47+
------------------------------
13148

132-
Allows utilizing the robot's *Freedrive mode*, making it possible to manually move the robot's
133-
joints.
49+
Controllers are defined in the ``config/ur_controllers.yaml`` file.

0 commit comments

Comments
 (0)