From ebd86c20bd2bac0c150338b9577dc52c88c589e9 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 16 Apr 2024 12:08:49 +0000 Subject: [PATCH 1/6] Add simple rosdoc2 landing page --- .github/workflows/rosdoc2.yml | 14 ++++++++ .pre-commit-config.yaml | 10 +++--- ros2_controllers/doc/conf.py | 5 +++ ros2_controllers/doc/index.rst | 62 ++++++++++++++++++++++++++++++++++ ros2_controllers/rosdoc2.yaml | 20 +++++++++++ 5 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/rosdoc2.yml create mode 100644 ros2_controllers/doc/conf.py create mode 100644 ros2_controllers/doc/index.rst create mode 100644 ros2_controllers/rosdoc2.yaml diff --git a/.github/workflows/rosdoc2.yml b/.github/workflows/rosdoc2.yml new file mode 100644 index 0000000000..3fdbaedb55 --- /dev/null +++ b/.github/workflows/rosdoc2.yml @@ -0,0 +1,14 @@ +name: rosdoc2 + +on: + workflow_dispatch: + pull_request: + paths: + - ros2_controllers/doc/** + - ros2_controllers/rosdoc2.yaml + - ros2_controllers/package.xml + + +jobs: + check: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rosdoc2.yml@rosdoc2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31ba833ba5..429a602b75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -26,6 +26,7 @@ repos: - id: check-symlinks - id: check-xml - id: check-yaml + exclude: .*/rosdoc2\.yaml$ - id: debug-statements - id: end-of-file-fixer - id: mixed-line-ending @@ -36,7 +37,7 @@ repos: # Python hooks - repo: https://github.com/asottile/pyupgrade - rev: v3.15.1 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py36-plus] @@ -62,7 +63,7 @@ repos: # CPP hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.1 + rev: v18.1.3 hooks: - id: clang-format args: ['-fallback-style=none', '-i'] @@ -104,6 +105,7 @@ repos: description: Check if copyright notice is available in all files. entry: ament_copyright language: system + exclude: .*/conf\.py$ # Docs - RestructuredText hooks - repo: https://github.com/PyCQA/doc8 @@ -131,7 +133,7 @@ repos: exclude: CHANGELOG\.rst|\.(svg|pyc|drawio)$ - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.0 + rev: 0.28.1 hooks: - id: check-github-workflows args: ["--verbose"] diff --git a/ros2_controllers/doc/conf.py b/ros2_controllers/doc/conf.py new file mode 100644 index 0000000000..b6134e9abd --- /dev/null +++ b/ros2_controllers/doc/conf.py @@ -0,0 +1,5 @@ +# Configuration file for the Sphinx documentation builder. +# settings will be overridden by rosdoc2, so we add here only custom settings + +copyright = "2024, ros2_control development team" +html_logo = "https://control.ros.org/master/_static/logo_ros-controls.png" diff --git a/ros2_controllers/doc/index.rst b/ros2_controllers/doc/index.rst new file mode 100644 index 0000000000..99ee7d909d --- /dev/null +++ b/ros2_controllers/doc/index.rst @@ -0,0 +1,62 @@ +Welcome to the documentation for ros2_controllers +================================================= + +For more information of the ros2_control framework see `control.ros.org `__. + +.. list-table:: + :header-rows: 1 + + * - Package Name + - API + - ROS Index + * - ackermann_steering_controller + - `API `__ + - `ROS Index `__ + * - admittance_controller + - `API `__ + - `ROS Index `__ + * - bicycle_steering_controller + - `API `__ + - `ROS Index `__ + * - diff_drive_controller + - `API `__ + - `ROS Index `__ + * - effort_controllers + - `API `__ + - `ROS Index `__ + * - force_torque_sensor_broadcaster + - `API `__ + - `ROS Index `__ + * - forward_command_controller + - `API `__ + - `ROS Index `__ + * - imu_sensor_broadcaster + - `API `__ + - `ROS Index `__ + * - joint_state_broadcaster + - `API `__ + - `ROS Index `__ + * - joint_trajectory_controller + - `API `__ + - `ROS Index `__ + * - pid_controller + - `API `__ + - `ROS Index `__ + * - position_controllers + - `API `__ + - `ROS Index `__ + * - range_sensor_broadcaster + - `API `__ + - `ROS Index `__ + * - steering_controllers_library + - `API `__ + - `ROS Index `__ + * - tricycle_controller + - `API `__ + - `ROS Index `__ + * - tricycle_steering_controller + - `API `__ + - `ROS Index `__ + * - velocity_controllers + - `API `__ + - `ROS Index `__ diff --git a/ros2_controllers/rosdoc2.yaml b/ros2_controllers/rosdoc2.yaml new file mode 100644 index 0000000000..c5ec1b53a0 --- /dev/null +++ b/ros2_controllers/rosdoc2.yaml @@ -0,0 +1,20 @@ +type: 'rosdoc2 config' +version: 1 + +--- + +settings: + # Not generating any documentation of code + generate_package_index: false + always_run_doxygen: false + enable_breathe: false + enable_exhale: false + always_run_sphinx_apidoc: false + +builders: + # Configure Sphinx with the location of the docs: + - sphinx: { + name: 'ros2_controllers', + sphinx_sourcedir: 'doc', + output_dir: '' + } From 31ef1e3c5bca0730b567123741f21a8ab9468b5c Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 16 Apr 2024 12:09:02 +0000 Subject: [PATCH 2/6] Add link to package.xml --- ros2_controllers/package.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ros2_controllers/package.xml b/ros2_controllers/package.xml index fc2e40fb8a..60d107147a 100644 --- a/ros2_controllers/package.xml +++ b/ros2_controllers/package.xml @@ -8,6 +8,8 @@ Apache License 2.0 + https://control.ros.org + ament_cmake ackermann_steering_controller From d7e248db50ddec0a59ca5763b28f380779265735 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 16 Apr 2024 12:13:35 +0000 Subject: [PATCH 3/6] Roll back version bumps --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 429a602b75..4d007580d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-ast @@ -37,7 +37,7 @@ repos: # Python hooks - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.15.1 hooks: - id: pyupgrade args: [--py36-plus] @@ -63,7 +63,7 @@ repos: # CPP hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.3 + rev: v18.1.1 hooks: - id: clang-format args: ['-fallback-style=none', '-i'] @@ -133,7 +133,7 @@ repos: exclude: CHANGELOG\.rst|\.(svg|pyc|drawio)$ - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.1 + rev: 0.28.0 hooks: - id: check-github-workflows args: ["--verbose"] From c45e36de01216a3e3a3e75fc2623019f83e10c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Wed, 17 Apr 2024 07:43:51 +0200 Subject: [PATCH 4/6] Use master branch of ros2_control_ci repo --- .github/workflows/rosdoc2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rosdoc2.yml b/.github/workflows/rosdoc2.yml index 3fdbaedb55..0771248e79 100644 --- a/.github/workflows/rosdoc2.yml +++ b/.github/workflows/rosdoc2.yml @@ -11,4 +11,4 @@ on: jobs: check: - uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rosdoc2.yml@rosdoc2 + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rosdoc2.yml@master From 66b401d885547a0c86658de580724872848f0249 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 17 Apr 2024 05:51:25 +0000 Subject: [PATCH 5/6] Add links to controller docs on control.ros.org --- ros2_controllers/doc/index.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ros2_controllers/doc/index.rst b/ros2_controllers/doc/index.rst index 99ee7d909d..f785112944 100644 --- a/ros2_controllers/doc/index.rst +++ b/ros2_controllers/doc/index.rst @@ -7,56 +7,74 @@ For more information of the ros2_control framework see `control.ros.org `__ - `API `__ - `ROS Index `__ * - admittance_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - bicycle_steering_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - diff_drive_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - effort_controllers + - `Documentation `__ - `API `__ - `ROS Index `__ * - force_torque_sensor_broadcaster + - `Documentation `__ - `API `__ - `ROS Index `__ * - forward_command_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - imu_sensor_broadcaster + - `Documentation `__ - `API `__ - `ROS Index `__ * - joint_state_broadcaster + - `Documentation `__ - `API `__ - `ROS Index `__ * - joint_trajectory_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - pid_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - position_controllers + - `Documentation `__ - `API `__ - `ROS Index `__ * - range_sensor_broadcaster + - `Documentation `__ - `API `__ - `ROS Index `__ * - steering_controllers_library + - `Documentation `__ - `API `__ - `ROS Index `__ * - tricycle_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - tricycle_steering_controller + - `Documentation `__ - `API `__ - `ROS Index `__ * - velocity_controllers + - `Documentation `__ - `API `__ - `ROS Index `__ From 29ab7fe9645ae7c13693c7b014f45467966f48ca Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 17 Apr 2024 21:03:19 +0000 Subject: [PATCH 6/6] Set check-yaml syntax instead of ignoring --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d007580d2..0d37991a2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: check-symlinks - id: check-xml - id: check-yaml - exclude: .*/rosdoc2\.yaml$ + args: ["--allow-multiple-documents"] - id: debug-statements - id: end-of-file-fixer - id: mixed-line-ending