Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Mar 18, 2024
1 parent a777431 commit 1bd0fb9
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ 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 [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

Unknown 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

Unknown word (ROS2)

## Usage

Expand Down Expand Up @@ -63,13 +64,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`).

Expand Down

0 comments on commit 1bd0fb9

Please sign in to comment.