Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Example 7] Fix links in userdoc.rst (backport #337) #338

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading