Skip to content

Commit

Permalink
Update documentation with 2025 changes (#196)
Browse files Browse the repository at this point in the history
* Update "Getting Started" section of docs

* Add dark screenshot to docs welcome page

* Update tab reference docs

* Fix formatting

* Update "More Features" section of docs
  • Loading branch information
jwbonner authored Sep 22, 2024
1 parent 2ea558a commit b9ee925
Show file tree
Hide file tree
Showing 84 changed files with 744 additions and 452 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AdvantageScope includes the following tools:

Feedback, feature requests, and bug reports are welcome on the [issues page](https://github.com/Mechanical-Advantage/AdvantageScope/issues). For non-public inquires, please send a message to software@team6328.org.

![Example screenshot](/docs/resources/screenshot-light.png)
![Example screenshot](/docsSite/docs/img/screenshot-light.png)

## Installation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
---
sidebar_position: 2
sidebar_position: 3
---

import PrefsImage from '../img/prefs.png';

# Connecting to Live Sources

All visualizations in AdvantageScope are designed to receive live data from a robot or simulator in addition to log files. This section describes how to connect to real time data sources.

## Configuration

Open the preferences window by pressing **cmd/ctrl + comma** or clicking "Help" > "Show Preferences..." (Windows/Linux) or "AdvantageScope" > "Settings..." (macOS).
Open the preferences window by clicking `Help` > `Show Preferences...` (Windows/Linux) or `AdvantageScope` > `Settings...` (macOS).

![Diagram of live preferences](./img/open-live-1.png)
<img src={PrefsImage} alt="Diagram of roboRIO preferences" height="350" />

### roboRIO Address

Enter the roboRIO address using a 10.TE.AM.2 IP address as described in the [WPILib docs](https://docs.wpilib.org/en/stable/docs/networking/networking-introduction/ip-configurations.html#te-am-ip-notation). Click "File" > "Use USB roboRIO Address" to temporarily use the IP address "172.22.11.2" for all connections.
Enter the roboRIO address using a 10.TE.AM.2 IP address as described in the [WPILib docs](https://docs.wpilib.org/en/stable/docs/networking/networking-introduction/ip-configurations.html#te-am-ip-notation). Click `File` > `Use USB roboRIO Address` to temporarily use the IP address `172.22.11.2` for all connections.

### Live Source

The following sources of live data are supported by AdvantageScope:

- **NetworkTables 4:** This is the default networking protocol starting in WPILib 2023, and is commonly used by dashboards, coprocessors, etc. See the [WPILib documentation](https://docs.wpilib.org/en/stable/docs/software/networktables/index.html) for more details. Note that NetworkTables 3 (used by WPILib 2022 and older) is not supported by AdvantageScope.
- **NetworkTables 4 (AdvantageKit):** This mode is designed for use with robot code running AdvantageKit, which publishes to the "/AdvantageKit" table in NetworkTables. The only difference from the **NetworkTables 4** mode is that the "/AdvantageKit" table is used as the root, which allows for easier switching between an NT4 connection and an AdvantageKit log file.
- **Phoenix Diagnostics:** This mode uses HTTP to connect to a Phoenix [diagnostic server](https://pro.docs.ctr-electronics.com/en/latest/docs/installation/running-diagnostics.html), which allows for data streaming from CTRE CAN devices with [Phoenix 6](https://pro.docs.ctr-electronics.com/en/latest/). This is similar to the [plotting feature](https://pro.docs.ctr-electronics.com/en/latest/docs/tuner/plotting.html) in Phoenix Tuner, but includes support for previewing values in the sidebar and storing the full history of signals (like any other AdvantageScope live source). Note that the diagnostic server only supports plotting signals from **one device at a time**. AdvantageScope will switch between devices automatically based on the signals being viewed.
- **PathPlanner 2023:** This mode connects using the `PathPlannerServer` protocol used for telemetry by PathPlanner 2023. The connection is always initiated on port 5811. Note that PathPlanner 2024 and later publish telemetry data using NetworkTables, so the **NetworkTables 4** mode should be used.
- **NetworkTables 4:** This is WPILib's primary networking protocol. See the [WPILib documentation](https://docs.wpilib.org/en/stable/docs/software/networktables/index.html) for more details.
- **NetworkTables 4 (AdvantageKit):** This mode is designed for use with robot code running AdvantageKit, which publishes to the `AdvantageKit` table in NetworkTables.
- **Phoenix Diagnostics:** This mode uses HTTP to connect to a Phoenix [diagnostic server](https://pro.docs.ctr-electronics.com/en/latest/docs/installation/running-diagnostics.html), which allows for data streaming from CTRE CAN devices with [Phoenix 6](https://pro.docs.ctr-electronics.com/en/latest/). This is similar to the [plotting feature](https://pro.docs.ctr-electronics.com/en/latest/docs/tuner/plotting.html) in Phoenix Tuner.
- **PathPlanner 2023:** Legacy, this mode connects using the `PathPlannerServer` protocol used for telemetry by PathPlanner 2023. The connection is always initiated on port 5811. Note that PathPlanner 2024 and later publish telemetry data using NetworkTables, so the **NetworkTables 4** mode should be used.
- **RLOG Server:** This protocol is supported by AdvantageKit as an alternative to NetworkTables. The connection is initiated on port 5800 by default.

> Note: The Phoenix Diagnostics live mode uses an undocumented protocol that may be changed in future Phoenix updates. If this mode does not function properly, please update to the latest version of AdvantageScope. If the issue persists, please [open an issue](https://github.com/Mechanical-Advantage/AdvantageScope/issues) to let us know.
:::warning
The Phoenix Diagnostics live mode may experience issues as a result of Phoenix updates. If this mode does not function properly, update to the latest version of AdvantageScope. If the issue persists, please [open an issue](https://github.com/Mechanical-Advantage/AdvantageScope/issues) to let us know.
:::

### Live Mode

When NetworkTables is used as the live source, the following live modes can be selected:

- **Low Bandwidth (Default):** AdvantageScope only requests data from the server for fields that are actively being used. Data published before a field was selected will not be available. This mode is **highly recommended** when running in an environment with limited network bandwidth, such as on the field.
- **Logging:** AdvantageScope requests data for all fields regardless of whether they are actively being used. This means that fields can be viewed retroactively by pausing the stream of live data (see below). This mode is often useful during development but **should NOT be used on the field**.
- **Low Bandwidth (Default):** AdvantageScope only requests data from the server for fields that are actively being used. Data published before a field was selected will not be available. This mode is **highly recommended** when running in an environment with limited network bandwidth, or when a large number of fields are being published.
- **Logging:** AdvantageScope requests data for all fields regardless of whether they are actively being used. This means that fields can be viewed retroactively by pausing the stream of live data (see below). This mode is often useful during development but **should NOT be used when bandwidth is limited**.

### Discard Live Data

Expand All @@ -43,18 +47,20 @@ During a live connection, data is stored locally to allow for replay of past dat

To start the connection to a robot (using the configured "roboRIO Address") or a simulator (using "127.0.0.1"), follow these steps:

- **Robot:** Click "File" > "Connect to Robot" or press **cmd/ctrl + K**
- **Simulator:** Click "File" > "Connect to Simulator" or press **shift + cmd/ctrl + K**
- **Robot:** Click `File` > `Connect to Robot`
- **Simulator:** Click `File` > `Connect to Simulator`

The window title displays the IP address and the text "Searching" until the robot/sim is connected. It attempts to reconnect automatically using the same settings after a disconnect.

## Viewing Live Data

When connected to a live source, AdvantageScope locks all tabs to the current time by default. Views like the 📉 [Line Graph](../tab-reference/line-graph.md) and 🔢 [Table](../tab-reference/table.md) autoscroll, and views like odometry and joysticks display the current values of each field. Clicking the red arrow button in the navigation bar toggles this lock, enabling viewing and replay of past data.

> Note: Scrolling to the left in the line graph also unlocks from the current time, and scrolling all the way to the right locks to the current time again.
![Live lock/unlock button](./img/open-live-1.png)

![Live lock/unlock button](./img/open-live-2.png)
:::tip
Scrolling to the left in the line graph or timeline unlocks from the current time, and scrolling all the way to the right locks to the current time again.
:::

## Tuning Mode

Expand All @@ -65,4 +71,6 @@ By default, all values in AdvantageScope are read-only. To toggle tuning mode, *
- To edit a **numeric field**, enter a new value using the text box to the right of the field in the sidebar. The value is published after the input is deselected or the "Enter" key is pressed. Leave the text box blank to use the robot-published value.
- To toggle a **boolean field**, click the red or green circle to the right of the field in the sidebar.

> Note: This feature is not intended for controlling the robot on the field. Support for dashboard-style inputs like choosers, trigger buttons, etc. will not be added.
:::warning
This feature is not intended for controlling the robot on the field. Dashboard-style inputs like choosers, trigger buttons, etc. are not supported.
:::
Binary file added docsSite/docs/getting-started/img/keyboard-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docsSite/docs/getting-started/img/keyboard-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docsSite/docs/getting-started/img/navigation-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docsSite/docs/getting-started/img/navigation-2.png
Binary file not shown.
Binary file removed docsSite/docs/getting-started/img/navigation-3.png
Binary file not shown.
Binary file removed docsSite/docs/getting-started/img/navigation-4.png
Binary file not shown.
Binary file removed docsSite/docs/getting-started/img/navigation-5.png
Binary file not shown.
Binary file removed docsSite/docs/getting-started/img/navigation-6.png
Binary file not shown.
Binary file modified docsSite/docs/getting-started/img/open-file-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docsSite/docs/getting-started/img/open-file-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docsSite/docs/getting-started/img/open-file-3.png
Binary file not shown.
Binary file modified docsSite/docs/getting-started/img/open-live-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docsSite/docs/getting-started/img/open-live-2.png
Binary file not shown.
91 changes: 91 additions & 0 deletions docsSite/docs/getting-started/keyboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
sidebar_position: 4
---

# Keyboard Shortcuts

AdvantageScope includes numerous keyboard shortcuts that allow for faster navigation. Shortcuts that use the `ctrl` key are replaced by the ⌘ key on macOS.

### Data Sources

<table>
<tr><td>`Ctrl+O`</td><td>Open one or more log files</td></tr>
<tr><td>`Ctrl+Shift+O`</td><td>Add one or more log files to the current visualization</td></tr>
<tr><td>`Ctrl+K`</td><td>Connect to robot as a live source</td></tr>
<tr><td>`Ctrl+Shift+K`</td><td>Connect to simulator as a live source</td></tr>
<tr><td>`Ctrl+D`</td><td>Download log files from the robot</td></tr>
<tr><td>`Option+Z`</td><td>Load Zebra MotionWorks™️ data</td></tr>
</table>

### Data Export

<table>
<tr><td>`Ctrl+E`</td><td>Export log data</td></tr>
<tr><td>`Ctrl+P`</td><td>Publish log data to a NetworkTables server on the robot</td></tr>
<tr><td>`Ctrl+Shift+P`</td><td>Publish log data to a NetworkTables server in simulation</td></tr>
<tr><td>`Option+Ctrl+P`</td><td>Stop publishing to NetworkTables</td></tr>
</table>

### Window Controls

<table>
<tr><td>`Ctrl+N`</td><td>Create a new window</td></tr>
<tr><td>`Ctrl+Shift+N`</td><td>Close the current window</td></tr>
<tr><td>`Ctrl+Comma`</td><td>Open preferences window</td></tr>
<tr><td>`Ctrl+Period`</td><td>Toggle sidebar visibility</td></tr>
<tr><td>`Ctrl+Slash`</td><td>Toggle control pane visibility</td></tr>
</table>

### Tab Controls

<table>
<tr><td>`Ctrl+T`</td><td>Open dropdown to add a new tab</td></tr>
<tr><td>`Ctrl+Shift+T`</td><td>Create a new pop-out window for the current tab</td></tr>
<tr><td>`Ctrl+Left` and `Ctrl+Right`</td><td>Switch tabs</td></tr>
<tr><td>`Ctrl+[` and `Ctrl+]`</td><td>Rearrange tabs</td></tr>
<tr><td>`Ctrl+W`</td><td>Close current tab</td></tr>
</table>

**The shortcuts below can be used to quickly create new tabs:**

<table>
<tr>
<td>`Option+G`</td><td>[📉 Line Graph](../tab-reference/line-graph.md)</td>
<td>`Option+V`</td><td>[🎬 Video](../tab-reference/video.md)</td>
</tr>
<tr>
<td>`Option+O`</td><td>[🗺 Odometry](../tab-reference/odometry.md)</td>
<td>`Option+J`</td><td>[🎮 Joysticks](../tab-reference/joysticks.md)</td>
</tr>
<tr>
<td>`Option+3`</td><td>[👀 3D Field](../tab-reference/3d-field.md)</td>
<td>`Option+D`</td><td>[🦀 Swerve](../tab-reference/swerve.md)</td>
</tr>
<tr>
<td>`Option+T`</td><td>[🔢 Table](../tab-reference/table.md)</td>
<td>`Option+M`</td><td>[⚙️ Mechanism](../tab-reference/mechanism.md)</td>
</tr>
<tr>
<td>`Option+C`</td><td>[💬 Console](../tab-reference/console.md)</td>
<td>`Option+P`</td><td>[📍 Points](../tab-reference/points.md)</td>
</tr>
<tr>
<td>`Option+S`</td><td>[📊 Statistics](../tab-reference/statistics.md)</td>
<td>`Option+I`</td><td>[🔍 Metadata](../tab-reference/metadata.md)</td>
</tr>
</table>

### Playback

<table>
<tr><td>`Space`</td><td>Toggle playback</td></tr>
<tr><td>`Left` and `Right`</td><td>Step through log file</td></tr>
<tr><td>`L`</td><td>Toggle lock when viewing live data</td></tr>
</table>

### Touch Bar

On supported MacBook models, the Touch Bar can be used to scrub through the log and add new tabs.

![Touch Bar scrubbing interface](./img/keyboard-1.png)
![Touch Bar new tab interface](./img/keyboard-2.png)
53 changes: 53 additions & 0 deletions docsSite/docs/getting-started/manage-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_position: 2
---

import PrefsImage from '../img/prefs.png';
import Image2 from './img/open-file-2.png';

# Managing Log Files

## Supported Formats

- **WPILOG (.wpilog)** - Produced by WPILib's [built-in data logging](https://docs.wpilib.org/en/stable/docs/software/telemetry/datalog.html) and AdvantageKit. [URCL](../more-features/urcl.md) can be used to capture signals from REV motor controllers to a WPILOG file.
- **Driver Station logs (.dslog and .dsevents)** - Produced by the [FRC Driver Station](https://docs.wpilib.org/en/stable/docs/software/driverstation/driver-station.html). AdvantageScope automatically searches for the corresponding log file when opening either log type.
- **Hoot (.hoot)** - Produced by CTRE's Phoenix 6 [signal logger](https://pro.docs.ctr-electronics.com/en/latest/docs/api-reference/api-usage/signal-logging.html).
- **RLOG (.rlog)** - Legacy, produced by AdvantageKit 2022.

:::warning
Hoot files can **only be opened on Windows** and require an installation of [Phoenix Tuner X](https://v6.docs.ctr-electronics.com/en/stable/docs/tuner/index.html).
:::

## Opening Logs

In the menu bar, click `File` > `Open Log(s)...`, then choose a one or more log files from the local disk. Dragging a log file from the system file browser to the AdvantageScope icon or window also causes it to open.

:::info
If multiple files are opened simultaneously, the timestamps will be aligned automatically. This enables easy comparison of log files from multiple sources.
:::

![Opening a saved log](./img/open-file-1.png)

## Adding New Logs

After opening a log file, additional logs can be easily added to the visualization. Timestamps will be realigned automatically to synchronize with existing data.

In the menu bar, click `File` > `Add News Log(s)...`, then choose a one or more log files to add to the current visualization. The fields from each log will be recorded under tables named `Log0`, `Log1`, etc.

## Downloading from a roboRIO

<details>
<summary>Configuration</summary>

Open the preferences window by clicking `Help` > `Show Preferences...` (Windows/Linux) or `AdvantageScope` > `Settings...` (macOS). Update the roboRIO address and log folder. Click `File` > `Use USB roboRIO Address` to temporarily use the IP address `172.22.11.2` for all connections.

<img src={PrefsImage} alt="Diagram of roboRIO preferences" height="350" />
</details>

Click `File` > `Download Logs...` to open the download window. Once connected to the roboRIO, available logs are shown with the newest at the top. Select one or more log files to download (shift-click to select a range or **cmd/ctrl + A** to select all). Then click the ↓ symbol and select a save location.

:::tip
When downloading multiple files, AdvantageScope skips any that already exist in the destination folder.
:::

<img src={Image2} alt="Downloading log files" height="350" />
Loading

0 comments on commit b9ee925

Please sign in to comment.