From cca6f1ed8b05ab049f606e31fb49ffa6c3c8ee8f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:14:11 +0000 Subject: [PATCH 1/2] ci(pre-commit): autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v6.0.0) - [github.com/igorshubovych/markdownlint-cli: v0.37.0 → v0.47.0](https://github.com/igorshubovych/markdownlint-cli/compare/v0.37.0...v0.47.0) - [github.com/pre-commit/mirrors-prettier: v4.0.0-alpha.3 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v4.0.0-alpha.3...v4.0.0-alpha.8) - [github.com/adrienverge/yamllint: v1.33.0 → v1.37.1](https://github.com/adrienverge/yamllint/compare/v1.33.0...v1.37.1) - [github.com/tier4/pre-commit-hooks-ros: v0.8.0 → v0.10.0](https://github.com/tier4/pre-commit-hooks-ros/compare/v0.8.0...v0.10.0) - [github.com/shellcheck-py/shellcheck-py: v0.9.0.6 → v0.11.0.1](https://github.com/shellcheck-py/shellcheck-py/compare/v0.9.0.6...v0.11.0.1) - [github.com/scop/pre-commit-shfmt: v3.7.0-4 → v3.12.0-2](https://github.com/scop/pre-commit-shfmt/compare/v3.7.0-4...v3.12.0-2) - [github.com/pycqa/isort: 5.12.0 → 7.0.0](https://github.com/pycqa/isort/compare/5.12.0...7.0.0) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.11.0 → 25.12.0](https://github.com/psf/black-pre-commit-mirror/compare/23.11.0...25.12.0) - [github.com/PyCQA/flake8: 6.1.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.3.0) - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.6...v21.1.8) - [github.com/cpplint/cpplint: 1.6.1 → 2.0.2](https://github.com/cpplint/cpplint/compare/1.6.1...2.0.2) --- .pre-commit-config.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95028d2..4efd512 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-json - id: check-merge-conflict @@ -18,51 +18,51 @@ repos: args: [--markdown-linebreak-ext=md] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.37.0 + rev: v0.47.0 hooks: - id: markdownlint args: [-c, .markdownlint.yaml, --fix] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/adrienverge/yamllint - rev: v1.33.0 + rev: v1.37.1 hooks: - id: yamllint - repo: https://github.com/tier4/pre-commit-hooks-ros - rev: v0.8.0 + rev: v0.10.0 hooks: - id: prettier-package-xml - id: sort-package-xml - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.6 + rev: v0.11.0.1 hooks: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.7.0-4 + rev: v3.12.0-2 hooks: - id: shfmt args: [-w, -s, -i=4] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort - - repo: https://github.com/psf/black - rev: 23.11.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 hooks: - id: black args: [--line-length=100] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -78,12 +78,12 @@ repos: ] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v21.1.8 hooks: - id: clang-format - repo: https://github.com/cpplint/cpplint - rev: 1.6.1 + rev: 2.0.2 hooks: - id: cpplint args: [--quiet] From 39f9345e91ab3c081844ee78876b6e341fed0028 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:15:57 +0000 Subject: [PATCH 2/2] ci(pre-commit): autofix --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 8cd0540..6e48241 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,23 @@ This repository provides a ROS2 package for generating sensor trigger signals on 1. Create or change into your workspace directory, and execute the following: - ```bash - mkdir -p src - git clone git@github.com:tier4/sensor_trigger.git src - colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_trigger - ``` + ```bash + mkdir -p src + git clone git@github.com:tier4/sensor_trigger.git src + colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to sensor_trigger + ``` 2. The sensor trigger node requires as close to real-time operation as possible to maintain reliable trigger timing under heavy CPU load. If this is required, it is recommended to allow thread schedule priority setting to the ROS2 user by adding the following line to `/etc/security/limits.conf`: - ``` - - rtprio 98 - ``` + ``` + - rtprio 98 + ``` - After saving the edited file (as sudo), a reboot will be required. + After saving the edited file (as sudo), a reboot will be required. - Some notes about thread scheduling: - - If you do not make the settings in (2), the node will run but the timing thread will not be scheduled at any higher priority that other user threads and interruption may occur, resulting in high jitter in the trigger output. - - When running in a ROS2 docker, the settings in (2) are not required as the docker user is by default the root user. + Some notes about thread scheduling: + - If you do not make the settings in (2), the node will run but the timing thread will not be scheduled at any higher priority that other user threads and interruption may occur, resulting in high jitter in the trigger output. + - When running in a ROS2 docker, the settings in (2) are not required as the docker user is by default the root user. ## Usage @@ -63,13 +63,13 @@ This node does not take any inputs. ### Core Parameters -| Name | Type | Description | -| ------------- | ------ | ------------------------------------------------------------ | -| `gpio` | int | Output GPIO pin - see below for assigned pins on RQX-58G | -| `phase` | double | Desired phase of the trigger relative to ToS (Top of Second) | -| `frame_rate` | double | Desired frequency of the trigger in Hz | -| `cpu_core_id` | int | Desired CPU core for execution\* | -| `pulse_width_ms` | int | Desired pulse width (the time period in milliseconds for the GPIO pin to remain high) | +| Name | Type | Description | +| ---------------- | ------ | ------------------------------------------------------------------------------------- | +| `gpio` | int | Output GPIO pin - see below for assigned pins on RQX-58G | +| `phase` | double | Desired phase of the trigger relative to ToS (Top of Second) | +| `frame_rate` | double | Desired frequency of the trigger in Hz | +| `cpu_core_id` | int | Desired CPU core for execution\* | +| `pulse_width_ms` | int | Desired pulse width (the time period in milliseconds for the GPIO pin to remain high) | \*This is indexed from CPU core 0 (which will be CPU 1 in `htop`).