diff --git a/examples/community/bluerov2_reconciled_path_control_ros2.md b/examples/community/bluerov2_reconciled_path_control_ros2.md index 070a9d58..39a2b8d8 100644 --- a/examples/community/bluerov2_reconciled_path_control_ros2.md +++ b/examples/community/bluerov2_reconciled_path_control_ros2.md @@ -1,12 +1,12 @@ # External BlueROV2 Direct-Thruster Path Controller This note points to a community-maintained ROS 2 BlueROV2 path-following controller package -for DAVE / Gazebo: +for POSIM / Gazebo: [BlueROV2 reconciled path control](https://github.com/drwa92/bluerov2_reconciled_path_control_ros2) > [!NOTE] -> This package is developed and released outside DAVE. Startup and package-discovery +> This package is developed and released outside POSIM. Startup and package-discovery > fixes found during DAVE validation are tracked in the > [external compatibility PR](https://github.com/drwa92/bluerov2_reconciled_path_control_ros2/pull/1). > Check that PR before following the external project's quick-start instructions. @@ -21,7 +21,7 @@ The package provides: - direct six-thruster BlueROV2 allocation; - optional model-aided virtual-wrench reconciliation diagnostics. -The controller is designed to run with the DAVE BlueROV2 simulator in direct-control mode: +Run the controller with POSIM's BlueROV2 simulator in direct-control mode: ```bash ros2 launch posim_demos posim_robot.launch.py \ diff --git a/extras/lint_local/README.md b/extras/lint_local/README.md index 0845d068..dc7332a7 100644 --- a/extras/lint_local/README.md +++ b/extras/lint_local/README.md @@ -1,18 +1,41 @@ -# Check Code Format (lint) locally -This assumes that you are using LINUX system -To Run this script, you need to have the following system packages installed: -```bash -sudo apt-get install -y python3 clang-format libxml2-utils shellcheck -python3 -m pip install black flake8 cmakelang -``` +# Check formatting locally + +Run these commands from the POSIM repository root on Ubuntu. They use the +versions and options in the [CI lint workflow](../../.github/workflows/lint.yml). +Install Python tools in a virtual environment rather than the system Python. + +## Prepare the tools -Also, need to make this script executable ```bash -chmod +x lint_local.sh +sudo apt-get update +sudo apt-get install -y python3-venv libxml2-utils shellcheck +python3 -m venv "$HOME/.venvs/posim-lint" +source "$HOME/.venvs/posim-lint/bin/activate" +python -m pip install black==24.10.0 flake8==7.1.1 clang-format==19.1.6 \ + cmakelang==0.6.13 yamllint==1.35.1 ``` -To run the script, execute the following command: +## Run the checks + ```bash -# From dave root directory run lint_local.sh -./extras/lint_local/lint_local.sh +black --check --diff --line-length 99 --exclude tools/code_check . +flake8 --ignore=E203,W503,E501 --exclude=tools/code_check . +git ls-files -z '*.c' '*.cc' '*.cpp' '*.h' '*.hpp' '*.m' '*.mm' | \ + xargs -0 -r clang-format --dry-run --Werror --fallback-style=none +find . \( -iname '*.urdf' -o -iname '*.sdf' -o -iname '*.xacro' \ + -o -iname '*.xml' -o -iname '*.launch' -o -iname '*.world' \) \ + -print0 | xargs -0 xmllint --noout +git ls-files -z '*.sh' | xargs -0 -r shellcheck +find . \( -iname '*.yml' -o -iname '*.yaml' \) -print0 | \ + xargs -0 yamllint -d '{extends: default, rules: {line-length: {max: 120}, new-line-at-end-of-file: disable}}' +find . \( -iname 'CMakeLists.txt' -o -iname '*.cmake' \) \ + -print0 | xargs -0 cmake-lint ``` + +The C/C++ command checks formatting without rewriting files. The older +`lint_local.sh` helper formats C++ files in place and uses different options; +use the commands above when comparing your result with CI. In a new terminal, +activate the same virtual environment before running them. + +For the documentation site, use the separate +[website build and checks](../../website/README.md). diff --git a/website/public/docs.js b/website/public/docs.js index b65a9d3e..f9ac6185 100644 --- a/website/public/docs.js +++ b/website/public/docs.js @@ -2,7 +2,8 @@ const ko = document.documentElement.lang === 'ko'; let searchIndex; const indexPromise = () => searchIndex ||= fetch(document.body.dataset.searchIndex) - .then(response => { if (!response.ok) throw new Error('Search unavailable'); return response.json(); }); + .then(response => { if (!response.ok) throw new Error('Search unavailable'); return response.json(); }) + .catch(error => { searchIndex = undefined; throw error; }); document.querySelectorAll('.docs-search input').forEach(input => { const container = input.closest('.docs-sidebar, .docs-mobile-menu');