Skip to content

Commit

Permalink
Substitution of branch names (#98) (#122)
Browse files Browse the repository at this point in the history
* Revert "Add global_substitutions to fix github links (#85)"

This reverts commit fed3b2a.

* Use branch name substitution for all links

(cherry picked from commit 45005b5)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
  • Loading branch information
mergify[bot] and christophfroehlich authored Jun 12, 2023
1 parent 7ee2f9d commit cd4ab39
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 35 deletions.
10 changes: 0 additions & 10 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"sphinx_rtd_theme",
"sphinx_multiversion",
"sphinx_copybutton",
"sphinxcontrib.globalsubs",
"generate_parameter_library"
]

Expand Down Expand Up @@ -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):
Expand Down
22 changes: 6 additions & 16 deletions doc/getting_started/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
============
Expand All @@ -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 <https://github.com/ros-controls/ros2_control/blob/master/controller_manager/src/ros2_control_node.cpp>`_ file from the ``controller_manager`` package.
However, it's usually recommended to use the default node-setup implemented in `ros2_control_node <https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/controller_manager/src/ros2_control_node.cpp>`_ 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.
Expand Down Expand Up @@ -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 <https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_bringup/config/rrbot_controllers.yaml>`_)
#. Create a YAML file with the configuration of the controller manager and two controllers. (`Example configuration for RRBot <https://github.com/ros-controls/ros2_control_demos/blob/{REPOS_FILE_BRANCH}/example_1/bringup/config/rrbot_controllers.yaml>`_)
#. Extend the robot's URDF description with needed ``<ros2_control>`` tags.
It is recommended to use macro files (xacro) instead of pure URDF. (`Example URDF for RRBot <https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_description/rrbot_description/urdf/rrbot_system_position_only.urdf.xacro>`_)
It is recommended to use macro files (xacro) instead of pure URDF. (`Example URDF for RRBot <https://github.com/ros-controls/ros2_control_demos/blob/{REPOS_FILE_BRANCH}/example_1/description/ros2_control/rrbot.ros2_control.xacro>`_)
#. 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 <https://github.com/ros-controls/ros2_control_demos/blob/master/ros2_control_demo_bringup/launch/rrbot_system_position_only.launch.py>`_)
(`Example launch file for RRBot <https://github.com/ros-controls/ros2_control_demos/blob/{REPOS_FILE_BRANCH}/example_1/bringup/launch/rrbot.launch.py>`_)

*NOTE:* You could alternatively use a script to create setup a `skeleton of the "hardware_interface" package by using the scripts <https://stoglrobotics.github.io/ros_team_workspace/master/use-cases/ros2_control/setup_robot_hardware_interface.html>`_ 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"
15 changes: 7 additions & 8 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ sphinx
sphinx-copybutton
sphinx-multiversion
sphinx_rtd_theme
sphinxcontrib-globalsubs

0 comments on commit cd4ab39

Please sign in to comment.