Skip to content

Commit

Permalink
Fix 6dof robot links (#337) (#338)
Browse files Browse the repository at this point in the history
(cherry picked from commit 57a561e)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
  • Loading branch information
mergify[bot] and christophfroehlich authored Aug 13, 2023
1 parent 7b62ee3 commit 6890818
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example_7/doc/userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ The URDF file is generally formatted according to the following template.
* The ``hardware`` and ``plugin`` tags instruct the ros2_control framework to dynamically load a hardware driver conforming to ``HardwareInterface`` as a plugin. The plugin is specified as ``<{Name_Space}/{Class_Name}``.
* Finally, the ``joint`` tag specifies the state and command interfaces that the loaded plugins will offer. The joint is specified with the name attribute. The ``command_interface`` and ``state_interface`` tags specify the interface type, usually position, velocity, acceleration, or effort.

To simplify the URDF file, ``xacro`` is used to define macros, see `this tutorial <https://docs.ros.org/en/{DISTRO}/Tutorials/Intermediate/URDF/Using-Xacro-to-Clean-Up-a-URDF-File.html>`__. The complete xacro file for the robot in this tutorial is available `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/r6bot_description/urdf/r6bot.urdf.xacro>`__. To verify the kinematic chain, the tool ``urdf_to_graphviz`` can be used after the URDF is generated by ``xacro``. Running
To simplify the URDF file, ``xacro`` is used to define macros, see `this tutorial <https://docs.ros.org/en/{DISTRO}/Tutorials/Intermediate/URDF/Using-Xacro-to-Clean-Up-a-URDF-File.html>`__. The complete xacro file for the robot in this tutorial is available `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/description/urdf/r6bot.urdf.xacro>`__. To verify the kinematic chain, the tool ``urdf_to_graphviz`` can be used after the URDF is generated by ``xacro``. Running

.. code-block:: bash
Expand Down Expand Up @@ -304,12 +304,12 @@ The plugin description file is a required XML file that describes a plugin's lib
</library>
The ``path`` attribute of the ``library`` tags refers to the cmake library name of the user defined hardware plugin. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/hardware_driver/robot_6_dof_hardware_plugin_description.xml>`__ for the complete XML file.
The ``path`` attribute of the ``library`` tags refers to the cmake library name of the user defined hardware plugin. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/ros2_control_demo_example_7.xml>`__ for the complete XML file.

CMake library
*************

The general CMake template to make a hardware plugin available in ros2_control is shown below. Notice that a library is created using the plugin source code just like any other cmake library. In addition, an extra compile definition and cmake export macro (``pluginlib_export_plugin_description_file``) need to be added. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/hardware_driver/CMakeLists.txt>`__ for the complete ``CMakeLists.txt`` file.
The general CMake template to make a hardware plugin available in ros2_control is shown below. Notice that a library is created using the plugin source code just like any other cmake library. In addition, an extra compile definition and cmake export macro (``pluginlib_export_plugin_description_file``) need to be added. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/CMakeLists.txt>`__ for the complete ``CMakeLists.txt`` file.

.. code-block:: cmake
Expand Down Expand Up @@ -487,7 +487,7 @@ The ``on_error`` method is called if the managed node fails a state transition.
Plugin description file
**************************

The plugin description file is again required for the controller, since it is exported as a library. The controller plugin description file is formatted as follows. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/r6bot_controller/robot_6_dof_controller_plugin_description.xml>`__ for the complete XML file.
The plugin description file is again required for the controller, since it is exported as a library. The controller plugin description file is formatted as follows. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/ros2_control_demo_example_7.xml>`__ for the complete XML file.


.. code-block:: xml
Expand All @@ -507,7 +507,7 @@ The plugin description file is again required for the controller, since it is ex
CMake library
*************

The plugin must be specified in the CMake file that builds the controller plugin. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/r6bot_controller/CMakeLists.txt>`__ for the complete ``CMakeLists.txt`` file.
The plugin must be specified in the CMake file that builds the controller plugin. See `here <https://github.com/ros-controls/ros2_control_demos/tree/{REPOS_FILE_BRANCH}/example_7/CMakeLists.txt>`__ for the complete ``CMakeLists.txt`` file.


.. code-block:: cmake
Expand Down

0 comments on commit 6890818

Please sign in to comment.