Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(pre-commit): autoupdate #30

Open
wants to merge 2 commits into
base: galactic
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-json
- id: check-merge-conflict
Expand All @@ -18,51 +18,51 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.43.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.35.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.10.0.1
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-4
rev: v3.10.0-2
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.10.0
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -78,12 +78,12 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
rev: v19.1.6
hooks:
- id: clang-format

- repo: https://github.com/cpplint/cpplint
rev: 1.6.1
rev: 2.0.0
hooks:
- id: cpplint
args: [--quiet]
Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,38 @@

## Introduction

This repository provides a ROS2 package for generating sensor trigger signals on a Jetson AGX Xavier. It is specifically designed for use with the ADLINK ROSCube RQX-58G, providing pin mapping for the GPIO which are internally connected to the FPGA which controls FSYNC for the built-in GMSL deserializers.

Check warning on line 5 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)

## Requirements

- ECU: Jetson Xavier AGX from NVIDIA Corp.
- The software in this package is pre-configured for use with ROSCube RQX-58G from ADLINK, although it can be modified to run hardware triggers by using different GPIO on any Jetson Xavier AGX based ECU. The remainder of this document assumes that the user is working with an RQX-58G.
- OS: Ubuntu 18.04 or higher
- ROS2: Galactic Geochelone

Check warning on line 12 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)
- With current BSP versions, Ubuntu 18.04 must be run on Jetson Xavier AGX within a docker environment. Please refer to [tier4/perception_ecu_container](https://github.com/tier4/perception_ecu_container) for how to prepare the OS and ROS2 environment.

Check warning on line 13 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)

## Installation

1. Create or change into your workspace directory, and execute the following:

```bash
mkdir -p src
git clone [email protected]: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 [email protected]: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`:

Check warning on line 25 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)

```
<username> - rtprio 98
```
```
<username> - rtprio 98

Check warning on line 28 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (rtprio)
```

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.

Check warning on line 36 in README.md

View workflow job for this annotation

GitHub Actions / spell-check-differential

Forbidden word (ROS2)

## Usage

Expand Down Expand Up @@ -63,13 +64,13 @@

### 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`).

Expand Down
Loading