Skip to content
Merged
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
9 changes: 9 additions & 0 deletions docs/integrators-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ and has access to [Autoware ECU System Setup][autoware-ecu-system-setup] Ansible
[pilot-auto]: https://github.com/tier4/pilot-auto
[autoware-ecu-system-setup]: https://github.com/tier4/autoware_ecu_system_setup


## Pre-Requisites

### Setup ECU IP Configuration and PTP

The ECU, sensor and network architecture has been decided and set up. This includes things like
Netplan configuration and IP address assignments.

Expand All @@ -17,6 +20,12 @@ PTP profiles.
The [PTP Architecture Guide](ptp-architecture-guide.md) has been followed to set up the
PTP architecture, including all PTP4L and PHC2SYS configuration.

### Setup Diagnostics in Sensor Driver

Setup `nebula>=v0.2.8` and sensor configuration to output synchronization meta data on `/sync_diag/graph_updates`.

Please check the configuration example in [this PR](https://github.com/tier4/aip_launcher/pull/529)

## SYNC.DIAG

Once a PTP architecture is set up, SYNC.DIAG can be configured to monitor synchronization
Expand Down
32 changes: 25 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ diagnostics:
2. The reference graph has to be located under the `clock_tree` key.
3. The pattern `<hostname>.ptp<n>` is used to identify a hardware clock device of an ECU.
4. The pattern `<hostname>.sys` is used to identify the system clock of an ECU.
5. The pattern `<tf2/frame/id>` is used to identify a sensor.
5. The pattern `sensor@<frame_id>` is used to identify a sensor.
6. Even entries with no children need a `:` at the end.
7. These are customizable thresholds to diagnose reported time differences.
8. For a PTP link, the PTP master reports the time difference to a child clock, as calculated
Expand All @@ -92,13 +92,31 @@ diagnostics:
less accurate and more variable than the other two.

!!! warning
Special care needs to be taken to define hardware and software time stamping correctly:
If PTP4L is using software time stamping `-S`, the corresponding clock is the ECU's system
clock.
**Handling software time stamping**

If hardware time stamping is used on a given `-i <interface>`, find the clock e.g.
using `ethtool -T <interface>`. E.g., if `ethtool -T eno1` prints
`[...] PTP Hardware Clock: 0 [...]`, the clock is `ptp0`.
If a client-ECU is synchronizing in PTP4l using software time stamping with `-S`,
the tree structure would look like: (but check the [warning on mixing hardware-software stamping](./ptp-architecture-guide.md/#ptpv2))

```
main_ecu.ptp0:
client_ecu.sys
```

**Handling hardware time stamping**

The typical structure would be

```
main_ecu.ptp0:
client_ecu.ptp1:
client_ecu.sys:
```

**Hardware PTP clock Index**

To determine what is the index `<n>` for the pattern `<hostname>.ptp<n>` in hardware PTP,
find the clock e.g. using `ethtool -T <interface>`. E.g., if `ethtool -T eno1` prints
`[...] PTP Hardware Clock: 0 [...]`, the clock is `ptp0`.

!!! tip
Refer to the
Expand Down