From ebd86c20bd2bac0c150338b9577dc52c88c589e9 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 16 Apr 2024 12:08:49 +0000 Subject: [PATCH] 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: '' + }