From cd4ab398e929a9f727370672b8b0a4b0bed9b1f8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 20:09:08 +0200 Subject: [PATCH] Substitution of branch names (#98) (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "Add global_substitutions to fix github links (#85)" This reverts commit fed3b2a56dd49c6c3da548fe34c40a6c677e29cc. * Use branch name substitution for all links (cherry picked from commit 45005b57e64f70bc3ee5fcb055b67d5936ea50c4) Co-authored-by: Christoph Fröhlich --- conf.py | 10 ---------- doc/getting_started/getting_started.rst | 22 ++++++---------------- index.rst | 15 +++++++-------- requirements.txt | 1 - 4 files changed, 13 insertions(+), 35 deletions(-) diff --git a/conf.py b/conf.py index b6bbfe40471..8fb2f2514d2 100644 --- a/conf.py +++ b/conf.py @@ -83,7 +83,6 @@ "sphinx_rtd_theme", "sphinx_multiversion", "sphinx_copybutton", - "sphinxcontrib.globalsubs", "generate_parameter_library" ] @@ -312,18 +311,9 @@ def smv_rewrite_configs(app, config): app.config.html_baseurl = app.config.html_baseurl + "/" + distro + "/" app.config.project = "ROS2_Control: " + distro.title() app.config.html_logo = "images/logo_ros-controls.png" - - # see https://github.com/missinglinkelectronics/sphinxcontrib-globalsubs - app.config.global_substitutions = { - 'github_branch': branch, - } else: # If we are not building a multiversion build, default to the rolling logo app.config.html_logo = "images/logo_ros-controls.png" - # see https://github.com/missinglinkelectronics/sphinxcontrib-globalsubs - app.config.global_substitutions = { - 'github_branch': 'master', - } def github_link_rewrite_branch(app, pagename, templatename, context, doctree): diff --git a/doc/getting_started/getting_started.rst b/doc/getting_started/getting_started.rst index 2380d50421f..c476fa8a8c9 100644 --- a/doc/getting_started/getting_started.rst +++ b/doc/getting_started/getting_started.rst @@ -19,8 +19,8 @@ If you want to install the framework from source, use the following commands in .. code:: bash - wget https://raw.githubusercontent.com/ros-controls/ros2_control/master/ros2_control.humble.repos - vcs import src < ros2_control.humble.repos + wget https://raw.githubusercontent.com/ros-controls/ros2_control/{REPOS_FILE_BRANCH}/ros2_control.{REPOS_FILE_BRANCH}.repos + vcs import src < ros2_control.{REPOS_FILE_BRANCH}.repos Architecture ============ @@ -33,7 +33,7 @@ Controller Manager The `Controller Manager`_ (CM) connects the controllers and hardware-abstraction sides of the ros2_control framework. It also serves as the entry-point for users via ROS services. The CM implements a node without an executor so that it can be integrated into a custom setup. -However, it's usually recommended to use the default node-setup implemented in `ros2_control_node `_ file from the ``controller_manager`` package. +However, it's usually recommended to use the default node-setup implemented in `ros2_control_node `_ file from the ``controller_manager`` package. This manual assumes that you use this default node-setup. On the one hand, CM manages (e.g. loads, activates, deactivates, unloads) controllers and the interfaces they require. @@ -166,36 +166,26 @@ Running the Framework for Your Robot To run the ros2_control framework, do the following. The example files can be found in the `ros2_control_demos`_ repository. -#. Create a YAML file with the configuration of the controller manager and two controllers. (`Example configuration for RRBot `_) +#. Create a YAML file with the configuration of the controller manager and two controllers. (`Example configuration for RRBot `_) #. Extend the robot's URDF description with needed ```` tags. - It is recommended to use macro files (xacro) instead of pure URDF. (`Example URDF for RRBot `_) + It is recommended to use macro files (xacro) instead of pure URDF. (`Example URDF for RRBot `_) #. Create a launch file to start the node with `Controller Manager`_. You can use a default `ros2_control node`_ (recommended) or integrate the controller manager in your software stack. - (`Example launch file for RRBot `_) + (`Example launch file for RRBot `_) *NOTE:* You could alternatively use a script to create setup a `skeleton of the "hardware_interface" package by using the scripts `_ provided by one of our maintainers. .. _ros2_control: https://github.com/ros-controls/ros2_control .. _ros2_controllers: https://github.com/ros-controls/ros2_controllers -.. _control_msgs: https://github.com/ros-controls/control_msgs -.. _realtime_tools: https://github.com/ros-controls/realtime_tools -.. _control_toolbox: https://github.com/ros-controls/control_toolbox .. _ros2_control_demos: https://github.com/ros-controls/ros2_control_demos .. _controller_manager_msgs: https://github.com/ros-controls/ros2_control/tree/master/controller_manager_msgs -.. _Controller Manager: https://github.com/ros-controls/ros2_control/blob/master/controller_manager/src/controller_manager.cpp .. _ControllerInterface: https://github.com/ros-controls/ros2_control/blob/master/controller_interface/include/controller_interface/controller_interface.hpp .. _ros2_control node: https://github.com/ros-controls/ros2_control/blob/master/controller_manager/src/ros2_control_node.cpp .. _ForwardCommandController implementation: https://github.com/ros-controls/ros2_controllers/blob/master/forward_command_controller/src/forward_command_controller.cpp -.. _Resource Manager: https://github.com/ros-controls/ros2_control/blob/master/hardware_interface/src/resource_manager.cpp -.. _LifecycleNode-Class: https://github.com/ros2/rclcpp/blob/master/rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_node.hpp -.. _JointTrajectoryController: https://github.com/ros-controls/ros2_controllers/blob/master/joint_trajectory_controller/src/joint_trajectory_controller.cpp -.. _Node Lifecycle Design: https://design.ros2.org/articles/node_lifecycle.html .. _ros2controlcli: https://github.com/ros-controls/ros2_control/tree/master/ros2controlcli .. _Hardware Access through Controllers design document: https://github.com/ros-controls/roadmap/blob/master/design_drafts/hardware_access.md .. _ROS 2 Control Components URDF Examples design document: https://github.com/ros-controls/roadmap/blob/master/design_drafts/components_architecture_and_urdf_examples.md -.. _roadmap: https://github.com/ros-controls/roadmap -.. _ROS Discourse: https://discourse.ros.org .. |ros2_control_architecture| image:: images/components_architecture.png :alt: "ros2_control Architecture" diff --git a/index.rst b/index.rst index 4176f2d9ad1..40db1abf4cb 100644 --- a/index.rst +++ b/index.rst @@ -73,15 +73,14 @@ General discussions .. _realtime_tools: https://github.com/ros-controls/realtime_tools .. _control_toolbox: https://github.com/ros-controls/control_toolbox .. _ros2_control_demos: https://github.com/ros-controls/ros2_control_demos -.. _controller_manager_msgs: https://github.com/ros-controls/ros2_control/tree/master/controller_manager_msgs -.. _Controller Manager: https://github.com/ros-controls/ros2_control/blob/master/controller_manager/src/controller_manager.cpp -.. _ControllerInterface: https://github.com/ros-controls/ros2_control/blob/master/controller_interface/include/controller_interface/controller_interface.hpp -.. _ros2_control node: https://github.com/ros-controls/ros2_control/blob/master/controller_manager/src/ros2_control_node.cpp -.. _ForwardCommandController implementation: https://github.com/ros-controls/ros2_controllers/blob/master/forward_command_controller/src/forward_command_controller.cpp -.. _Resource Manager: https://github.com/ros-controls/ros2_control/blob/master/hardware_interface/src/resource_manager.cpp -.. _JointTrajectoryController: https://github.com/ros-controls/ros2_controllers/blob/master/joint_trajectory_controller/src/joint_trajectory_controller.cpp +.. _controller_manager_msgs: https://github.com/ros-controls/ros2_control/tree/{REPOS_FILE_BRANCH}/controller_manager_msgs +.. _Controller Manager: https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/controller_manager/src/controller_manager.cpp +.. _ControllerInterface: https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/controller_interface/include/controller_interface/controller_interface.hpp +.. _ros2_control node: https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/controller_manager/src/ros2_control_node.cpp + +.. _Resource Manager: https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/hardware_interface/src/resource_manager.cpp .. _Node Lifecycle Design: https://design.ros2.org/articles/node_lifecycle.html -.. _ros2controlcli: https://github.com/ros-controls/ros2_control/tree/master/ros2controlcli +.. _ros2controlcli: https://github.com/ros-controls/ros2_control/tree/{REPOS_FILE_BRANCH}/ros2controlcli .. _Hardware Access through Controllers design document: https://github.com/ros-controls/roadmap/blob/master/design_drafts/hardware_access.md .. _ROS2 Control Components URDF Examples design document: https://github.com/ros-controls/roadmap/blob/master/design_drafts/components_architecture_and_urdf_examples.md .. _roadmap: https://github.com/ros-controls/roadmap diff --git a/requirements.txt b/requirements.txt index 997235e3eb5..e709a9ab033 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,3 @@ sphinx sphinx-copybutton sphinx-multiversion sphinx_rtd_theme -sphinxcontrib-globalsubs