Skip to content

Commit e481eff

Browse files
urfeexgavanderhoornurmahp
authored
Add documentation about the different base and base_link frames (#286)
There are three different frames in the robot's base. They all represent different aspects and have their respective right to be there, but that lead to a lot of confusion on the users' side. This documentation should hopefully help reducing that confusion. --------- Co-authored-by: G.A. vd. Hoorn <[email protected]> Co-authored-by: Mads Holm Peters <[email protected]>
1 parent 5ff30bb commit e481eff

File tree

5 files changed

+82
-0
lines changed

5 files changed

+82
-0
lines changed

doc/frames/base.png

82.5 KB
Loading

doc/frames/base_link.png

84.9 KB
Loading

doc/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ ur_description
88
This package contains the kinematic and visual description of Universal Robots manipulators for ROS
99
2.
1010

11+
.. toctree::
12+
:maxdepth: 4
13+
:caption: Contents:
14+
15+
robot_frames
16+
17+
.. contents::
18+
:depth: 2
19+
:local:
20+
1121
Structure of the repository
1222
---------------------------
1323

doc/robot_frames.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Robot Frames
2+
============
3+
4+
The URDF model uses multiple frames in the robot's base. This page describes why that is and what
5+
the purpose of each of those frames is. In particular, there are three frames in the robot's base:
6+
7+
- ``base_link`` - This serves as the root link of the kinematic chain. It follows `REP-103
8+
<https://ros.org/reps/rep-0103.html>`_ , where *forward* for the ``base_link`` is defined as the
9+
direction where the arm is pointing to for an all-zero joint configuration.
10+
11+
.. figure:: frames/base_link.png
12+
:alt: The robot with an all-zeros joint configuration showing its base_link frame
13+
14+
The robot with an all-zeros joint configuration showing its ``base_link`` frame
15+
16+
- ``base`` - This is the frame that is used by the robot controller to represent the robot's *Base*
17+
feature (Polyscope 5) / *base* frame (PolyScope X).
18+
It has the same position as ``base_link`` but is rotated by 180 degrees around the Z-axis.
19+
This follows the `REP proposal 199 <https://gavanderhoorn.github.io/rep/rep-0199.html>`_ with
20+
respect to the frame ``base`` and ``tool0``.
21+
22+
Any lookup of ``tool0`` w.r.t. ``base`` will yield the same result as the pose shown on the teach
23+
pendant when ``base`` is selected as a reference there and the tool is set to "all-zero" being in
24+
the center of the flange.
25+
26+
.. figure:: frames/base.png
27+
:alt: The robot with an all-zeros joint configuration showing its base frame
28+
29+
The robot with an all-zeros joint configuration showing its ``base`` frame
30+
31+
- ``base_link_inertia`` - Since some libraries such as KDL don't support inertia for the root link
32+
of a kinematic chain (see `ros/kdl_parser#27 <https://github.com/ros/kdl_parser/issues/27>`_),
33+
the ``base_link`` doesn't contain any meshes or inertia attached to it. Instead, those are
34+
attached to the ``base_link_inertia`` frame. This frame is rotated in the same way as ``base``.
35+
36+
37+
This leads to the following kinematic chain:
38+
39+
.. code:: text
40+
41+
base_link
42+
├ base
43+
└ base_link_inertia
44+
└ shoulder_link
45+
└ upper_arm_link
46+
└ forearm_link
47+
└ wrist_1_link
48+
└ wrist_2_link
49+
└ wrist_3_link
50+
└ flange
51+
└ tool0
52+
53+
The frame ``tool0`` is the tool frame as calculated using forward kinematics. If the robot has an
54+
all-zero tool configured, this should be equivalent to the tool frame on the control box / teach pendant.
55+
56+
The frame ``flange`` is supposed to be used to attach custom tool frame or end-effectors to the
57+
robot. For instance, with a gripper's ``xacro:macro`` available, it is often possible to specify a
58+
parent frame, for which ``flange`` should be used.
59+
60+
.. note::
61+
62+
When making TF lookups in the ROS system and comparing that to what the teach pendant shows,
63+
please consider that the robot uses the ``base`` frame as reference, not ``base_link``. Also,
64+
make sure that the teach pendant's view is set to "Base" and that any configured tool will have
65+
an effect on the values.

urdf/ur_macro.xacro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@
7676
force_abs_paths="${force_abs_paths}"/>
7777

7878
<!-- links - main serial chain -->
79+
80+
<!-- base_link serves as the root of the robot's kinematic tree. It follows REP-103
81+
conventions (i.e., X+ forward, Y+ left, Z+ up).
82+
Since some kinematic solvers forbid having inertia values attached to a root link, we've
83+
added the base_link_inertia link that carries the visual, collision and inertia
84+
information.
85+
-->
7986
<link name="${tf_prefix}base_link"/>
8087
<link name="${tf_prefix}base_link_inertia">
8188
<xacro:get_visual_params name="base" type="mesh_offset"/>

0 commit comments

Comments
 (0)