diff --git a/.gitignore b/.gitignore index 6a2b230273..7992ec4f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # Created by https://www.gitignore.io/api/linux,macos,windows,visualstudiocode # Edit at https://www.gitignore.io/?templates=linux,macos,windows,visualstudiocode +### Miscellaneous ### +.wpilib/ + ### Sphinx ### # Build directories build/ diff --git a/miktex-packages.txt b/miktex-packages.txt index 1b412eaf40..ef1978b13d 100644 --- a/miktex-packages.txt +++ b/miktex-packages.txt @@ -166,7 +166,6 @@ miktex-metapost miktex-metapost-bin-x64-2.9 miktex-mfware-bin-x64-2.9 miktex-misc -miktex-mkfntmap-bin-x64-2.9 miktex-mktex-bin-x64-2.9 miktex-mo-bin-x64-2.9 miktex-mpfr-bin-x64-2.9 @@ -256,3 +255,5 @@ zapfchan zapfding zerohyph zhmetrics +colortbl +letltxmacro diff --git a/poetry.lock b/poetry.lock index 9cfc0de0c6..bd243c65ad 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -304,14 +304,14 @@ redis = ["redis (>=2.10.5)"] [[package]] name = "certifi" -version = "2022.12.7" +version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] [[package]] @@ -1492,21 +1492,21 @@ six = ">=1.5" [[package]] name = "requests" -version = "2.29.0" +version = "2.31.0" description = "Python HTTP for Humans." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "requests-2.29.0-py3-none-any.whl", hash = "sha256:e8f3c9be120d3333921d213eef078af392fba3933ab7ed2d1cba3b56f2568c3b"}, - {file = "requests-2.29.0.tar.gz", hash = "sha256:f2e34a75f4749019bb0e3effb66683630e4ffeaf75819fb51bebef1bf5aef059"}, + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] [package.dependencies] certifi = ">=2017.4.17" charset-normalizer = ">=2,<4" idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" +urllib3 = ">=1.21.1,<3" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] @@ -1560,8 +1560,11 @@ files = [ {file = "ruamel.yaml.clib-0.2.7-cp310-cp310-win32.whl", hash = "sha256:763d65baa3b952479c4e972669f679fe490eee058d5aa85da483ebae2009d231"}, {file = "ruamel.yaml.clib-0.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:d000f258cf42fec2b1bbf2863c61d7b8918d31ffee905da62dede869254d3b8a"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:045e0626baf1c52e5527bd5db361bc83180faaba2ff586e763d3d5982a876a9e"}, - {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_12_6_arm64.whl", hash = "sha256:721bc4ba4525f53f6a611ec0967bdcee61b31df5a56801281027a3a6d1c2daf5"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:1a6391a7cabb7641c32517539ca42cf84b87b667bad38b78d4d42dd23e957c81"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:9c7617df90c1365638916b98cdd9be833d31d337dbcd722485597b43c4a215bf"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:41d0f1fa4c6830176eef5b276af04c89320ea616655d01327d5ce65e50575c94"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win32.whl", hash = "sha256:f6d3d39611ac2e4f62c3128a9eed45f19a6608670c5a2f4f07f24e8de3441d38"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:da538167284de58a52109a9b89b8f6a53ff8437dd6dc26d33b57bf6699153122"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4b3a93bb9bc662fc1f99c5c3ea8e623d8b23ad22f861eb6fce9377ac07ad6072"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_12_0_arm64.whl", hash = "sha256:a234a20ae07e8469da311e182e70ef6b199d0fbeb6c6cc2901204dd87fb867e8"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:15910ef4f3e537eea7fe45f8a5d19997479940d9196f357152a09031c5be59f3"}, diff --git a/source/docs/contributing/frc-docs/build-instructions.rst b/source/docs/contributing/frc-docs/build-instructions.rst index 3f945fdca1..910db8401f 100644 --- a/source/docs/contributing/frc-docs/build-instructions.rst +++ b/source/docs/contributing/frc-docs/build-instructions.rst @@ -13,15 +13,23 @@ Text Editors / IDE For development, we recommend that you use VS Code along with the `reStructuredText extension `_. However, any text editor will work. +By default, the reStructuredText extension enables linting with all doc8 features enabled. As frc-docs does not follow the line length lint, add the following to your VS Code ``settings.json`` to disable line length linting. + +.. code-block:: json + + "restructuredtext.linter.doc8.extraArgs": [ + "--ignore D001" + ] + Windows ^^^^^^^ .. note:: MikTeX and ``rsvg-convert`` are not required for building HTML, they are only required for Windows PDF builds. - `Python 3.9 `__ -- `MiKTeX `__ (Only needed for PDF builds) - `Perl `__ -- `rsvg-convert `__ +- `MiKTeX `__ (Only needed for PDF builds) +- `rsvg-convert `__ (Only needed for PDF builds) Ensure that Python is in your Path by selecting the **Add Python to PATH** toggle when installing Python. @@ -30,7 +38,7 @@ Ensure that Python is in your Path by selecting the **Add Python to PATH** toggl Once Python is installed, open up Powershell. Then navigate to the frc-docs directory. Run the following command: ``pip install -r source/requirements.txt`` -Install the missing MikTex packages by navigating to the frc-docs directory, then running the following command from Powershell: ``mpm --verbose --require=@miktex-packages.txt`` +Install the missing MikTex packages by navigating to the frc-docs directory, then running the following command from Powershell: ``miktex --verbose packages require --package-id-file miktex-packages.txt`` Linux (Ubuntu) ^^^^^^^^^^^^^^ diff --git a/source/docs/controls-overviews/control-system-hardware.rst b/source/docs/controls-overviews/control-system-hardware.rst index ee32c288b5..8a0aca8948 100644 --- a/source/docs/controls-overviews/control-system-hardware.rst +++ b/source/docs/controls-overviews/control-system-hardware.rst @@ -116,11 +116,25 @@ The power supply for an FRC robot is a single 12V 18Ah Sealed Lead Acid (SLA) ba Robot Signal Light ------------------ -.. image:: images/control-system-hardware/robot-signal-light.png - :alt: Orange Robot Signal Light - :width: 500 +.. tabs:: + + .. tab:: Allen-Bradley + + .. figure:: images/control-system-hardware/rsl-allenbradley.png + :alt: Orange Robot Signal Light (Allen-Bradley) + :width: 500 + + Allen-Bradley 855PB-B12ME522 + + .. tab:: AndyMark + + .. figure:: images/control-system-hardware/rsl-andymark.png + :alt: Orange Robot Signal Light (AndyMark) + :width: 500 + + AndyMark am-3583 -The Robot Signal Light (RSL) is required to be the Allen-Bradley 855PB-B12ME522. It is directly controlled by the roboRIO and will flash when enabled and stay solid while disabled. +The Robot Signal Light (RSL) is required to be either Allen-Bradley 855PB-B12ME522 or AndyMark am-3583. It is directly controlled by the roboRIO and will flash when enabled and stay solid while disabled. CTRE Pneumatics Control Module ------------------------------ diff --git a/source/docs/controls-overviews/images/control-system-hardware/robot-signal-light.png b/source/docs/controls-overviews/images/control-system-hardware/rsl-allenbradley.png similarity index 100% rename from source/docs/controls-overviews/images/control-system-hardware/robot-signal-light.png rename to source/docs/controls-overviews/images/control-system-hardware/rsl-allenbradley.png diff --git a/source/docs/controls-overviews/images/control-system-hardware/rsl-andymark.png b/source/docs/controls-overviews/images/control-system-hardware/rsl-andymark.png new file mode 100644 index 0000000000..7d3baa8ed5 Binary files /dev/null and b/source/docs/controls-overviews/images/control-system-hardware/rsl-andymark.png differ diff --git a/source/docs/hardware/hardware-basics/wiring-pneumatics-ph.rst b/source/docs/hardware/hardware-basics/wiring-pneumatics-ph.rst index 65d7c65500..f6c5bc19c9 100644 --- a/source/docs/hardware/hardware-basics/wiring-pneumatics-ph.rst +++ b/source/docs/hardware/hardware-basics/wiring-pneumatics-ph.rst @@ -5,6 +5,14 @@ This page describes wiring pneumatics with the REV Pneumatic Hub (PH). For instr .. hint:: For pneumatics safety & mechanical requirements, consult this year's Robot Construction rules. For mechanical design guidelines, the FIRST Pneumatics Manual is located `here `__ +.. raw:: html + +
+ +
+ +---- + Wiring Overview --------------- @@ -42,7 +50,7 @@ Analog An analog pressure switch (`REV-11-1107 `__ can be connected directly to the analog pressure sensor port 0 input terminals. Using an analog pressure sensor allows reading the pressure in the pneumatic system through code and setting custom trigger thresholds for turning on and off the compressor. -..warning:: The Analog Pressure Sensor port is a very tight fit and requires special attention. See `REV Wiring an Analog Pressure Sensor `__ for more tips +.. warning:: The Analog Pressure Sensor port is a very tight fit and requires special attention. See `REV Wiring an Analog Pressure Sensor `__ for more tips Solenoids --------- diff --git a/source/docs/hardware/sensors/encoders-hardware.rst b/source/docs/hardware/sensors/encoders-hardware.rst index aee39cc550..28f21c24af 100644 --- a/source/docs/hardware/sensors/encoders-hardware.rst +++ b/source/docs/hardware/sensors/encoders-hardware.rst @@ -52,6 +52,7 @@ On-shaft encoders couple to a shaft by fitting *around* it, forming a friction c Examples of On-shaft encoders: - `AMT103-V `__ available through FIRST Choice +- `CIMcoder `__ - `REV Through Bore Encoder `__ - `US Digital E4T `__ @@ -86,6 +87,7 @@ As each square wave pulse is a digital signal, quadrature encoders connect to th Examples of quadrature encoders: - `AMT103-V `__ available through FIRST Choice +- `CIMcoder `__ - `CTRE Mag Encoder `_ - `Grayhill 63r `__ - `REV Through Bore Encoder `__ diff --git a/source/docs/software/advanced-controls/controllers/combining-feedforward-feedback.rst b/source/docs/software/advanced-controls/controllers/combining-feedforward-feedback.rst index 224c8ddece..6daf869aca 100644 --- a/source/docs/software/advanced-controls/controllers/combining-feedforward-feedback.rst +++ b/source/docs/software/advanced-controls/controllers/combining-feedforward-feedback.rst @@ -12,7 +12,7 @@ Feedforward and feedback controllers can each be used in isolation, but are most Using Feedforward with a PIDController -------------------------------------- -Users familiar with the old ``PIDController`` class may notice the lack of any feedforward gain in the new controller. As users are expected to use the controller output themselves, there is no longer any need for the ``PIDController`` to implement feedforward - users may simply add any feedforward they like to the output of the controller before sending it to their motors: +Users may add any feedforward they like to the output of the controller before sending it to their motors: .. tabs:: diff --git a/source/docs/software/advanced-controls/controllers/pidcontroller.rst b/source/docs/software/advanced-controls/controllers/pidcontroller.rst index 4a1dec43a7..bb49f3c617 100644 --- a/source/docs/software/advanced-controls/controllers/pidcontroller.rst +++ b/source/docs/software/advanced-controls/controllers/pidcontroller.rst @@ -10,8 +10,6 @@ WPILib supports PID control of mechanisms through the ``PIDController`` class (` Using the PIDController Class ----------------------------- -.. note:: The ``PIDController`` class in the ``frc`` namespace is deprecated - C++ teams should use the one in the ``frc2`` namespace, instead. Likewise, Java teams should use the class in the ``edu.wpi.first.math.controller`` package. - Constructing a PIDController ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -38,8 +36,6 @@ Using the Feedback Loop Output .. note:: The ``PIDController`` assumes that the ``calculate()`` method is being called regularly at an interval consistent with the configured period. Failure to do this will result in unintended loop behavior. -.. warning:: Unlike the old ``PIDController``, the new PIDController does not automatically control an output from its own thread - users are required to call ``calculate()`` and use the resulting output in their own code. - Using the constructed ``PIDController`` is simple: simply call the ``calculate()`` method from the robot's main loop (e.g. the robot's ``autonomousPeriodic()`` method): .. tabs:: @@ -126,6 +122,35 @@ The range limits may be increased or decreased using the ``setIntegratorRange()` // the total loop output pid.SetIntegratorRange(-0.5, 0.5); +Disabling Integral Gain if the Error is Too High +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Another way integral "wind-up" can be alleviated is by limiting the error range where integral gain is active. This can be achieved by setting ``IZone``. If the error is more than ``IZone``, the total accumulated error is reset, disabling integral gain. When the error is equal to or less than IZone, integral gain is enabled. + +By default, ``IZone`` is disabled. + +``IZone`` may be set using the ``setIZone()`` method. To disable it, set it to infinity. + +.. tabs:: + + .. code-tab:: java + + // Disable IZone + pid.setIZone(Double.POSITIVE_INFINITY); + + // Integral gain will not be applied if the absolute value of the error is + // more than 2 + pid.setIZone(2); + + .. code-tab:: c++ + + // Disable IZone + pid.SetIZone(std::numeric_limits::infinity()); + + // Integral gain will not be applied if the absolute value of the error is + // more than 2 + pid.SetIZone(2); + Setting Continuous Input ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -152,8 +177,6 @@ To configure a ``PIDController`` to automatically do this, use the ``enableConti Clamping Controller Output -------------------------- -Unlike the old ``PIDController``, the new controller does not offer any output clamping features, as the user is expected to use the loop output themselves. Output clamping can be easily achieved by composing the controller with WPI's ``clamp()`` function (or ``std::clamp`` in c++): - .. tabs:: .. code-tab:: java diff --git a/source/docs/software/advanced-controls/controllers/trapezoidal-profiles.rst b/source/docs/software/advanced-controls/controllers/trapezoidal-profiles.rst index b77057b419..14e9e2af59 100644 --- a/source/docs/software/advanced-controls/controllers/trapezoidal-profiles.rst +++ b/source/docs/software/advanced-controls/controllers/trapezoidal-profiles.rst @@ -65,7 +65,7 @@ Putting It All Together .. note:: C++ is often able to infer the type of the inner classes, and thus a simple initializer list (without the class name) can be sent as a parameter. The full class names are included in the example below for clarity. -Now that we know how to create a set of constraints and the desired start/end states, we are ready to create our motion profile. The ``TrapezoidProfile`` constructor takes 3 parameters, in order: the constraints, the goal state, and the initial state. +Now that we know how to create a set of constraints and the desired start/end states, we are ready to create our motion profile. The ``TrapezoidProfile`` constructor takes 1 parameter: the constraints. .. tabs:: @@ -74,23 +74,15 @@ Now that we know how to create a set of constraints and the desired start/end st // Creates a new TrapezoidProfile // Profile will have a max vel of 5 meters per second // Profile will have a max acceleration of 10 meters per second squared - // Profile will end stationary at 5 meters - // Profile will start stationary at zero position - TrapezoidProfile profile = new TrapezoidProfile(new TrapezoidProfile.Constraints(5, 10), - new TrapezoidProfile.State(5, 0), - new TrapezoidProfile.State(0, 0)); + TrapezoidProfile profile = new TrapezoidProfile(new TrapezoidProfile.Constraints(5, 10)); .. code-tab:: c++ // Creates a new TrapezoidProfile // Profile will have a max vel of 5 meters per second // Profile will have a max acceleration of 10 meters per second squared - // Profile will end stationary at 5 meters - // Profile will start stationary at zero position frc::TrapezoidProfile profile{ - frc::TrapezoidProfile::Constraints{5_mps, 10_mps_sq}, - frc::TrapezoidProfile::State{5_m, 0_mps}, - frc::TrapezoidProfile::State{0_m, 0_mps}}; + frc::TrapezoidProfile::Constraints{5_mps, 10_mps_sq}}; Using a ``TrapezoidProfile`` ---------------------------- @@ -98,41 +90,47 @@ Using a ``TrapezoidProfile`` Sampling the Profile ^^^^^^^^^^^^^^^^^^^^ -Once we've created a ``TrapezoidProfile``, using it is very simple: to get the profile state at the given time after the profile has started, call the ``calculate()`` method: +Once we've created a ``TrapezoidProfile``, using it is very simple: to get the profile state at the given time after the profile has started, call the ``calculate()`` method with the goal state and initial state: .. tabs:: .. code-tab:: java + // Profile will end stationary at 5 meters + // Profile will start stationary at zero position // Returns the motion profile state after 5 seconds of motion - profile.calculate(5); + profile.calculate(5, new TrapezoidProfile.State(5, 0), new TrapezoidProfile.State(0, 0)); .. code-tab:: c++ + // Profile will end stationary at 5 meters + // Profile will start stationary at zero position // Returns the motion profile state after 5 seconds of motion - profile.Calculate(5_s); + profile.Calculate(5_s, + frc::TrapezoidProfile::State{5_m, 0_mps}, + frc::TrapezoidProfile::State{0_m, 0_mps}); Using the State ^^^^^^^^^^^^^^^ -The ``calculate`` method returns a ``TrapezoidProfile.State`` class (the same one that was used to specify the initial/end states when constructing the profile). To use this for actual control, simply pass the contained position and velocity values to whatever controller you wish (for example, a PIDController): +The ``calculate`` method returns a ``TrapezoidProfile.State`` class (the same one that was used to specify the initial/end states when calculating the profile state). To use this for actual control, simply pass the contained position and velocity values to whatever controller you wish (for example, a PIDController): .. tabs:: .. code-tab:: java - var setpoint = profile.calculate(elapsedTime); + var setpoint = profile.calculate(elapsedTime, goalState, initialState); controller.calculate(encoder.getDistance(), setpoint.position); .. code-tab:: c++ - auto setpoint = profile.Calculate(elapsedTime); + auto setpoint = profile.Calculate(elapsedTime, goalState, initialState); controller.Calculate(encoder.GetDistance(), setpoint.position.value()); Complete Usage Example ---------------------- -.. note:: In this example, the profile is re-computed every timestep. This is a somewhat different usage technique than is detailed above, but works according to the same principles - the profile is sampled at a time corresponding to the loop period to get the setpoint for the next loop iteration. +.. note:: In this example, the initial state is re-computed every timestep. This is a somewhat different usage technique than is detailed above, but works according to the same principles - the profile is sampled at a time corresponding to the loop period to get the setpoint for the next loop iteration. A more complete example of ``TrapezoidProfile`` usage is provided in the ElevatorTrapezoidProfile example project (`Java `__, `C++ `__): diff --git a/source/docs/software/advanced-controls/introduction/common-control-issues.rst b/source/docs/software/advanced-controls/introduction/common-control-issues.rst index 19d210e128..19d9c9bab5 100644 --- a/source/docs/software/advanced-controls/introduction/common-control-issues.rst +++ b/source/docs/software/advanced-controls/introduction/common-control-issues.rst @@ -11,7 +11,7 @@ Beware that if :math:`K_i` is too large, integral windup can occur. Following a There are a few ways to mitigate this: 1. Decrease the value of :math:`K_i`, down to zero if possible. -2. Add logic to reset the integrator term to zero if the :term:`output` is too far from the :term:`setpoint`. Some smart motor controllers implement this with a ``setIZone()`` method. +2. Add logic to reset the integrator term to zero if the :term:`output` is too far from the :term:`setpoint`. Some smart motor controllers and WPILib's ``PIDController`` implement this with a ``setIZone()`` method. 3. Cap the integrator at some maximum value. WPILib's ``PIDController`` implements this with the ``setIntegratorRange()`` method. .. important:: Most mechanisms in FRC do not require any integral control, and systems that seem to require integral control to respond well probably have an inaccurate feedforward model. diff --git a/source/docs/software/advanced-controls/introduction/tutorial-intro.rst b/source/docs/software/advanced-controls/introduction/tutorial-intro.rst index c7d3cd3ca3..1712cc5889 100644 --- a/source/docs/software/advanced-controls/introduction/tutorial-intro.rst +++ b/source/docs/software/advanced-controls/introduction/tutorial-intro.rst @@ -14,7 +14,7 @@ Parameter Exponential Search While interacting with the simulations, you will get instructions to "increase" or "decrease" different parameters. -When "increasing" a value, multiply it by two until the expected effect is observed. After the first time the value becomes too large (i.e. the behavior is unstable or the mechanism overshoots), reduce the value to halfway between the first too-large value encountered and the previous value tested before that. Continue iterating this "split-half" procedure to zero in on the optimal value (if the response undershoots, pick the halfway point between the new value and the last value immediately above it - if it overshoots, pick the halfway point between the new value and the last value immediately below it). This is called an term:`exponential search`, and is a very efficient way to find positive values of unknown scale. +When "increasing" a value, multiply it by two until the expected effect is observed. After the first time the value becomes too large (i.e. the behavior is unstable or the mechanism overshoots), reduce the value to halfway between the first too-large value encountered and the previous value tested before that. Continue iterating this "split-half" procedure to zero in on the optimal value (if the response undershoots, pick the halfway point between the new value and the last value immediately above it - if it overshoots, pick the halfway point between the new value and the last value immediately below it). This is called an :term:`exponential search`, and is a very efficient way to find positive values of unknown scale. System Noise ------------ @@ -32,4 +32,4 @@ Follow the order of tuning presented in the tutorials - it will maximize your ch Resist checking the tuning solutions until you believe your solution is close to correct. Then check your answer, and try the provided one to compare against your own results. -Furthermore, work from easy to difficult.:ref:`Flywheel mechanisms ` are the easiest to tune. After that, look into the :ref:`turret tuning `. Then, finish off with the :ref:`vertical arm example`. +Furthermore, work from easy to difficult. :ref:`Flywheel mechanisms ` are the easiest to tune. After that, look into the :ref:`turret tuning `. Then, finish off with the :ref:`vertical arm example`. diff --git a/source/docs/software/advanced-gradlerio/code-formatting.rst b/source/docs/software/advanced-gradlerio/code-formatting.rst index 1631b8df54..0e85315e54 100644 --- a/source/docs/software/advanced-gradlerio/code-formatting.rst +++ b/source/docs/software/advanced-gradlerio/code-formatting.rst @@ -176,9 +176,6 @@ Requirements ^^^^^^^^^^^^ - `Python 3.6 or higher `__ -- clang-format (included with `LLVM `__) - -.. important:: Windows is not currently supported at this time! Installing LLVM with Clang **will** break normal robot builds if installed on Windows. You can install `wpiformat `__ by typing ``pip3 install wpiformat`` into a terminal or command prompt. @@ -213,6 +210,6 @@ An example styleguide is shown below: You can turn this into a :doc:`CI check ` by running ``git --no-pager diff --exit-code HEAD``, as shown in the example GitHub Actions workflow below: -.. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/.github/workflows/lint-format.yml +.. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/5fac18ff4ad1db92ec6fcbd437043a38028e99c4/.github/workflows/lint-format.yml :language: yaml - :lines: 1-5, 12-40 + :lines: 1-5, 12-34 diff --git a/source/docs/software/can-devices/can-addressing.rst b/source/docs/software/can-devices/can-addressing.rst index 182b272770..d76d9b5218 100644 --- a/source/docs/software/can-devices/can-addressing.rst +++ b/source/docs/software/can-devices/can-addressing.rst @@ -191,24 +191,62 @@ For CAN Nodes to be accepted for use in the FRC System, they must: Universal Heartbeat ------------------- -The roboRIO provides a universal CAN heartbeat that any device on the bus can listen and react to. This heartbeat is sent every 20ms. The heartbeat has a full CAN ID of ``0x01011840`` (which is the NI Manufacturer ID, RobotController type, Device ID 0 and API ID ``0x062``). It is an 8 byte CAN packet. The important byte in here is byte 5 (index 4). The layout is the following bitfield. - -+-----------------+-------+ -| Description | Width | -+=================+=======+ -| RedAlliance | 1 | -+-----------------+-------+ -| Enabled | 1 | -+-----------------+-------+ -| Autonomous | 1 | -+-----------------+-------+ -| Test | 1 | -+-----------------+-------+ -| WatchdogEnabled | 1 | -+-----------------+-------+ -| Reserved | 3 | -+-----------------+-------+ - -The flag to watch for is ``WatchdogEnabled``. If that flag is set, that means motor controllers are enabled. - -If 100ms has passed since this packet was received, the robot program can be considered hung, and devices should act as if the robot has been disabled. +The roboRIO provides a universal CAN heartbeat that any device on the bus can listen and react to. This heartbeat is sent every 20 ms. The heartbeat has a full CAN ID of ``0x01011840`` (which is the NI Manufacturer ID, RobotController type, Device ID 0 and API ID ``0x061``). It is an 8 byte CAN packet with the following bitfield layout. + ++-----------------------+------+--------------+ +| Description | Byte | Width (bits) | ++=======================+======+==============+ +| Match time (seconds) | 8 | 8 | ++-----------------------+------+--------------+ +| Match number | 6-7 | 10 | ++-----------------------+------+--------------+ +| Replay number | 6 | 6 | ++-----------------------+------+--------------+ +| Red alliance | 5 | 1 | ++-----------------------+------+--------------+ +| Enabled | 5 | 1 | ++-----------------------+------+--------------+ +| Autonomous mode | 5 | 1 | ++-----------------------+------+--------------+ +| Test mode | 5 | 1 | ++-----------------------+------+--------------+ +| System watchdog | 5 | 1 | ++-----------------------+------+--------------+ +| Tournament type | 5 | 3 | ++-----------------------+------+--------------+ +| Time of day (year) | 4 | 6 | ++-----------------------+------+--------------+ +| Time of day (month) | 3-4 | 4 | ++-----------------------+------+--------------+ +| Time of day (day) | 3 | 5 | ++-----------------------+------+--------------+ +| Time of day (seconds) | 2-3 | 6 | ++-----------------------+------+--------------+ +| Time of day (minutes) | 1-2 | 6 | ++-----------------------+------+--------------+ +| Time of day (hours) | 1 | 5 | ++-----------------------+------+--------------+ + +.. code-block:: c++ + + struct [[gnu::packed]] RobotState { + uint64_t matchTimeSeconds : 8; + uint64_t matchNumber : 10; + uint64_t replayNumber : 6; + uint64_t redAlliance : 1; + uint64_t enabled : 1; + uint64_t autonomous : 1; + uint64_t testMode : 1; + uint64_t systemWatchdog : 1; + uint64_t tournamentType : 3; + uint64_t timeOfDay_yr : 6; + uint64_t timeOfDay_month : 4; + uint64_t timeOfDay_day : 5; + uint64_t timeOfDay_sec : 6; + uint64_t timeOfDay_min : 6; + uint64_t timeOfDay_hr : 5; + }; + +If the ``System watchdog`` flag is set, motor controllers are enabled. If 100 ms has passed since this packet was received, the robot program can be considered hung, and devices should act as if the robot has been disabled. + +Note that all fields except ``Enabled``, ``Autonomous mode``, ``Test mode``, and ``System watchdog`` will contain invalid values until an arbitrary time after the Driver Station connects. diff --git a/source/docs/software/can-devices/third-party-devices.rst b/source/docs/software/can-devices/third-party-devices.rst index d7f932225a..6d3543c73a 100644 --- a/source/docs/software/can-devices/third-party-devices.rst +++ b/source/docs/software/can-devices/third-party-devices.rst @@ -109,3 +109,16 @@ PWF Sensors - API Documentation (`Java `__, `C++ `__) - `Technical Manual `__ + +Redux Robotics +-------------- + +Redux Robotics currently offers the Canandcoder CAN + PWM magnetic encoder. + +Redux Sensors +^^^^^^^^^^^^^ + +- **Canandcoder** + + - API Documentation (`Java `__, `C++ `__) + - `Technical Manual `__ diff --git a/source/docs/software/commandbased/command-based-changes.rst b/source/docs/software/commandbased/command-based-changes.rst deleted file mode 100644 index 297d6a4d77..0000000000 --- a/source/docs/software/commandbased/command-based-changes.rst +++ /dev/null @@ -1,83 +0,0 @@ -2020 Command-Based Rewrite: What Changed? -========================================= - -This article provides a summary of changes from the original command-based framework to the 2020 rewrite. This summary is not necessarily comprehensive - for rigorous documentation, as always, refer to the API docs (`Java `__, `C++ `__). - -Package Location ----------------- - -The new command-based framework is located in the ``wpilibj2`` package for Java, and in the ``frc2`` namespace for C++. The new framework must be installed using the instructions: :ref:`docs/software/vscode-overview/3rd-party-libraries:WPILib Command Libraries`. - -Major Architectural Changes ---------------------------- - -The overall structure of the command-based framework has remained largely the same. However, there are some still a few major architectural changes that users should be aware of: - -Commands and Subsystems as Interfaces -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -``Command`` (`Java `__, `C++ `__) and ``Subsystem`` (`Java `__, `C++ `__) are both now interfaces as opposed to abstract classes, allowing advanced users more potential flexibility. ``CommandBase`` and ``SubsystemBase`` abstract base classes are still provided for convenience, but are not required. For more information, see :doc:`commands` and :doc:`subsystems`. - -Multiple Command Group Classes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``CommandGroup`` class no longer exists, and has been replaced by a number of narrower classes that can be recursively composed to create more-complicated group structures. For more information see :doc:`command-compositions`. - -Inline Command Definitions -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Previously, users were required to write a subclass of ``Command`` in almost all cases where a command was needed. Many of the new commands are designed to allow inline definition of command functionality, and so can be used without the need for an explicit subclass. For more information, see :ref:`docs/software/commandbased/commands:Included Command Types`. - -Injection of Command Dependencies -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -While not an actual change to the coding of the library, the recommended use pattern for the new command-based framework utilizes injection of subsystem dependencies into commands, so that subsystems are not declared as globals. This is a cleaner, more maintainable, and more reusable pattern than the global subsystem pattern promoted previously. For more information, see :doc:`structuring-command-based-project`. - -Command Ownership (C++ Only) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The previous command framework required users to use raw pointers for all commands, resulting in nearly-unavoidable memory leaks in all C++ command-based projects, as well as leaving room for common errors such as double-allocating commands within command-groups. - -The new command framework offers ownership management for all commands. Default commands and commands bound to buttons are typically owned by the scheduler, and component commands are owned by their encapsulating command groups. As a result, users should generally never heap-allocate a command with ``new`` unless there is a very good reason to do so. - -Transfer of ownership is done using `perfect forwarding `__, meaning rvalues will be *moved* and lvalues will be *copied* (`rvalue/lvalue explanation `__). - -Changes to the Scheduler ------------------------- - -* ``Scheduler`` has been renamed to ``CommandScheduler`` (`Java `__, `C++ `__). -* Interruptibility of commands is now the responsibility of the scheduler, not the commands, and can be specified during the call to ``schedule``. -* Users can now pass actions to the scheduler which are taken whenever a command is scheduled, interrupted, or ends normally. This is highly useful for cases such as event logging. - -Changes to Subsystem --------------------- - -.. note:: For more information on subsystems, see :doc:`subsystems`. - -* As noted earlier, ``Subsystem`` is now an interface (`Java `__, `C++ `__); the closest equivalent of the old ``Subsystem`` is the new ``SubsystemBase`` class. Many of the Sendable-related constructor overloads have been removed to reduce clutter; users can call the setters directly from their own constructor, if needed. -* ``initDefaultCommand`` has been removed; subsystems no longer need to "know about" their default commands, which are instead registered directly with the ``CommandScheduler``. The new ``setDefaultCommand`` method simply wraps the ``CommandScheduler`` call. -* Subsystems no longer "know about" the commands currently requiring them; this is handled exclusively by the ``CommandScheduler``. A convenience wrapper on the ``CommandScheduler`` method is provided, however. - -Changes to Command ------------------- - -.. note:: For more information on commands, see :doc:`commands`. - -* As noted earlier, ``Command`` is now an interface (`Java `__, `C++ `__); the closest equivalent of the old ``Command`` is the new ``CommandBase`` class. Many of the Sendable-related constructor overloads have been removed to reduce clutter; users can call the setters directly from their own constructor, if needed. -* Commands no longer handle their own scheduling state; this is now the responsibility of the scheduler. -* The ``interrupted()`` method has been rolled into the ``end()`` method, which now takes a parameter specifying whether the command was interrupted (``false`` if it ended normally). -* The ``requires()`` method has been renamed to ``addRequirement()``. -* ``void setRunsWhenDisabled(boolean disabled)`` has been replaced by an overridable :ref:`docs/software/commandbased/commands:runsWhenDisabled` method. -* ``void setInterruptible(boolean interruptible)`` has been replaced by an overridable :ref:`docs/software/commandbased/commands:getInterruptionBehavior` method. -* Several :ref:`"decorator" methods ` have been added to allow easy inline modification of commands (e.g. adding a timeout). -* (C++ only) In order to allow the decorators to work with the command ownership model, a :term:`CRTP` is used via the ``CommandHelper`` `class `__. Any user-defined Command subclass ``Foo`` *must* extend ``CommandHelper`` where ``Base`` is the desired base class. - -Changes to PIDSubsystem/PIDCommand ----------------------------------- - -.. note:: For more information, see :doc:`pid-subsystems-commands`, and :ref:`docs/software/advanced-controls/controllers/pidcontroller:PID Control in WPILib` - -* Following the changes to PIDController, these classes now run synchronously from the main robot loop. -* The ``PIDController`` is now injected through the constructor, removing many of the forwarding methods. It can be modified after construction with ``getController()``. -* ``PIDCommand`` is intended largely for inline use, as shown in the GyroDriveCommands example (`Java `__, `C++ `__). -* If users wish to use PIDCommand more "traditionally," overriding the protected ``returnPIDInput()`` and ``usePIDOutput(double output)`` methods has been replaced by modifying the protected ``m_measurement`` and ``m_useOutput`` fields. Similarly, rather than calling ``setSetpoint``, users can modify the protected ``m_setpoint`` field. diff --git a/source/docs/software/commandbased/cpp-command-discussion.rst b/source/docs/software/commandbased/cpp-command-discussion.rst index 0cc5e88798..79a0162dcc 100644 --- a/source/docs/software/commandbased/cpp-command-discussion.rst +++ b/source/docs/software/commandbased/cpp-command-discussion.rst @@ -4,7 +4,7 @@ A Technical Discussion on C++ Commands This article will help you understand the reasoning behind some of the decisions made in the 2020 command-based framework (such as the use of ``std::unique_ptr``, CRTP in the form of ``CommandHelper``, etc.). You do not need to understand the information within this article to use the command-based framework in your robot code. -.. note:: The model was further changed in 2023, as described `below <#2023 Updates>`_. +.. note:: The model was further changed in 2023, as described :ref:`below `. Ownership Model --------------- @@ -187,7 +187,7 @@ After a few years in the new command-based framework, the recommended way to cre A significant root cause of most pain points was commands being passed by value in a non-polymorphic way. This made object slicing mistakes rather easy, and changes in composition structure could propagate type changes throughout the codebase: for example, if a ``ParallelRaceGroup`` were changed to a ``ParallelDeadlineGroup``, those type changes would propagate through the codebase. Passing around the object as a ``Command`` (as done in Java) would result in object slicing. -Additionally, various decorators weren't supported in C++ due to reasons described `above <#Templating Decorators>`_. As long as decorators were rarely used and were mainly to reduce verbosity (where Java was more verbose than C++), this was less of a problem. Once heavy usage of decorators was recommended, this became more of an issue. +Additionally, various decorators weren't supported in C++ due to reasons described :ref:`above `. As long as decorators were rarely used and were mainly to reduce verbosity (where Java was more verbose than C++), this was less of a problem. Once heavy usage of decorators was recommended, this became more of an issue. ``CommandPtr`` ^^^^^^^^^^^^^^ diff --git a/source/docs/software/commandbased/index.rst b/source/docs/software/commandbased/index.rst index 8ae0c93c62..acf476bdbe 100644 --- a/source/docs/software/commandbased/index.rst +++ b/source/docs/software/commandbased/index.rst @@ -1,8 +1,6 @@ Command-Based Programming ========================= -.. note:: Old (pre-2020) command-based is no longer available in 2023. Users should migrate to the new command-based framework below. Documentation for old command-based is available `here `_. - This sequence of articles serves as an introduction to and reference for the WPILib command-based framework. For a collection of example projects using the command-based framework, see :ref:`docs/software/examples-tutorials/wpilib-examples:Command-Based Examples`. @@ -22,7 +20,6 @@ For a collection of example projects using the command-based framework, see :ref pid-subsystems-commands profile-subsystems-commands profilepid-subsystems-commands - command-based-changes Passing Functions As Parameters ------------------------------- diff --git a/source/docs/software/commandbased/profile-subsystems-commands.rst b/source/docs/software/commandbased/profile-subsystems-commands.rst index 890b91b34a..c13add5cf5 100644 --- a/source/docs/software/commandbased/profile-subsystems-commands.rst +++ b/source/docs/software/commandbased/profile-subsystems-commands.rst @@ -144,7 +144,7 @@ The ``TrapezoidProfileCommand`` class (`Java `. Both methods ultimately extremely similar, and ultimately the choice of which to use comes down to where the user desires that the relevant code be located. +A ``TrapezoidProfileCommand`` can be created two ways - by subclassing the ``TrapezoidProfileCommand`` class, or by defining the command :ref:`inline `. Both methods are ultimately extremely similar, and ultimately the choice of which to use comes down to where the user desires that the relevant code be located. .. note:: If subclassing ``TrapezoidProfileCommand`` and overriding any methods, make sure to call the ``super`` version of those methods! Otherwise, motion profiling functionality will not work properly. @@ -154,30 +154,40 @@ In either case, a ``TrapezoidProfileCommand`` is created by passing the necessar .. group-tab:: Java - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/TrapezoidProfileCommand.java :language: java - :lines: 25-34 + :lines: 28-43 :linenos: - :lineno-start: 25 + :lineno-start: 28 .. group-tab:: C++ - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibNewCommands/src/main/native/include/frc2/command/TrapezoidProfileCommand.h :language: c++ - :lines: 35-45 + :lines: 35-49 :linenos: :lineno-start: 35 profile ~~~~~~~ -The ``profile`` parameter is the ``TrapezoidProfile`` object that will be executed by the command. By passing this in, users specify the start state, end state, and motion constraints of the profile that the command will use. +The ``profile`` parameter is the ``TrapezoidProfile`` object that will be executed by the command. By passing this in, users specify the motion constraints of the profile that the command will use. output ~~~~~~ The ``output`` parameter is a function (usually passed as a :ref:`lambda `) that consumes the output and setpoint of the control loop. Passing in the ``useOutput`` function in ``PIDCommand`` is functionally analogous to overriding the `useState()`_ function in ``PIDSubsystem``. +goal +~~~~ + +The ``goal`` parameter is a function that supplies the desired state of the motion profile. This can be used to change the goal at runtime if desired. + +currentState +~~~~~~~~~~~~ + +The ``currentState`` parameter is a function that supplies the starting state of the motion profile. Combined with ``goal``, this can be used to dynamically generate and follow any motion profile at runtime. + requirements ~~~~~~~~~~~~ @@ -192,7 +202,7 @@ What does a ``TrapezoidProfileSubsystem`` look like when used in practice? The .. group-tab:: Java - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/drivedistanceoffboard/commands/DriveDistanceProfiled.java + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/drivedistanceoffboard/commands/DriveDistanceProfiled.java :language: java :lines: 5- :linenos: @@ -200,7 +210,7 @@ What does a ``TrapezoidProfileSubsystem`` look like when used in practice? The .. group-tab:: C++ (Header) - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/include/commands/DriveDistanceProfiled.h + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/include/commands/DriveDistanceProfiled.h :language: c++ :lines: 5- :linenos: @@ -208,7 +218,7 @@ What does a ``TrapezoidProfileSubsystem`` look like when used in practice? The .. group-tab:: C++ (Source) - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/commands/DriveDistanceProfiled.cpp + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibcExamples/src/main/cpp/examples/DriveDistanceOffboard/cpp/commands/DriveDistanceProfiled.cpp :language: c++ :lines: 5- :linenos: @@ -220,16 +230,16 @@ And, for an :ref:`inlined `). +- **Tab Control** - Control to switch between the Graph (Data and Events vs. Time) and Event List displays. Using the Graph Display ----------------------- @@ -45,18 +50,50 @@ Using the Graph Display .. image:: images/driver-station-log-viewer/graphdisplay.png :alt: The different parts of the graph screen and some of the basic signals. -The Graph Display contains the following information: +.. note:: The following information was obtained by a robot that was tethered to a DS with no FMS present. + +In the default view, the Graph Display contains the following information: + +- **Trip Time** in *ms* (green line, represented as "Network Latency") and Lost Packets per second (displayed as orange vertical bars, "Packets Dropped"). In this above figure, Trip Time can be seen fluctuating at the bottom of the graph and there are lost packets throughout the capture duration of the log. +- **Battery Voltage** in *volts* displayed as a yellow line. +- **roboRIO CPU usage** as a *percentage* as a red line. +- **CAN Utilization** as a *percentage* as a light grey line. +- **Robot Mode** and **DS Mode**. The top set of the display shows the mode commanded by the Driver Station. The bottom set shows the mode reported by the robot code. +- **Log Events** (event markers) will be displayed on the graph indicating the time the event occurred. Errors will display in red; warnings will display in yellow; status events will display in green; disconnections will display in orange. Hovering over an event marker will display information about the event in the Messages box at the bottom left of the screen. + + - **Major events** are shown as vertical lines across the graph display (in this example, a disconnection event occurred towards the end of the log). -1. Graphs of Trip Time in ms (green line) and Lost Packets per second (displayed as blue vertical bars). In these example images Trip Time is a flat green line at the bottom of the graph and there are no lost packets -2. Graph of Battery voltage displayed as a yellow line. -3. Graph of roboRIO CPU % as a red line -4. Graph of robot mode and DS mode. The top set of the display shows the mode commanded by the Driver Station. The bottom set shows the mode reported by the robot code. In this example the robot is not reporting it's mode during the disabled and autonomous modes, but is reported during Teleop. -5. Event markers will be displayed on the graph indicating the time the event occurred. Errors will display in red; warnings will display in yellow. Hovering over an event marker will display information about the event in the Messages box at the bottom left of the screen. -6. Major events are shown as vertical lines across the graph display. To zoom in on a portion of the graph, click and drag around the desired viewing area. You can only zoom the time axis, you cannot zoom vertically. +Customizing the Graph Display +----------------------------- + +It is possible to change which data is being plotted on the graph display at any given time. + +Advancements in the roboRIO control system (particularly resulting from the tight integration of components using CAN) enable teams to communicate with devices within the network using libraries and obtain data using the log viewer. As such, with most modern robot configurations, the following information is available to be visualized: + +Default view: + +- Trip Time +- Lost Packets +- Voltage +- roboRIO CPU % +- CAN % +- Robot Mode / DS Mode + + - Robot/DS Disable + - Robot/DS Auto + - Robot/DS Tele + +The view can be customized using the "Plots" tab in the upper right hand corner of the log viewer. As an example, the following data collected from a robot can graphed: + +.. image:: images/driver-station-log-viewer/DriverStation_LogDataSelection.png + :alt: Example of data that could be toggled on/off in a graph display. + +.. note:: A :term:`PDP` was connected to the robot at the time this log was collected, and as such all 15 channels can be visualized. This will differ compared to a log collected from a robot using a :term:`PDH`, whereas an upper limit of 23 channels exist to be monitored. + Event List ---------- @@ -65,6 +102,8 @@ Event List The Event List tab displays a list of events (warnings and errors) recorded by the Driver Station. The events and detail displayed are determined by the currently active filter (images shows "All Events, All Info" filter active). +.. _filters-1: + Filters ------- diff --git a/source/docs/software/driverstation/driver-station-log-viewer.rst.bak b/source/docs/software/driverstation/driver-station-log-viewer.rst.bak new file mode 100644 index 0000000000..7ce96da8c4 --- /dev/null +++ b/source/docs/software/driverstation/driver-station-log-viewer.rst.bak @@ -0,0 +1,171 @@ +.. include:: + +Driver Station Log File Viewer +============================== + +In an effort to provide information to aid in debugging, the FRC\ |reg| Driver Station creates log files of important diagnostic data while running. These logs can be reviewed later using the FRC Driver Station Log Viewer. The Log Viewer can be found via the shortcut installed in the Start menuin the FRC Driver Station folder in Program Files, or via the Gear icon in the Driver Station. + +.. image:: images/driver-station-log-viewer/open_ds_log_viewer_from_driver_station.png + :alt: Showing how to open the Log Viewer screen using the right console icon. + +.. note:: Several third-party tools exist that provide similar functionality to the FRC Driver Station Log Viewer, including `AdvantageScope `__ and `DSLOG Reader `__. Note that WPILib offers no support for third-party projects. + +Event Logs +---------- + +The Driver Station logs all messages sent to the Messages box on the Diagnostics tab (not the User Messages box on the Operation tab) into a new Event Log file. When viewing Log Files with the Driver Station Log File Viewer, the Event Log and DSLog files are overlaid in a single display. + +Log files are stored in ``C:\Users\Public\Documents\FRC\Log Files``. Each log has date and timestamp in the file name and has two files with extension ``.dslog`` and ``.dsevents``. + +Log Viewer UI +------------- + +.. image:: images/driver-station-log-viewer/logviewer.png + :alt: Overview of the home Log Viewer screen. + +The Log Viewer contains a number of controls and displays to aid in the analysis of the Driver Station log files: + +- **Log File Selection Box** - This window displays all available log files in the currently selected folder (directory). +- **Active Log File Directory** - This box displays the current path that the DS is using to locate log files. This defaults to the folder that the Driver Station stores log files in. Click the folder icon to browse to a different location. +- **Message Box** - This box displays a summary of all messages from the Event Log. When hovering over an event on the graph this box changes to display the information for that event. +- **Scroll Bar** (Not Pictured) - When the graph is zoomed in, a scroll bar appears for both the corresponding axes, allowing for scrolling of the graph. +- **Graph Display Modifiers** - These controls, explained below, directly manipulate the current graph display. + + - Voltage Filter - This control turns the Voltage Filter on and off (defaults to on). The Voltage Filter filters out data such as CPU %, robot mode and trip time when no Battery Voltage is received (indicating that the DS is not in communication with the roboRIO). + - AutoScale - This button zooms the graph out to show all data in the log. + - Match Length - This button scales the graph to approximately the length of an FRC match (2 minutes and 30 seconds shown). It does not automatically locate the start of the match, you will have to scroll using the scroll bar to locate the beginning of the Autonomous mode. + +- **Graph Display** - This area shows graph data from the DS Log file (voltage, trip time, roboRIO CPU %, etc.) as well as overlaid event data (shown as dots on the graph with select events showing as vertical lines across the entire graph). Hovering over event markers on the graph displays information about the event in the Message Box window in the bottom left area of the screen. + + - X-Axis: Time Duration of Log in *seconds* (s) + - Y-Axis (Left): Latency (ms), Packet Loss (%), roboRIO CPU %, CAN %, Battery Voltage + - Y-Axis (Right): :term:`PDP` Amperage + +- **Filter Mode** - Drop-down to select the filter mode (see :ref:`filters `). +- **Tab Control** - Control to switch between the Graph (Data and Events vs. Time) and Event List displays. + +Using the Graph Display +----------------------- + +.. image:: images/driver-station-log-viewer/graphdisplay.png + :alt: The different parts of the graph screen and some of the basic signals. + +.. note:: The following information was obtained by a robot that was tethered to a DS with no FMS present. + +In the default view, the Graph Display contains the following information: + +- **Trip Time** in *ms* (green line, represented as "Network Latency") and Lost Packets per second (displayed as orange vertical bars, "Packets Dropped"). In this above figure, Trip Time can be seen fluctuating at the bottom of the graph and there are lost packets throughout the capture duration of the log. +- **Battery Voltage** in *volts* displayed as a yellow line. +- **roboRIO CPU usage** as a *percentage* as a red line. +- **CAN Utilization** as a *percentage* as a light grey line. +- **Robot Mode** and **DS Mode**. The top set of the display shows the mode commanded by the Driver Station. The bottom set shows the mode reported by the robot code. +- **Log Events** (event markers) will be displayed on the graph indicating the time the event occurred. Errors will display in red; warnings will display in yellow; status events will display in green; disconnections will display in orange. Hovering over an event marker will display information about the event in the Messages box at the bottom left of the screen. + + - **Major events** are shown as vertical lines across the graph display (in this example, a disconnection event occurred towards the end of the log). + + +To zoom in on a portion of the graph, click and drag around the desired viewing +area. You can only zoom the time axis, you cannot zoom vertically. + +Customizing the Graph Display +----------------------------- + +It is possible to change which data is being plotted on the graph display at any given time. + +Advancements in the roboRIO control system (particularly resulting from the tight integration of components using CAN) enable teams to communicate with devices within the network using libraries and obtain data using the log viewer. As such, with most modern robot configurations, the following information is available to be visualized: + +Default view: + +- Trip Time +- Lost Packets +- Voltage +- roboRIO CPU % +- CAN % +- Robot Mode / DS Mode + + - Robot/DS Disable + - Robot/DS Auto + - Robot/DS Tele + +The view can be customized using the "Plots" tab in the upper right hand corner of the log viewer. As an example, the following data collected from a robot can graphed: + +.. image:: images/driver-station-log-viewer/DriverStation_LogDataSelection.png + :alt: Example of data that could be toggled on/off in a graph display. + +.. note:: A :term:`PDP` was connected to the robot at the time this log was collected, and as such all 15 channels can be visualized. This will differ compared to a log collected from a robot using a :term:`PDH`, whereas an upper limit of 23 channels exist to be monitored. + +Event List +---------- + +.. image:: images/driver-station-log-viewer/DS_LogFileViewer_Events.png + :alt: Event List that is gotten to by the tab at the top center. + +The Event List tab displays a list of events (warnings and errors) recorded by the Driver Station. The events and detail displayed are determined by the currently active filter (images shows "All Events, All Info" filter active). + +.. _filters-1: + +Filters +------- + +Three filters are currently available in the Log Viewer: + +1. Default: This filter filters out many of the errors and warnings produced by the Driver Station. This filter is useful for identifying errors thrown by the code on the Robot. +2. All Events and Time: This filter shows all events and the time they occurred +3. All Events, All Info: This filter shows all events and all recorded info. At this time the primary difference between this filter and "All Events and Time" is that this option shows the "unique" designator for the first occurrence of a particular message. + +Identifying Logs from Matches +----------------------------- + +.. image:: images/driver-station-log-viewer/identifyinglogs.png + :alt: To identify a log from a match look for the "FMS Connected" message then the match number. + +A common task when working with the Driver Station Logs is to identify which logs came from competition matches. Logs which were taken during a match can now be identified using the FMS Connected event which will display the match type (Practice, Qualification or Elimination), match number, and the current time according to the FMS server. In this example, you can see that the FMS server time and the time of the Driver Station computer are fairly close, approximately 7 seconds apart. + +Identifying Common Connection Failures with the Log Viewer +---------------------------------------------------------- + +When diagnosing robot issues, there is no substitute for thorough knowledge of the system and a methodical debugging approach. If you need assistance diagnosing a connection problem at your events it is strongly recommended to seek assistance from your FTA and/or CSA. The goal of this section is to familiarize teams with how some common failures can manifest themselves in the DS Log files. Please note that depending on a variety of conditions a particular failure show slightly differently in a log file. + +.. note:: Note that all log files shown in this section have been scaled to match length using the Match Length button and then scrolling to the beginning of the autonomous mode. Also, many of the logs do not contain battery voltage information, the platform used for log capture was not properly wired for reporting the battery voltage. + +.. tip:: Some error messages that are found in the Log Viewer are show below and more are detailed in the :doc:`driver-station-errors-warnings` article. + +"Normal" Log +~~~~~~~~~~~~ + +.. image:: images/driver-station-log-viewer/normallog.png + :alt: A normal graph and a couple of harmless events. + +This is an example of a normal match log. The errors and warnings contained in the first box are from when the DS first started and can be ignored. This is confirmed by observing that these events occurred prior to the "FMS Connected:" event. The last event shown can also be ignored, it is also from the robot first connecting to the DS (it occurs 3 seconds after connecting to FMS) and occurs roughly 30 seconds before the match started. + +Disconnected from FMS +~~~~~~~~~~~~~~~~~~~~~ + +.. image:: images/driver-station-log-viewer/disconnectedfromfms.png + :alt: A disconnect can cause the log to be split into two pieces but will at least haved events showing the disconnect. + +When the DS disconnects from FMS, and therefore the robot, during the match it may segment the log into pieces. The key indicators to this failure are the last event of the first log, indicating that the connection to FMS is now "bad" and the second event from the 2nd log which is a new FMS connected message followed by the DS immediately transitioning into Teleop Enabled. The most common cause of this type of failure is an ethernet cable with no latching tab or a damaged ethernet port on the DS computer. + +roboRIO Reboot +~~~~~~~~~~~~~~ + +.. image:: images/driver-station-log-viewer/roborioreboot.png + :alt: A roboRIO reboot is most evident by a "Time since robot boot" message. + +The "Time since robot boot" message is the primary indicator in a connection failure caused by the roboRIO rebooting. In this log the DS loses connection with the roboRIO at 3:01:36 as indicated by the first event. The second event indicates that the ping initiated after the connection failed was successful to all devices other than the roboRIO. At 3:01:47 the roboRIO begins responding to pings again, one additional ping fails at 3:01:52. At 3:02:02 the Driver Station connects to the roboRIO and the roboRIO reports that it has been up for 3.682 seconds. This is a clear indicator that the roboRIO has rebooted. The code continues to load and at 3:02:24 the code reports an error communicating with the camera. A warning is also reported indicating that no robot code is running right before the code finishes starting up. + +Ethernet cable issue on robot +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. image:: images/driver-station-log-viewer/ethernetcableissue.png + :alt: This issue is evident because the driverstation could connect to the radio but not the roboRIO yet the roboRIO hadn't rebooted. + +An issue with the ethernet cable on the robot is primarily indicated by the ping to the roboRIO going to bad and Radio Lost and Radio Seen events when the roboRIO reconnects. The "Time since robot boot" message when the roboRIO reconnects will also indicate that the roboRIO has not rebooted. In this example, the robot Ethernet cable was disconnected at 3:31:38. The ping status indicates that the radio is still connected. When the robot reconnects at 3:32:08 the "Tim since robot boot" is 1809 seconds indicating that the roboRIO clearly did not reboot. At 3:32:12 the robot indicates that it lost the radio 24.505 seconds ago and it returned 0.000 seconds ago. These points are plotted as vertical lines on the graph, yellow for radio lost and green for radio seen. Note that the times are slightly offset from the actual events as shown via the disconnection and connection, but help to provide additional information about what is occurring. + +Radio reboot +~~~~~~~~~~~~ + +.. image:: images/driver-station-log-viewer/radioreboot.png + :alt: The ping here shows the roboRIO and the radio as BAD. + +A reboot of the robot radio is typically characterized by a loss of connection to the radio for ~40-45 seconds. In this example, the radio briefly lost power at 3:22:44, causing it to start rebooting. The event at 3:22:45 indicates that the ping to the radio failed. At 3:23:11, the DS regains communication with the roboRIO and the roboRIO indicates it has been up for 1272.775 seconds, ruling out a roboRIO reboot. Note that the network switch on the radio comes back up very quickly so a momentary power loss may not result in a "radio lost"/"radio seen" event pair. A longer disturbance may result in radio events being logged by the DS. In that case, the distinguishing factor which points towards a radio reboot is the ping status of the radio from the DS. If the radio resets, the radio will be unreachable. If the issue is a cabling or connection issue on the robot, the radio ping should remain "GOOD". diff --git a/source/docs/software/driverstation/driver-station.rst b/source/docs/software/driverstation/driver-station.rst index 8d9d179589..53923e0cc8 100644 --- a/source/docs/software/driverstation/driver-station.rst +++ b/source/docs/software/driverstation/driver-station.rst @@ -79,6 +79,8 @@ The Operations Tab is used to control the mode of the robot and provide addition Diagnostics Tab --------------- +.. warning:: This section needs to be corrected/rewritten on account of the new figures added. + .. image:: images/driver-station/ds-diagnostics-tab.png :alt: This is the second tab from the top on the left hand side. @@ -143,14 +145,12 @@ The Driver Station has the capability of "locking" a USB device into a specific .. note:: If you have two or more of the same device, they should maintain their position as long as all devices remain plugged into the computer in the same ports they were locked in. If you switch the ports of two identical devices the lock should follow the port, not the device. If you re-arrange the ports (take one device and plug it into a new port instead of swapping) the behavior is not determinate (the devices may swap slots). If you unplug one or more of the set of devices, the positions of the others may move; they should return to the proper locked slots when all devices are reconnected. -Example: The image above shows 4 devices: +Example: The image above shows 2 devices: -- A Locked "Logitech Attack 3" joystick. This device will stay in this position unless dragged somewhere else or unlocked -- An unlocked "Logitech Extreme 3D" joystick -- An unlocked "Gamepad F310 (Controller)" which is a Logitech F310 gamepad -- A Locked, but disconnected "MadCatz GamePad (Controller)" which is a MadCatz Xbox 360 Controller +- A locked, but disconnected "Xbox One for Windows" joystick. This device will stay in this position unless dragged somewhere else or unlocked +- An unlocked "Bluetooth LE XINPUT" joystick (Xbox One controller, Bluetooth) -In this example, unplugging the Logitech Extreme 3D joystick will result in the F310 Gamepad moving up to slot 1. Plugging in the MadCatz Gamepad (even if the devices in Slots 1 and 2 are removed and those slots are empty) will result in it occupying Slot 3. +In this example, the Xbox One controller connected over USB (wired) will remain in Slot 0 regardless of it is currently attached to the computer. Plugging in the Xbox One controller connected over Bluetooth (Slot 1) will result in the following image. If it is unplugged and another device is plugged in, that device will occupy Slot 1. CAN/Power Tab -------------- diff --git a/source/docs/software/driverstation/driver-station.rst.bak b/source/docs/software/driverstation/driver-station.rst.bak new file mode 100644 index 0000000000..bbda65542e --- /dev/null +++ b/source/docs/software/driverstation/driver-station.rst.bak @@ -0,0 +1,198 @@ +.. include:: + +FRC Driver Station Powered by NI LabVIEW +======================================== + +This article describes the use and features of the FRC\ |reg| Driver Station Powered by NI LabVIEW. + +For information on installing the Driver Station software see :ref:`this document `. + +Starting the FRC Driver Station +------------------------------- + +.. image:: images/driver-station/ds-icon.png + :alt: This is the FRC Driver Station icon. + +The FRC Driver Station can be launched by double-clicking the icon on the Desktop or by selecting Start->All Programs->FRC Driver Station. + +.. note:: By default the FRC Driver Station launches the :ref:`LabVIEW Dashboard `. It can also be configured on :ref:`docs/software/driverstation/driver-station:Setup Tab` to launch the other Dashboards: :ref:`SmartDashboard ` and :ref:`Shuffleboard `. WPILib must be :ref:`installed ` to use SmartDashboard and Shuffleboard. + +Driver Station Key Shortcuts +---------------------------- + + * `F1` - Force a Joystick refresh. + * `[` + `]` + `\\` - Enable the robot (the 3 keys above Enter on most keyboards) + * `Enter` - Disable the Robot + * `Space` - Emergency Stop the robot. After an emergency stop is triggered the roboRIO will need to be rebooted before the robot can be enabled again. + +.. note:: Space bar will E-Stop the robot regardless of if the Driver Station window has focus or not + +.. warning:: When connected to FMS in a match, teams must press the Team Station E-Stop button to emergency stop their robot as the DS enable/disable and E-Stop key shortcuts are ignored. + +Setting Up the Driver Station +----------------------------- + +.. image:: images/driver-station/ds-setup.png + :alt: The team number box on the setup (gear) tab. + +The DS should be set to your team number in order to connect to your robot. In order to do this click the Setup tab then enter your team number in the team number box. Press return or click outside the box for the setting to take effect. + +PCs will typically have the correct network settings for the DS to connect to the robot already, but if not, make sure your Network adapter is set to DHCP. + +Status Pane +----------- + +.. image:: images/driver-station/ds-status-pane.png + :alt: This is the pane in the center of the Driver station that is always visible. + +The Status Pane of the Driver Station is located in the center of the display and is always visible regardless of the tab selected. It displays a selection of critical information about the state of the DS and robot: + +1. Team # - The Team number the DS is currently configured for. This should match your FRC team number. To change the team number see the Setup Tab. +2. Battery Voltage - If the DS is connected and communicating with the roboRIO this displays current battery voltage as a number and with a small chart of voltage over time in the battery icon. The background of the numeric indicator will turn red when the roboRIO brownout is triggered. See :doc:`/docs/software/roborio-info/roborio-brownouts` for more information. +3. Major Status Indicators - These three indicators display major status items for the DS. The "Communications" indicates whether the DS is currently communicating with the FRC Network Communications Task on the roboRIO (it is split in half for the TCP and UDP communication). The "Robot Code" indicator shows whether the team Robot Code is currently running (determined by whether or not the Driver Station Task in the robot code is updating the battery voltage), The "Joysticks" indicator shows if at least one joystick is plugged in and recognized by the DS. +4. Status String - The Status String provides an overall status message indicating the state of the robot. Some examples are "No Robot Communication", "No Robot Code", "Emergency Stopped", and "Teleoperated Enabled". When the roboRIO brownout is triggered this will display "Voltage Brownout". + +Operation Tab +------------- + +.. image:: images/driver-station/ds-operation-tab.png + :alt: This is the first tab from the top on the left hand side. + +The Operations Tab is used to control the mode of the robot and provide additional key status indicators while the robot is running. + +1. Robot Mode - This section controls the Robot Mode. + + - Teleoperated Mode causes the robot to run the code in the Teleoperated portion of the match. + - Autonomous Mode causes the robot to run the code in the Autonomous portion of the match. + - Practice Mode causes the robot to cycle through the same transitions as an FRC match after the Enable button is pressed (timing for practice mode can be found on the setup tab). + - :doc:`Test Mode ` is an additional mode where test code that doesn't run in a regular match can be tested. + +2. Enable/Disable - These controls enable and disable the robot. See also `Driver Station Key Shortcuts`_. +3. Elapsed Time - Indicates the amount of time the robot has been enabled. +4. PC Battery - Indicates current state of DS PC battery and whether the PC is plugged in. +5. PC CPU% - Indicates the CPU Utilization of the DS PC. +6. Window Mode - When not on the Driver account on the Classmate allows the user to toggle between floating (arrow) and docked (rectangle). +7. Team Station - When not connected to FMS, sets the team station to transmit to the robot. + +.. note:: When connected to the Field Management System the controls in sections 1 and 2 will be replaced by the words FMS Connected and the control in Section 7 will be greyed out. + +Diagnostics Tab +--------------- + +.. image:: images/driver-station/ds-diagnostics-tab.png + :alt: This is the second tab from the top on the left hand side. + +The Diagnostics Tab contains additional status indicators that teams can use to diagnose issues with their robot: + +1. DS Version - Indicates the Driver Station Version number. +2. roboRIO Image Version - String indicating the version of the roboRIO Image. +3. WPILib Version - String indicating the version of WPILib in use. +4. CAN Device Versions - String indicating the firmware version of devices connected to the CAN bus. These items may not be present if the CTRE Phoenix Framework has not been loaded. +5. Memory Stats - This section shows stats about the roboRIO memory. +6. Connection Indicators - The top half of these indicators show connection status to various components. + + - "Enet Link" indicates the computer has something connected to the ethernet port. + - "Robot Radio" indicates the ping status to the robot wireless bridge at 10.XX.YY.1. + - "Robot" indicates the ping status to the roboRIO using mDNS (with a fallback of a static 10.TE.AM.2 address). + - "FMS" indicates if the DS is receiving packets from FMS (this is NOT a ping indicator). + +7. Network Indicators - The second section of indicators indicates status of network adapters and firewalls. These are provided for informational purposes; communication may be established even with one or more unlit indicators in this section. + + - "Enet" indicates the IP address of the detected Ethernet adapter + - "WiFi" indicates if a wireless adapter has been detected as enabled + - "USB" indicates if a roboRIO USB connection has been detected + - "Firewall" indicates if any firewalls are detected as enabled. Enabled firewalls will show in orange (Dom = Domain, Pub = Public, Prv = Private) + +8. Reboot roboRIO - This button attempts to perform a remote reboot of the roboRIO (after clicking through a confirmation dialog). +9. Restart Robot Code - This button attempts to restart the code running on the robot (but not restart the OS). + +Setup Tab +--------- + +.. image:: images/driver-station/ds-setup-tab.png + :alt: This is the third tab from the top on the left hand side. + +The Setup Tab contains a number of buttons teams can use to control the operation of the Driver Station: + +1. Team Number - Should contain your FRC Team Number. This controls the mDNS name that the DS expects the robot to be at. Shift clicking on the dropdown arrow will show all roboRIO names detected on the network for troubleshooting purposes. +2. Dashboard Type - Controls what Dashboard is launched by the Driver Station. :guilabel:`Default` launches the file pointed to by the "FRC DS Data Storage.ini" (for more information about setting a :ref:`custom dashboard `). By default this is Dashboard.exe in the Program Files (x86)\\FRC Dashboard folder. :guilabel:`LabVIEW` attempts to launch a dashboard at the default location for a custom built LabVIEW dashboard, but will fall back to the default if no dashboard is found. :guilabel:`SmartDashboard` and :guilabel:`Shuffleboard` launch the respective dashboards included with the C++ and Java WPILib installation. :guilabel:`Remote` forwards LabVIEW dashboard data to the IP specified in :guilabel:`Dashboard IP` field. +3. Game Data - This box can be used for at home testing of the Game Data API. Text entered into this box will appear in the Game Data API on the Robot Side. When connected to FMS, this data will be populated by the field automatically. +4. Practice Mode Timing - These boxes control the timing of each portion of the practice mode sequence. When the robot is enabled in practice mode the DS automatically proceeds through the modes indicated from top to bottom. +5. Audio Control - This button controls whether audio tones are sounded when the Practice Mode is used. + +USB Devices Tab +--------------- + +.. image:: images/driver-station/ds-usb-tab.png + :alt: This is the fourth tab from the top on the left hand side. + +The USB Devices tab includes the information about the USB Devices connected to the DS + +1. USB Setup List - This contains a list of all compatible USB devices connected to the DS. Pressing a button on a device will highlight the name in green and put 2 \*s before the device name +2. Rescan - This button will force a Rescan of the USB devices. While the robot is disabled, the DS will automatically scan for new devices and add them to the list. To force a complete re-scan or to re-scan while the robot is Enabled (such as when connected to FMS during a match) press F1 or use this button. +3. Device indicators - These indicators show the current status of the Axes, buttons and POV of the joystick. +4. Rumble - For XInput devices (such as X-Box controllers) the Rumble control will appear. This can be used to test the rumble functionality of the device. The top bar is "Right Rumble" and the bottom bar is "Left Rumble". Clicking and holding anywhere along the bar will activate the rumble proportionally (left is no rumble = 0, right is full rumble = 1). This is a control only and will not indicate the Rumble value set in robot code. + +Re-Arranging and Locking Devices +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. image:: images/driver-station/ds-usb-rearrange.png + :alt: USB Order box where you can click and drag to rearrange the joysticks. + +The Driver Station has the capability of "locking" a USB device into a specific slot. This is done automatically if the device is dragged to a new position and can also be triggered by double clicking on the device. "Locked" devices will show up with an underline under the device. A locked device will reserve its slot even when the device is not connected to the computer (shown as grayed out and underlined). Devices can be unlocked (and unconnected devices removed) by double clicking on the entry. + +.. note:: If you have two or more of the same device, they should maintain their position as long as all devices remain plugged into the computer in the same ports they were locked in. If you switch the ports of two identical devices the lock should follow the port, not the device. If you re-arrange the ports (take one device and plug it into a new port instead of swapping) the behavior is not determinate (the devices may swap slots). If you unplug one or more of the set of devices, the positions of the others may move; they should return to the proper locked slots when all devices are reconnected. + +Example: The image above shows 2 devices: + +- A locked, but disconnected "Xbox One for Windows" joystick. This device will stay in this position unless dragged somewhere else or unlocked +- An unlocked "Bluetooth LE XINPUT" joystick (Xbox One controller, Bluetooth) + +In this example, the Xbox One controller connected over USB (wired) will remain in Slot 0 regardless of it is currently attached to the computer. Plugging in the Xbox One controller connected over Bluetooth (Slot 1) will result in the following image. If it is unplugged and another device is plugged in, that device will occupy Slot 1. + +CAN/Power Tab +-------------- + +.. image:: images/driver-station/ds-can-power-tab.png + :alt: This is the fifth tab from the top on the left hand side. + +The last tab on the left side of the DS is the CAN/Robot Power Tab. This tab contains information about the power status of the roboRIO and the status of the CAN bus: + +1. Comms Faults - Indicates the number of Comms faults that have occurred since the DS has been connected +2. 12V Faults - Indicates the number of input power faults (Brownouts) that have occurred since the DS has been connected +3. 6V/5V/3.3V Faults - Indicates the number of faults (typically caused by short circuits) that have occurred on the User Voltage Rails since the DS has been connected +4. CAN Bus Utilization - Indicates the percentage utilization of the CAN bus +5. CAN faults - Indicates the counts of each of the 4 types of CAN faults since the DS has been connected + +If a fault is detected, the indicator for this tab (shown in blue in the image above) will turn red. + +Messages Tab +------------ + +.. image:: images/driver-station/ds-messages-tab.png + :alt: This is the first tab from the top on the right hand side. + +The Messages tab displays diagnostic messages from the DS, WPILib, User Code, and/or the roboRIO. The messages are filtered by severity. By default, only Errors are displayed. + +To access settings for the Messages tab, click the Gear icon. This will display a menu that will allow you to select the detail level (Errors, Errors+Warnings or Errors+Warnings+Prints), clear the box, launch a larger Console window for viewing messages, or launch the DS Log Viewer. + +Charts Tab +---------- + +.. image:: images/driver-station/DriverStation_ChartsTab.png + :alt: This is the second tab from the top on the right hand side. + +The Charts tab plots and displays advanced indicators of robot status to help teams diagnose robot issues: + +1. The top graph charts trip time in milliseconds in green (against the axis on the right) and lost packets per second in orange (against the axis on the left). +2. The bottom graph plots battery voltage in yellow (against the axis on the left), roboRIO CPU in red (against the axis on the right), DS Requested mode as a continuous line on the bottom of the chart and robot mode as a discontinuous line above it. +3. This key shows the colors used for the DS Requested and Robot Reported modes in the bottom chart. +4. Chart scale - These controls change the time scale of the DS Charts. +5. This button launches the :doc:`DS Log File Viewer `. + +The DS Requested mode is the mode that the Driver Station is commanding the robot to be in. The Robot Reported mode is what code is actually running based on reporting methods contained in the coding frameworks for each language. + +Both Tab +-------- + +The last tab on the right side is the Both tab which displays Messages and Charts side by side. diff --git a/source/docs/software/driverstation/images/driver-station-log-viewer/DriverStation_LogDataSelection.png b/source/docs/software/driverstation/images/driver-station-log-viewer/DriverStation_LogDataSelection.png new file mode 100644 index 0000000000..1565634e79 Binary files /dev/null and b/source/docs/software/driverstation/images/driver-station-log-viewer/DriverStation_LogDataSelection.png differ diff --git a/source/docs/software/driverstation/images/driver-station-log-viewer/eventlist.png b/source/docs/software/driverstation/images/driver-station-log-viewer/eventlist.png index ec913b7850..db0d857366 100644 Binary files a/source/docs/software/driverstation/images/driver-station-log-viewer/eventlist.png and b/source/docs/software/driverstation/images/driver-station-log-viewer/eventlist.png differ diff --git a/source/docs/software/driverstation/images/driver-station-log-viewer/graphdisplay.png b/source/docs/software/driverstation/images/driver-station-log-viewer/graphdisplay.png index 8632897d72..0b29baeeb5 100644 Binary files a/source/docs/software/driverstation/images/driver-station-log-viewer/graphdisplay.png and b/source/docs/software/driverstation/images/driver-station-log-viewer/graphdisplay.png differ diff --git a/source/docs/software/driverstation/images/driver-station-log-viewer/logviewer.png b/source/docs/software/driverstation/images/driver-station-log-viewer/logviewer.png index cbcf0d0878..6dde6f10e1 100644 Binary files a/source/docs/software/driverstation/images/driver-station-log-viewer/logviewer.png and b/source/docs/software/driverstation/images/driver-station-log-viewer/logviewer.png differ diff --git a/source/docs/software/driverstation/images/driver-station-log-viewer/open_ds_log_viewer_from_driver_station.png b/source/docs/software/driverstation/images/driver-station-log-viewer/open_ds_log_viewer_from_driver_station.png index 1c4c1212ab..48303623b1 100644 Binary files a/source/docs/software/driverstation/images/driver-station-log-viewer/open_ds_log_viewer_from_driver_station.png and b/source/docs/software/driverstation/images/driver-station-log-viewer/open_ds_log_viewer_from_driver_station.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-can-power-tab.png b/source/docs/software/driverstation/images/driver-station/ds-can-power-tab.png index 3ddcb2f0eb..e59fe4de46 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-can-power-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-can-power-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-charts-tab.png b/source/docs/software/driverstation/images/driver-station/ds-charts-tab.png index d87c402a2c..766972eb94 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-charts-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-charts-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-diagnostics-tab.png b/source/docs/software/driverstation/images/driver-station/ds-diagnostics-tab.png index e7e62f790a..9b5f0020fd 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-diagnostics-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-diagnostics-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-icon.png b/source/docs/software/driverstation/images/driver-station/ds-icon.png index c980e01a5b..55e3d9876c 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-icon.png and b/source/docs/software/driverstation/images/driver-station/ds-icon.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-messages-tab.png b/source/docs/software/driverstation/images/driver-station/ds-messages-tab.png index ad351ab97e..05ce3af103 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-messages-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-messages-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-operation-tab.png b/source/docs/software/driverstation/images/driver-station/ds-operation-tab.png index 2e1fe50e7b..d61e8c160c 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-operation-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-operation-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-setup-tab.png b/source/docs/software/driverstation/images/driver-station/ds-setup-tab.png index 000f70c320..b33f88ffa1 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-setup-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-setup-tab.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-setup.png b/source/docs/software/driverstation/images/driver-station/ds-setup.png index 68c4e37d22..4f797d644f 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-setup.png and b/source/docs/software/driverstation/images/driver-station/ds-setup.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-status-pane.png b/source/docs/software/driverstation/images/driver-station/ds-status-pane.png index 01b40d5407..0e75774a5a 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-status-pane.png and b/source/docs/software/driverstation/images/driver-station/ds-status-pane.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-usb-rearrange.png b/source/docs/software/driverstation/images/driver-station/ds-usb-rearrange.png index bb98dc24a2..c70f29e79c 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-usb-rearrange.png and b/source/docs/software/driverstation/images/driver-station/ds-usb-rearrange.png differ diff --git a/source/docs/software/driverstation/images/driver-station/ds-usb-tab.png b/source/docs/software/driverstation/images/driver-station/ds-usb-tab.png index 5a3e212645..392f715d5a 100644 Binary files a/source/docs/software/driverstation/images/driver-station/ds-usb-tab.png and b/source/docs/software/driverstation/images/driver-station/ds-usb-tab.png differ diff --git a/source/docs/software/frc-glossary.rst b/source/docs/software/frc-glossary.rst index b5b016fd2c..cd8e5924e7 100644 --- a/source/docs/software/frc-glossary.rst +++ b/source/docs/software/frc-glossary.rst @@ -116,6 +116,12 @@ FRC Glossary mutable An object that can be modified after it is created. + PDH + Power Distribution Hub, a *REV Robotics* control system component to provide high & low current power to components on the robot. When compared to the PDP, an on-board LED voltage display, as well as additional channels for more devices, can be found. + + PDP + Power Distribution Panel, a *Cross The Road Electronics* control system component to provide high & low current power to components on the robot. + permanent-magnet DC motor The classification of all legal motors for the FIRST robotics competition. This type of motor takes direct current as input, and uses it to create a magnetic field. In turn, this magnetic field interacts with a physical magnet to create a force that turns the output shaft. Electrical ("brushless") or mechanical ("brushed") means are used to ensure the electrically-generated magnetic field always points in a direction that creates forces when it interacts with the physical magnet, even as the motor's shaft rotates. See `permanent-magnet motor `__ on Wikipedia for more info. diff --git a/source/docs/software/hardware-apis/motors/pwm-controllers.rst b/source/docs/software/hardware-apis/motors/pwm-controllers.rst index 154a0537fc..e156f23dba 100644 --- a/source/docs/software/hardware-apis/motors/pwm-controllers.rst +++ b/source/docs/software/hardware-apis/motors/pwm-controllers.rst @@ -15,7 +15,7 @@ The PWM signal the controllers use for an input is a little bit different. Even Raw vs Scaled output values --------------------------- -In general, all of the motor controller classes in WPILib take a scaled -1.0 to 1.0 value as the output to an actuator. The PWM module in the FPGA on the roboRIO is capable of generating PWM signals with periods of 5, 10, or 20ms and can vary the pulse width in 2000 steps of ~.001ms each around the midpoint (1000 steps in each direction around the midpoint). The raw values sent to this module are in this 0-2000 range with 0 being a special case which holds the signal low (disabled). The class for each motor controller contains information about what the typical bound values (min, max and each side of the deadband) are as well as the typical midpoint. WPILib can then use these values to map the scaled value into the proper range for the motor controller. This allows for the code to switch seamlessly between different types of controllers and abstracts out the details of the specific signaling. +In general, all of the motor controller classes in WPILib take a scaled -1.0 to 1.0 value as the output to an actuator. The PWM module in the FPGA on the roboRIO is capable of generating PWM signals with periods of 5, 10, or 20ms and can vary the pulse width in 4096 steps of 1us each . The raw values sent to this module are in this 0-4096 range with 0 being a special case which holds the signal low (disabled). The class for each motor controller contains information about what the typical bound values (min, max and each side of the deadband) are as well as the typical midpoint. WPILib can then use these values to map the scaled value into the proper range for the motor controller. This allows for the code to switch seamlessly between different types of controllers and abstracts out the details of the specific signaling. Calibrating Motor Controllers ----------------------------- diff --git a/source/docs/software/hardware-apis/sensors/accelerometers-software.rst b/source/docs/software/hardware-apis/sensors/accelerometers-software.rst index 6a1857ca7e..c6ab76a6d6 100644 --- a/source/docs/software/hardware-apis/sensors/accelerometers-software.rst +++ b/source/docs/software/hardware-apis/sensors/accelerometers-software.rst @@ -55,27 +55,19 @@ The :code:`AnalogAccelerometer` class (`Java `__, `C++ `__). This interface defines functionality and settings common to all supported 3-axis accelerometers. - -The :code:`Accelerometer` interface contains getters for the acceleration along each cardinal direction (x, y, and z), as well as a setter for the range of accelerations the accelerometer will measure. - -.. warning:: Not all accelerometers are capable of measuring all ranges. +There are getters for the acceleration along each cardinal direction (x, y, and z), as well as a setter for the range of accelerations the accelerometer will measure. .. tabs:: .. code-tab:: java // Sets the accelerometer to measure between -8 and 8 G's - accelerometer.setRange(Accelerometer.Range.k8G); + accelerometer.setRange(BuiltInAccelerometer.Range.k8G); .. code-tab:: c++ // Sets the accelerometer to measure between -8 and 8 G's - accelerometer.SetRange(Accelerometer::Range::kRange_8G); + accelerometer.SetRange(BuiltInAccelerometer::Range::kRange_8G); ADXL345_I2C ^^^^^^^^^^^ @@ -88,13 +80,13 @@ The :code:`ADXL345_I2C` class (`Java `__ available through FIRST Choice +- `CIMcoder `__ - `CTRE Mag Encoder `_ - `Grayhill 63r `__ - `REV Through Bore Encoder `__ diff --git a/source/docs/software/hardware-apis/sensors/gyros-software.rst b/source/docs/software/hardware-apis/sensors/gyros-software.rst index 7a81bff479..8d1ddaa99b 100644 --- a/source/docs/software/hardware-apis/sensors/gyros-software.rst +++ b/source/docs/software/hardware-apis/sensors/gyros-software.rst @@ -5,17 +5,14 @@ Gyroscopes - Software .. note:: This section covers gyros in software. For a hardware guide to gyros, see :ref:`docs/hardware/sensors/gyros-hardware:Gyroscopes - Hardware`. -A gyroscope, or "gyro," is an angular rate sensor typically used in robotics to measure and/or stabilize robot headings. WPILib natively provides specific support for the ADXRS450 gyro available in the kit of parts, as well as more general support for a wider variety of analog gyros through the `AnalogGyro`_ class. Most common 3rd party gyros inherit from the :code:`Gyro` interface making them easily usable too! +A gyroscope, or "gyro," is an angular rate sensor typically used in robotics to measure and/or stabilize robot headings. WPILib natively provides specific support for the ADXRS450 gyro available in the kit of parts, as well as more general support for a wider variety of analog gyros through the `AnalogGyro`_ class. -The Gyro interface ------------------- - -All natively-supported gyro objects in WPILib implement the :code:`Gyro` interface (`Java `__, `C++ `__). This interface provides methods for getting the current angular rate and heading, zeroing the current heading, and calibrating the gyro. +There are getters the current angular rate and heading and functions for zeroing the current heading and calibrating the gyro. .. note:: It is crucial that the robot remain stationary while calibrating a gyro. ADIS16448 -^^^^^^^^^ +--------- The ADIS16448 uses the :code:`ADIS16448_IMU` class (`Java `__, `C++ `__). See the `Analog Devices ADIS16448 documentation `__ for additional information and examples. @@ -34,7 +31,7 @@ The ADIS16448 uses the :code:`ADIS16448_IMU` class (`Java `__, `C++ `__). See the `Analog Devices ADIS16470 documentation `__ for additional information and examples. @@ -53,7 +50,7 @@ The ADIS16470 uses the :code:`ADIS16470_IMU` class (`Java `__, `C++ `__) provides support for the Analog Devices ADXRS450 gyro available in the kit of parts, which connects over the SPI bus. @@ -72,7 +69,7 @@ The :code:`ADXRS450_Gyro` class (`Java `__, `C++ `__) provides support for any single-axis gyro with an analog output. @@ -91,9 +88,9 @@ The :code:`AnalogGyro` class (`Java `__ for additional connection types. +The navX uses the :code:`AHRS` class. See the `navX documentation `__ for additional connection types. .. tabs:: @@ -108,9 +105,9 @@ The navX uses the :code:`AHRS` class and implements the :code:`Gyro` interface. AHRS gyro{SPI::Port::kMXP}; Pigeon -^^^^^^ +------ -The Pigeon should use the :code:`WPI_PigeonIMU` class that implements :code:`Gyro`. The Pigeon can either be connected with CAN or by data cable to a TalonSRX. The `Pigeon IMU User's Guide `__ contains full details on using the Pigeon. +The Pigeon should use the :code:`WPI_PigeonIMU` class. The Pigeon can either be connected with CAN or by data cable to a TalonSRX. The `Pigeon IMU User's Guide `__ contains full details on using the Pigeon. .. tabs:: @@ -138,7 +135,7 @@ Gyros are extremely useful in FRC for both measuring and controlling robot headi Displaying the robot heading on the dashboard ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:ref:`Shuffleboard ` includes a widget for displaying heading data from a :code:`Gyro` in the form of a compass. This can be helpful for viewing the robot heading when sight lines to the robot are obscured: +:ref:`Shuffleboard ` includes a widget for displaying heading data from a gyro in the form of a compass. This can be helpful for viewing the robot heading when sight lines to the robot are obscured: .. tabs:: diff --git a/source/docs/software/telemetry/writing-sendable-classes.rst b/source/docs/software/telemetry/writing-sendable-classes.rst index 60e239637c..5de2ac569d 100644 --- a/source/docs/software/telemetry/writing-sendable-classes.rst +++ b/source/docs/software/telemetry/writing-sendable-classes.rst @@ -9,7 +9,7 @@ For example, here is the implementation of ``initSendable`` from WPILib's ``Bang .. group-tab:: Java - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpimath/src/main/java/edu/wpi/first/math/controller/BangBangController.java + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpimath/src/main/java/edu/wpi/first/math/controller/BangBangController.java :language: java :lines: 150-158 :linenos: @@ -17,7 +17,7 @@ For example, here is the implementation of ``initSendable`` from WPILib's ``Bang .. group-tab:: C++ - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpimath/src/main/native/cpp/controller/BangBangController.cpp + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpimath/src/main/native/cpp/controller/BangBangController.cpp :language: cpp :lines: 58-72 :linenos: @@ -54,7 +54,7 @@ To help users ensure safety when interfacing with dashboard values, ``SendableBu .. group-tab:: Java - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibj/src/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMMotorController.java + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibj/src/main/java/edu/wpi/first/wpilibj/motorcontrol/PWMMotorController.java :language: java :lines: 118-124 :linenos: @@ -62,10 +62,10 @@ To help users ensure safety when interfacing with dashboard values, ``SendableBu .. group-tab:: C++ - .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibc/src/main/native/cpp/motorcontrol/PWMMotorController.cpp + .. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibc/src/main/native/cpp/motorcontrol/PWMMotorController.cpp :language: cpp - :lines: 54-60 + :lines: 56-62 :linenos: - :lineno-start: 54 + :lineno-start: 56 Additionally, users may call ``builder.setActuator(true)`` to mark any mechanism that might move as a result of ``Sendable`` input as an actuator. Currently, this is used by :ref:`Shuffleboard ` to disable actuator widgets when not in :ref:`LiveWindow ` mode. diff --git a/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst b/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst index 5e37486196..60611cfc0f 100644 --- a/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst +++ b/source/docs/software/vision-processing/roborio/using-the-cameraserver-on-the-roborio.rst @@ -21,7 +21,7 @@ The following program starts automatic capture of a USB camera like the Microsof .. group-tab:: C++ - .. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibcExamples/src/main/cpp/examples/QuickVision/cpp/Robot.cpp + .. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibcExamples/src/main/cpp/examples/QuickVision/cpp/Robot.cpp :language: cpp :lines: 7-8,16-18,20,25-31 @@ -43,7 +43,7 @@ In the following example a thread created in robotInit() gets the Camera Server .. group-tab:: C++ - .. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/main/wpilibcExamples/src/main/cpp/examples/IntermediateVision/cpp/Robot.cpp + .. rli:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.4.3/wpilibcExamples/src/main/cpp/examples/IntermediateVision/cpp/Robot.cpp :language: cpp :lines: 5-20,23-56,58-61,63-64,69-76 diff --git a/source/docs/software/vscode-overview/3rd-party-libraries.rst b/source/docs/software/vscode-overview/3rd-party-libraries.rst index 8fa1c2ddb4..7cb1f567d8 100644 --- a/source/docs/software/vscode-overview/3rd-party-libraries.rst +++ b/source/docs/software/vscode-overview/3rd-party-libraries.rst @@ -91,6 +91,9 @@ Click these links to visit the vendor site to see whether they offer online inst .. warning:: Only use **ONE** of the above Phoenix vendordep links within a project. If you need both Phoenix v5 and Phoenix Pro in the same project, use the third option. +`Redux Robotics ReduxLib `__ - Library for all Redux devices including the Canandcoder + ``https://frcsdk.reduxrobotics.com/ReduxLib_2023.json`` + `Playing With Fusion Driver `__ - Library for all PWF devices including the Venom motor/controller ``https://www.playingwithfusion.com/frc/playingwithfusion2023.json`` diff --git a/source/docs/software/wpilib-tools/robot-simulation/introduction.rst b/source/docs/software/wpilib-tools/robot-simulation/introduction.rst index 9b2c794431..cbc0282a58 100644 --- a/source/docs/software/wpilib-tools/robot-simulation/introduction.rst +++ b/source/docs/software/wpilib-tools/robot-simulation/introduction.rst @@ -28,7 +28,7 @@ If at any point in time you want to disable Desktop Support, simply re-run the " Additional C++ Dependency ^^^^^^^^^^^^^^^^^^^^^^^^^ -C++ robot simulation requires that a native compiler to be installed. For Windows, this would be `Visual Studio 2022 `__ (**not** VS Code), macOS requires `Xcode 13 or later `__, and Linux (Ubuntu) requires the ``build-essential`` package. +C++ robot simulation requires that a native compiler to be installed. For Windows, this would be `Visual Studio 2022 `__ (**not** VS Code), macOS requires `Xcode 14 or later `__, and Linux (Ubuntu) requires the ``build-essential`` package. Ensure the :guilabel:`Desktop Development with C++` option is checked in the Visual Studio installer for simulation support. diff --git a/source/docs/yearly-overview/known-issues.rst b/source/docs/yearly-overview/known-issues.rst index a4a73c715f..ac9df5f3c4 100644 --- a/source/docs/yearly-overview/known-issues.rst +++ b/source/docs/yearly-overview/known-issues.rst @@ -8,6 +8,13 @@ This article details known issues (and workarounds) for FRC\ |reg| Control Syste Open Issues ----------- +LabVIEW installation of RabbitMQ Fails +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Issue:** Some users have reported the following error during LabVIEW installation: ``An error occurred while installing a package: ni-skyline-rabbitmq-support (20.5.0.49152-0+f0)``. + +**Workaround:** NI has a `support article `_ with several potential workarounds. Alternately, you can de-select :guilabel:`NI Web Server Development Support for LabVIEW 2020 32-bit` from the :guilabel:`Additional items you may wish to install` page to avoid installing the failing package. + roboRIO 2.0 Ethernet Settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst b/source/docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst index bbfdb62e6b..46d2e0178a 100644 --- a/source/docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst +++ b/source/docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst @@ -11,6 +11,14 @@ Introduction to FRC Robot Wiring Overview -------- +.. raw:: html + +
+ +
+ +---- + .. tabs:: .. group-tab:: REV diff --git a/source/docs/zero-to-robot/step-2/wpilib-setup.rst b/source/docs/zero-to-robot/step-2/wpilib-setup.rst index cdc2c68d2b..cbb68c00bc 100644 --- a/source/docs/zero-to-robot/step-2/wpilib-setup.rst +++ b/source/docs/zero-to-robot/step-2/wpilib-setup.rst @@ -9,7 +9,7 @@ Prerequisites Supported Operating Systems and Architectures: * Windows 10 & 11, 64 bit only. 32 bit and Arm are not supported * Ubuntu 22.04, 64 bit. Other Linux distributions with glibc >= 2.34 may work, but are unsupported - * macOS 11 or higher, both Intel and Arm. + * macOS 11 or higher, both Intel and Arm for Java. C++ requires macOS 12 or higher with Xcode 14. .. warning:: The following OSes are no longer supported: macOS 10.15, Ubuntu 18.04 & 20.04, Windows 7, Windows 8.1, and any 32-bit Windows. @@ -157,7 +157,7 @@ Some operating systems require some final action to complete installation. Additional C++ Installation for Simulation ------------------------------------------ -C++ robot simulation requires that a native compiler to be installed. For Windows, this would be `Visual Studio 2022 `__ (**not** VS Code), macOS requires `Xcode 13 or later `__, and Linux (Ubuntu) requires the ``build-essential`` package. +C++ robot simulation requires that a native compiler to be installed. For Windows, this would be `Visual Studio 2022 `__ (**not** VS Code), macOS requires `Xcode 14 or later `__, and Linux (Ubuntu) requires the ``build-essential`` package. Ensure the :guilabel:`Desktop Development with C++` option is checked in the Visual Studio installer for simulation support. diff --git a/source/redirects.txt b/source/redirects.txt index 22e710c31a..cbe9c04629 100644 --- a/source/redirects.txt +++ b/source/redirects.txt @@ -279,4 +279,4 @@ "docs/zero-to-robot/step-4/running-benchtop-test.rst" "docs/zero-to-robot/step-4/running-test-program.rst" "docs/zero-to-robot/step-1/how-to-wire-a-robot.rst" "docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst" "docs/hardware/hardware-basics/wiring-pneumatics.rst" "docs/hardware/hardware-basics/wiring-pneumatics-pcm.rst" - +"docs/software/commandbased/command-based-changes.rst" "docs/software/commandbased/index.rst" diff --git a/source/requirements.txt b/source/requirements.txt index 476ae94c62..03585a04c9 100644 --- a/source/requirements.txt +++ b/source/requirements.txt @@ -8,7 +8,7 @@ black==23.1.0 ; python_version >= "3.9" and python_version < "3.12" brotli==1.0.9 ; platform_python_implementation == "CPython" and python_version >= "3.9" and python_version < "3.12" brotlicffi==1.0.9.2 ; platform_python_implementation != "CPython" and python_version >= "3.9" and python_version < "3.12" cachecontrol[filecache]==0.12.11 ; python_version >= "3.9" and python_version < "3.12" -certifi==2022.12.7 ; python_version >= "3.9" and python_version < "3.12" +certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.12" cffi==1.15.1 ; platform_python_implementation != "CPython" and python_version >= "3.9" and python_version < "3.12" charset-normalizer==3.1.0 ; python_version >= "3.9" and python_version < "3.12" click==8.1.3 ; python_version >= "3.9" and python_version < "3.12" @@ -51,11 +51,11 @@ pathspec==0.11.1 ; python_version >= "3.9" and python_version < "3.12" pbr==5.11.1 ; python_version >= "3.9" and python_version < "3.12" pillow==9.5.0 ; python_version >= "3.9" and python_version < "3.12" platformdirs==3.5.0 ; python_version >= "3.9" and python_version < "3.12" -pycparser==2.21 ; platform_python_implementation != "CPython" and python_version >= "3.9" and python_version < "3.12" +pycparser==2.21 ; python_version >= "3.9" and platform_python_implementation != "CPython" and python_version < "3.12" pygments==2.15.1 ; python_version >= "3.9" and python_version < "3.12" pyparsing==3.0.9 ; python_version >= "3.9" and python_version < "3.12" python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.12" -requests==2.29.0 ; python_version >= "3.9" and python_version < "3.12" +requests==2.31.0 ; python_version >= "3.9" and python_version < "3.12" restructuredtext-lint==1.4.0 ; python_version >= "3.9" and python_version < "3.12" ruamel-yaml-clib==0.2.7 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.9" ruamel-yaml==0.17.21 ; python_version >= "3.9" and python_version < "3.12"