Skip to content

Commit

Permalink
Merge branch 'main' into multiplatform-hoot
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Dec 6, 2024
2 parents 717423b + 6a2e529 commit 8076e46
Show file tree
Hide file tree
Showing 83 changed files with 18,132 additions and 503 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project
about: Suggest an idea for AdvantageScope
title: ""
labels: enhancement
assignees: ""
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Question
about: Ask about features or parts of this project
about: Ask about features or parts of AdvantageScope
title: ""
labels: question
assignees: ""
Expand Down
4 changes: 3 additions & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AdvantageScope is a volunteer-run project that is owned and published by the Littleton STEM Educational Foundation ("Littleton Robotics"), a non-profit organization based in the United States.

_This policy was last modified on September 24th, 2024._
_This policy was last modified on November 1st, 2024._

## Information We Collect

Expand All @@ -14,6 +14,8 @@ Users of AdvantageScope beta releases may be asked to complete an online feedbac

The AdvantageScope repository and documentation site are hosted by GitHub, which publishes a [privacy policy](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement) that applies when interacting with these services.

The search feature of the online AdvantageScope documentation uses Algolia, which publishes a [privacy policy](https://www.algolia.com/policies/privacy/) that applies when interacting with this service.

The AdvantageScope application may connect to GitHub services to check for updates and download assets. These interactions are covered by the GitHub privacy policy.

Some AdvantageScope features integrate with [The Blue Alliance](https://www.thebluealliance.com/privacy) to provide additional functionality (as indicated by the text "Powered by The Blue Alliance"). These interactions are covered by The Blue Alliance's [privacy policy](https://www.thebluealliance.com/privacy).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ![AdvantageScope](/banner.png)
# ![AdvantageScope](/docsSite/docs/img/banner.png)

[![Build](https://github.com/Mechanical-Advantage/AdvantageScope/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Mechanical-Advantage/AdvantageScope/actions/workflows/build.yml)

Expand Down Expand Up @@ -66,6 +66,6 @@ npm start

## Assets

For details on adding custom assets, see [Custom Assets](/docs/CUSTOM-ASSETS.md).
For details on adding custom assets, see [Custom Assets](https://docs.advantagescope.org/more-features/custom-assets).

Bundled assets are stored under [`bundledAssets`](/bundledAssets/). Larger assets are downloaded automatically by AdvantageScope from the [AdvantageScopeAssets](https://github.com/Mechanical-Advantage/AdvantageScopeAssets/releases) repository.
18 changes: 14 additions & 4 deletions docsSite/docs/getting-started/connect-live.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,23 @@ Some live sources support live tuning of numeric and boolean values. For example

By default, all values in AdvantageScope are read-only. To toggle tuning mode, **click the slider icon** to the right of the search bar when connected to a supported live source. When the icon is purple, tuning mode is active and field editing is enabled.

:::note
Fields published by AdvantageKit are output-only and not tunable.
:::

- 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.

:::warning
This feature is not intended for controlling the robot on the field. Dashboard-style inputs like choosers, trigger buttons, etc. are not supported.
:::

### Tuning With AdvantageKit

Fields published by AdvantageKit to the `AdvantageKit` subtable are output-only and cannot be edited. However, users can publish fields from user code that are tunable from AdvantageScope. **Any fields published to the "/Tuning" table on NetworkTables will appear under the "Tuning" table when using the "NetworkTables 4 (AdvantageKit)" live source.**

For example, a tunable number can be published using the [`LoggedNetworkNumber`](https://docs.advantagekit.org/data-flow/recording-inputs/dashboard-inputs) class:

```java
LoggedNetworkNumber tunableNumber = new LoggedNetworkNumber("/Tuning/MyTunableNumber");
```

:::warning
The `NetworkInputs` subtable **cannot be edited**, since it is used by AdvantageKit to record network values for logging and replay. Use the `Tuning` table to interact with network inputs in real time.
:::
1 change: 1 addition & 0 deletions docsSite/docs/getting-started/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ AdvantageScope includes numerous keyboard shortcuts that allow for faster naviga
<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>
<tr><td>`Ctrl+\`</td><td>Zoom timeline to enabled range</td></tr>
</table>

### Touch Bar
Expand Down
2 changes: 1 addition & 1 deletion docsSite/docs/getting-started/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The navigation buttons (green) on the top manage the tabs and control playback.
- **Plus Button**: Opens a dropdown menu to create a new tab.
- **Window Button:** Creates a new pop-out window with the tab tab. This feature can be used to view data from multiple tabs simultaneously.
- **X Button:** Closes the current tab.
- **Play Button:** Start and stop real-time playback. _Right-click to change playback speed._
- **Play Button:** Start and stop real-time playback. _Right-click to change playback speed or enable looping._

## Viewer Pane

Expand Down
File renamed without changes
4 changes: 3 additions & 1 deletion docsSite/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import DocCardList from "@theme/DocCardList";
import ScreenshotLight from "./img/screenshot-light.png";
import ScreenshotDark from "./img/screenshot-dark.png";

# AdvantageScope
#

![AdvantageScope](./img/banner.png)

AdvantageScope is a robot diagnostics, log review/analysis, and data visualization application for FIRST Robotics Competition teams developed by [Team 6328](https://littletonrobotics.org). It reads logs in WPILOG, DS log, Hoot (CTRE), and RLOG file formats, plus live robot data viewing using NT4 or RLOG streaming. AdvantageScope can be used with any WPILib project, but is also optimized for use with our [AdvantageKit](https://docs.advantagekit.org) log replay framework. Note that **AdvantageKit is not required to use AdvantageScope**.

Expand Down
4 changes: 3 additions & 1 deletion docsSite/docs/legal/privacy-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 2

AdvantageScope is a volunteer-run project that is owned and published by the Littleton STEM Educational Foundation ("Littleton Robotics"), a non-profit organization based in the United States.

_This policy was last modified on September 24th, 2024._
_This policy was last modified on November 1st, 2024._

## Information We Collect

Expand All @@ -18,6 +18,8 @@ Users of AdvantageScope beta releases may be asked to complete an online feedbac

The AdvantageScope repository and documentation site are hosted by GitHub, which publishes a [privacy policy](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement) that applies when interacting with these services.

The search feature of the online AdvantageScope documentation uses Algolia, which publishes a [privacy policy](https://www.algolia.com/policies/privacy/) that applies when interacting with this service.

The AdvantageScope application may connect to GitHub services to check for updates and download assets. These interactions are covered by the GitHub privacy policy.

Some AdvantageScope features integrate with [The Blue Alliance](https://www.thebluealliance.com/privacy) to provide additional functionality (as indicated by the text "Powered by The Blue Alliance"). These interactions are covered by The Blue Alliance's [privacy policy](https://www.thebluealliance.com/privacy).
Expand Down
13 changes: 13 additions & 0 deletions docsSite/docs/more-features/custom-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ A model must be included in the folder with the name "model.glb". CAD files must
{
"name": string // Unique name, required for all asset types
"sourceUrl": string // Link to the original file, optional
"disableSimplification": boolean // Whether to disable model simplification, optional
"rotations": { "axis": "x" | "y" | "z", "degrees": number }[] // Sequence of rotations along the x, y, and z axes
"position": [number, number, number] // Position offset in meters, applied after rotation
"cameras": [ // Fixed camera positions, can be empty
Expand All @@ -59,6 +60,14 @@ A model must be included in the folder with the name "model.glb". CAD files must

The simplest way to determine appropriate position and rotation values is by trial and error. We recommend adjusting rotation before position as the transforms are applied in this order.

:::info
AdvantageScope simplifies model geometry automatically to improve performance, where the level of detail depends on the selected [rendering mode](../tab-reference/3d-field.md#rendering-modes). In cases where model simplification produces undesired effects with custom assets, two solutions can be used:

- To disable automatic removal of a particular mesh, include the string `NOSIMPLIFY` in the mesh name.
- To disable model simplification for an entire robot model, set the `disableSimplification` option in the configuration to `true`.

:::

### Articulated Components

:::warning
Expand All @@ -69,6 +78,10 @@ Robot models can contain articulated components for visualizing mechanism data (

Component configuration is provided in the robot's config file. An array of components should be provided under the "components" key. When no component poses are provided by the user in AdvantageScope, the component models will be positioned using the default robot rotations and position (see above). When component poses are provided by the user, the "zeroed" rotations and position are instead applied to bring each component to the robot origin. The user's poses are then applied to move each component to the correct location on the robot.

:::tip
When positioning 3D components relative to the robot, the origin of the coordinate system matches the published pose of the robot. Note that this pose generally uses a height of zero, which is the floor plane and NOT the robot bellypan (for typical 2D robot movement).
:::

```json
"components": [
{
Expand Down
4 changes: 4 additions & 0 deletions docsSite/docs/more-features/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ To view options for exporting, click `File` > `Export Data...`.

<img src={Image1} alt="Export options" height="250" />

:::tip
In addition to the full-log export described here, the 💬 [Console](../tab-reference/console.md) tab allows console data to be exported to a text file.
:::

## Options

The following options are provided when exporting:
Expand Down
15 changes: 11 additions & 4 deletions docsSite/docs/more-features/urcl.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To more easily identify devices in the log, CAN IDs can be assigned to aliases b

1. After setting up URCL as shown above, configure the SysId routine using `null` for the mechanism log consumer. An example is shown below for Java. This configuration can be performed within the subsystem class.

<Tabs>
<Tabs groupId="library">
<TabItem value="WPILib" label="WPILib" default>

```java
Expand All @@ -112,9 +112,16 @@ sysIdRoutine.dynamic(SysIdRoutine.Direction.kReverse);

```java
// Create the SysId routine
var sysIdRoutine = new SysIdRoutine.Config(
null, null, null,
(state) -> Logger.recordOutput("SysIdTestState", state.toString())
var sysIdRoutine = new SysIdRoutine(
new SysIdRoutine.Config(
null, null, null,
(state) -> Logger.recordOutput("SysIdTestState", state.toString())
),
new SysIdRoutine.Mechanism(
(voltage) -> subsystem.runVolts(voltage.in(Volts)),
null, // No log consumer, since data is recorded by URCL
subsystem
)
);

// The methods below return Command objects
Expand Down
6 changes: 3 additions & 3 deletions docsSite/docs/tab-reference/3d-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The timeline is used to control playback and visualization. Clicking on the time

The green sections of the timeline indicate when the robot is autonomous, and the blue sections indicate when the robot is teleoperated.

To zoom, place the cursor over the timeline and scroll up or down. A range can also be selecting by clicking and dragging while holding `Shift`. Move left and right by scrolling horizontally (on supported devices), or by clicking and dragging on the timeline. When connected live, scrolling to the left unlocks from the current time, and scrolling all the way to the right locks to the current time again.
To zoom, place the cursor over the timeline and scroll up or down. A range can also be selecting by clicking and dragging while holding `Shift`. Move left and right by scrolling horizontally (on supported devices), or by clicking and dragging on the timeline. When connected live, scrolling to the left unlocks from the current time, and scrolling all the way to the right locks to the current time again. Press `Ctrl+\` to zoom to the period where the robot is enabled.

![Timeline](./img/timeline.png)

Expand All @@ -45,7 +45,7 @@ The legacy number array format for geometry data is now deprecated. See [here](.

Many FRC libraries support the struct format, including WPILib and AdvantageKit. The example code below shows how to log 3D pose data in Java.

<Tabs>
<Tabs groupId="library">
<TabItem value="wpilib" label="WPILib" default>

```java
Expand Down Expand Up @@ -118,7 +118,7 @@ Another simple use case is showing the state of game pieces within the robot bas
<details>
<summary>Code Example</summary>

The AdvantageKit KitBot 2024 example project includes a simple example of a [command](https://github.com/Mechanical-Advantage/AdvantageKit/blob/main/example_projects/kitbot_2024/src/main/java/frc/robot/util/NoteVisualizer.java) that animates a note traveling from the robot to the speaker. This command is incorporated into the standard [launch sequence](https://github.com/Mechanical-Advantage/AdvantageKit/blob/main/example_projects/kitbot_2024/src/main/java/frc/robot/subsystems/launcher/Launcher.java#L73), triggering the animation whenever a note is released. [This video](https://youtube.com/shorts/-HxfDo9f19U?feature=share) shows how game piece animations can be used to visualize auto routines for several different games.
The AdvantageKit KitBot 2024 example project includes a simple example of a [command](https://github.com/Mechanical-Advantage/AdvantageKit/blob/18a0219f60108e3dc1e8512d59fcba0e657770af/example_projects/kitbot_2024/src/main/java/frc/robot/util/NoteVisualizer.java) that animates a note traveling from the robot to the speaker. This command is incorporated into the standard [launch sequence](https://github.com/Mechanical-Advantage/AdvantageKit/blob/18a0219f60108e3dc1e8512d59fcba0e657770af/example_projects/kitbot_2024/src/main/java/frc/robot/subsystems/launcher/Launcher.java#L73), triggering the animation whenever a note is released. [This video](https://youtube.com/shorts/-HxfDo9f19U?feature=share) shows how game piece animations can be used to visualize auto routines for several different games.

</details>

Expand Down
12 changes: 11 additions & 1 deletion docsSite/docs/tab-reference/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ Drag the desired field to the main view to get started. Each row represents an u

![Console view](./img/console-1.png)

The controls are similar to the 🔢 [Table](../tab-reference/table.md) tab. The selected time is synchronized across all tabs. Click a row to select it, or hover over a row to preview it in any visible pop-up windows. Clicking the ↓ button jumps to the selected time (or the time entered in the box). Enter text in the "Filter" input to only display rows which contain the filter text.
:::info
Click the color palette icon to toggle highlighting for warning and error messages. Messages are highlighted if they contain the text "warning" or "error".
:::

The controls are similar to the 🔢 [Table](../tab-reference/table.md) tab. The selected time is synchronized across all tabs. Click a row to select it, or hover over a row to preview it in any visible pop-up windows. Clicking the ↓ button jumps to the selected time (or the time entered in the box).

Enter text in the "Filter" input to only display rows which contain the filter text. Press `Ctrl+F` to quickly select the "Filter" input. Add a "!" at the start of the filter text to _exclude_ matching messages from the main view.

:::tip
Click the save icon to export the console data to a text file.
:::
Binary file modified docsSite/docs/tab-reference/img/console-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/tab-reference/img/line-graph-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/tab-reference/img/line-graph-3.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/tab-reference/img/line-graph-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docsSite/docs/tab-reference/joysticks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The timeline is used to control playback and visualization. Clicking on the time

The green sections of the timeline indicate when the robot is autonomous, and the blue sections indicate when the robot is teleoperated.

To zoom, place the cursor over the timeline and scroll up or down. A range can also be selecting by clicking and dragging while holding `Shift`. Move left and right by scrolling horizontally (on supported devices), or by clicking and dragging on the timeline. When connected live, scrolling to the left unlocks from the current time, and scrolling all the way to the right locks to the current time again.
To zoom, place the cursor over the timeline and scroll up or down. A range can also be selecting by clicking and dragging while holding `Shift`. Move left and right by scrolling horizontally (on supported devices), or by clicking and dragging on the timeline. When connected live, scrolling to the left unlocks from the current time, and scrolling all the way to the right locks to the current time again. Press `Ctrl+\` to zoom to the period where the robot is enabled.

![Timeline](./img/timeline.png)

Expand Down
12 changes: 9 additions & 3 deletions docsSite/docs/tab-reference/line-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
sidebar_position: 1
---

import Image2 from './img/line-graph-2.png';
import Image3 from './img/line-graph-3.png';
import Image4 from './img/line-graph-4.png';

# 📉 Line Graph

Expand All @@ -29,11 +29,17 @@ To get started, drag a field to one of the three sections (left, right, or discr
The color and line style of each field can be customized by clicking the colored icon or right-clicking on the field name.
:::

:::tip
Data from the WPILib [persistent alerts](https://docs.wpilib.org/en/latest/docs/software/telemetry/persistent-alerts.html) API can be visualized by adding the alerts group as a discrete field. An example visualization is shown below.

![Alerts visualization](./img/line-graph-2.png)
:::

### Adjusting Axes

By default, each axis adjusts its range based on the visible data. To disable auto-ranging and lock the range to its current min and max, click the three dots near the axis title and then `Lock Axis`. To manually adjust the range, choose `Edit Range...` and enter the desired values.

<img src={Image2} alt="Editing axis range" height="250" />
<img src={Image3} alt="Editing axis range" height="250" />

### Unit Conversion

Expand All @@ -43,7 +49,7 @@ To adjust the units for an axis, click the three dots near the axis title and th
To quickly enable or disable unit conversion, click the three dots near the axis title and choose `Recent Presets` or `Reset Units`.
:::

<img src={Image3} alt="Editing unit conversion" height="250" />
<img src={Image4} alt="Editing unit conversion" height="250" />

### Integration & Differentiation

Expand Down
Loading

0 comments on commit 8076e46

Please sign in to comment.