|
| 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. |
0 commit comments