Skip to content

Commit 462f383

Browse files
Felix Exner (fexner)VinDp
andauthored
Sphinx doc (#161)
* Move most documentation to doc/index.rst This will make it re-usable by an external sphinx documentation. * Updated structure graph We've changed the way things are handled a bit, which was not reflected in the structure graph. Co-authored-by: Vincenzo Di Pentima <[email protected]>
1 parent cc4e3ba commit 462f383

File tree

4 files changed

+182
-58
lines changed

4 files changed

+182
-58
lines changed

README.md

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -24,67 +24,16 @@ If you have any questions regarding this license or if this license doesn't fit
2424

2525
All other content is licensed under the BSD-3-Clause license
2626

27-
## Structure of the repository
28-
29-
The most relevant files are:
30-
- `urdf/ur_macro.xacro` - macro file with UR-manipulator description. This file is usually included into external projects to visualize and configure UR manipulators properly. An example how to use this macro is in `urdf/ur.urdf.xacro` file.
31-
- `urdf/ur.ros2_control.xacro` - definition of manipulator's joints and interfaces for `ros2_control` framework.
32-
3327
## Testing description of a manipulator
3428

3529
To visualize the robot install this repository to you workspace and execute the following:
36-
```
30+
31+
``` bash
3732
ros2 launch ur_description view_ur.launch.py ur_type:=ur5e
3833
```
3934

4035
To test other descriptions change the `ur_type` argument.
4136

42-
## Package / Description structure
43-
This package uses one description for all robots. The different robot variants are configured using
44-
four configuration files. These files can also be changed for further customizing a description.
45-
46-
![urdf structure](doc/structure.svg)
47-
48-
Basically, the description can be modified using configuration values stored in four files:
49-
- `config/urXX/default_kinematics.yaml` - This contains the calibration values as they can be
50-
extracted from the robot. Changing these values with the one extracted from a real robot will
51-
result in a description matching the real robot exactly (w.r.t the `tool0` frame). It is highly
52-
recommended to use matching kinematic values in real-world applications.
53-
- `config/urXX/joint_limits.yaml` - If you'd like to further restrict the robot's joint limits,
54-
these limits can be modified there.
55-
- `config/urXX/physical_parameters.yaml` - Everything regarding physics simulation parameters
56-
(e.g. inertia poses and values) can be tuned here
57-
- `config/urXX/visual_parameters.yaml` - Some users change certain visual aspects, e.g. replacing
58-
the cap on the wrist_3_link. This config file specifies which meshes (both, visual and collision)
59-
should be used.
60-
61-
The four configuration files have to be passed to `ur_macro.urdf` (more specific to the macro
62-
defined in that file) which is done inside the `ur.urdf.macro`. Contents of the files are parsed
63-
inside `ur_common.xacro`.
64-
65-
Arguments that have to be passed to the main `ur.urdf.xacro` file are:
66-
- kinematics_params - Filename to the `default_kinematics.yaml` (or equivalent specific kinematics) file
67-
- joint_limit_params - Filename to the `joint_limits.yaml` file
68-
- physical_params - Filename to the `physical_parameters.yaml` file
69-
- visual_params - Filename to the `visual_params.yaml` file
70-
71-
The launchfile `launch/view_ur.launch.py` abstracts these four parameters to one `ur_type` argument
72-
which will basically replace the `urXX` part of the paths as shown in the picture above.
73-
74-
## Creating your own description including this description
75-
In real-world applications you will most probably have a more complex description consisting of more
76-
objects than just the robot. It is recommended to create a separate ROS package containing this
77-
particular description. Inside this description you could also store your robot-specific kinematics
78-
parameters file.
79-
80-
As mentioned above, see the `urdf/ur.urdf.xacro` file as an example to integrate a UR robot into
81-
your scene description. Basically, you could create a copy of that file and extend it with the
82-
modifications from your specific scene.
37+
## Further documentation
8338

84-
### Using description with ros2_control
85-
The description itself does not contain a `ros2_control` tag. However, the package provides a couple
86-
of helper files to create your own `ros2_control` tag describing the robot's joint control
87-
mechanisms. See the [`urdf/ur_mocked.urdf.xacro`](urdf/ur_mocked.urdf.xacro)
88-
file as an example using [mock
89-
hardware](https://control.ros.org/master/doc/ros2_control/hardware_interface/doc/mock_components_userdoc.html)
90-
to control the robot.
39+
For further documentation about this description, please see [doc/index.rst](doc/index.rst).

doc/index.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
ur_description
2+
==============
3+
4+
This package contains the kinematic and visual description of Universal Robots manipulators for ROS
5+
2.
6+
7+
Structure of the repository
8+
---------------------------
9+
10+
As the kinematics of all models is roughly the same and varies only in the meshes, the DH
11+
parameters and the physical parameters, the description uses xacro macros in order to make it reuse
12+
as much as possible. This way it is less likely that errors are introduced in one of the models.
13+
14+
Therefore, the description is split up into multiple URDF/XACRO files:
15+
16+
- ``urdf/ur_macro.xacro`` - macro file with UR-manipulator description. This file is usually included into external projects to visualize and configure UR manipulators properly. An example how to use this macro is in ``urdf/ur.urdf.xacro`` file.
17+
- ``urdf/ur.urdf.xacro`` - an example scene where the robot is standing alone without any
18+
environment. This is obviously not a real-life example, as the robot has to be mounted somewhere.
19+
20+
The kinematic description itself uses config files to get parametrized to the correct robot model.
21+
22+
.. image:: structure.svg
23+
:alt: Structure of the description's parametrization
24+
25+
Basically, the description can be modified using configuration values stored in four files:
26+
- ``config/urXX/default_kinematics.yaml`` - This contains the calibration values as they can be
27+
extracted from the robot. Changing these values with the one extracted from a real robot will
28+
result in a description matching the real robot exactly (w.r.t the ``tool0`` frame). It is highly
29+
recommended to use matching kinematic values in real-world applications.
30+
- ``config/urXX/joint_limits.yaml`` - If you'd like to further restrict the robot's joint limits,
31+
these limits can be modified there.
32+
- ``config/urXX/physical_parameters.yaml`` - Everything regarding physics simulation parameters
33+
(e.g. inertia poses and values) can be tuned here.
34+
- ``config/urXX/visual_parameters.yaml`` - Some users change certain visual aspects, e.g. replacing
35+
the cap on the wrist_3_link. This config file specifies which meshes (both, visual and collision)
36+
should be used.
37+
38+
The four configuration files have to be passed to ``ur_macro.xacro`` (more specific to the macro
39+
defined in that file) which is done inside the ``ur.urdf.xacro``. Contents of the files are parsed
40+
inside ``inc/ur_common.xacro``.
41+
42+
Arguments that have to be passed to the main ``ur.urdf.xacro`` file are:
43+
- kinematics_params - Filename to the ``default_kinematics.yaml`` (or equivalent specific kinematics) file
44+
- joint_limit_params - Filename to the ``joint_limits.yaml`` file
45+
- physical_params - Filename to the ``physical_parameters.yaml`` file
46+
- visual_params - Filename to the ``visual_params.yaml`` file
47+
48+
The launchfile ``launch/view_ur.launch.py`` abstracts these four parameters to one ``ur_type`` argument
49+
which will basically replace the ``urXX`` part of the paths as shown in the picture above.
50+
51+
ros2_control integration
52+
^^^^^^^^^^^^^^^^^^^^^^^^
53+
54+
`ros2_control <https://control.ros.org>`_ uses the robot_description in order to describe the
55+
robot's control structure. Since this will vary for the respective control method (Driver for real
56+
robot, Gazebo simulation, mock_hardware simulation, etc.) this is kept inside the respective control repository. This
57+
repository provides macros for including the common control description (Joints with their
58+
interfaces) as well as an example using mock hardware.
59+
60+
- ``urdf/ros2_control_mock_hardware.xacro`` - xacro providing the control description for
61+
mock_hardware.
62+
- ``urdf/ur_mocked.urdf.xacro`` - an example for a controlled robot consisting of the kinematic
63+
description and the control description.
64+
- ``urdf/inc/ur_joint_control.xacro`` - macro for describing the joints' control structure.
65+
- ``urdf/inc/ur_sensors.xacro`` - macro for describing the robot's sensors for ros2_control
66+
67+
Creating your own description including this description
68+
--------------------------------------------------------
69+
70+
In real-world applications you will most probably have a more complex description consisting of more objects than just the robot. It is recommended to create a separate ROS package containing this particular description. Inside this description you could also store your robot-specific kinematics parameters file.
71+
72+
See the `custom workcell example <https://github.com/UniversalRobots/Universal_Robots_ROS2_Tutorials/tree/main/my_robot_cell/my_robot_cell_description>`_ as an example for integrating this description in your own scene description.

0 commit comments

Comments
 (0)