From d57d81b483ee2a2ede5b61eb9540227370a2d083 Mon Sep 17 00:00:00 2001
From: Jestin VanScoyoc <31118852+JediScoy@users.noreply.github.com>
Date: Sun, 10 Dec 2023 23:40:34 -0500
Subject: [PATCH] converted some RST to MD
---
docs/source/controls/FAQ-for-beginners.md | 25 ++++++
docs/source/controls/auton-pathplanner.md | 8 ++
docs/source/controls/code-examples.md | 57 ++++++++++++
.../command-and-declarative-programming.md | 88 +++++++++++++++++++
.../controls/conventions-style-guide.md | 3 +
docs/source/controls/ctre.md | 7 ++
docs/source/controls/history-controls.md | 19 ++++
docs/source/controls/leds.md | 35 ++++++++
docs/source/controls/limelight.md | 35 ++++++++
docs/source/controls/motion-profiling.md | 49 +++++++++++
docs/source/controls/path-planner.md | 25 ++++++
.../controls/photonvision-on-a-limelight.md | 40 +++++++++
docs/source/controls/photonvision.md | 11 +++
13 files changed, 402 insertions(+)
create mode 100644 docs/source/controls/FAQ-for-beginners.md
create mode 100644 docs/source/controls/auton-pathplanner.md
create mode 100644 docs/source/controls/code-examples.md
create mode 100644 docs/source/controls/command-and-declarative-programming.md
create mode 100644 docs/source/controls/conventions-style-guide.md
create mode 100644 docs/source/controls/ctre.md
create mode 100644 docs/source/controls/history-controls.md
create mode 100644 docs/source/controls/leds.md
create mode 100644 docs/source/controls/limelight.md
create mode 100644 docs/source/controls/motion-profiling.md
create mode 100644 docs/source/controls/path-planner.md
create mode 100644 docs/source/controls/photonvision-on-a-limelight.md
create mode 100644 docs/source/controls/photonvision.md
diff --git a/docs/source/controls/FAQ-for-beginners.md b/docs/source/controls/FAQ-for-beginners.md
new file mode 100644
index 0000000..9a59ca8
--- /dev/null
+++ b/docs/source/controls/FAQ-for-beginners.md
@@ -0,0 +1,25 @@
+ ------------------------------------------
+ FAQ and Getting Started with Programming
+ ------------------------------------------
+
+VS Code has some built in examples and templates to get you started. We
+have uploaded some of the Timed Robot examples and Command Robot
+examples to out Github page and compliled a list of other teams\' code
+[here
+\
diff --git a/docs/source/controls/command-and-declarative-programming.md b/docs/source/controls/command-and-declarative-programming.md
new file mode 100644
index 0000000..a82cdd5
--- /dev/null
+++ b/docs/source/controls/command-and-declarative-programming.md
@@ -0,0 +1,88 @@
+==== Command Based Programming ==== There are two approaches to making
+an FRC robot: **Imperative**, and **Command-Based**, of which we use the
+latter.
+
+Imperative \-\-\--Imperative is like designing a linear list of orders
+for the robot to follow. It\'s hard to properly communicate the
+differences between the two philopsophies in a tl;dr format, but the
+cliff notes are that Imperative is what most inexperienced people would
+default to. While it\'s easier in the very short term, the drawbacks are
+too large to be viable; added maintenience, dependency, and ambiguity in
+control flow are all reasons to avoid imperative.
+
+Command Based (and declarative) \-\-\--Command based is like designing a
+set of rules for the robot to follow. A quick distinction is in order:
+\"Command-Based\" refers to the way robot properties and actions are
+broken into **subsystems** and **commands**, with a large arsenal of
+classes and functions to help with the subsystems and commands.
+\"Declarative\" programming is the \~\~programming Paradigm\~\~ more
+sustainable, effective method of programming that goes with
+command-based like PB+J. For this reason, they will often be grouped
+together as simply \"Command-Based\" (occasionally, \"sane, functional
+human being code\")
+
+\# A quick table, summing up the uses \
\ \
+\Issue\ | \Imperative\ | \Command-Based +
+Declarative\ | \
\ \ \ \Quick
+prototyping\ | \Good; makes it easy to prototype simple
+code\ | \Not needed; thinking about code structure for simple
+tests and whatnot isn\'t needed,\ | \
\
+\dependence\ | \nightmarish; like soldering a lamp to a
+socket\ | \Non-existent (if you\'re smart) due to much more
+modular design\ | \
\ \Reading and
+comprehension\ | \Fine for short snippets of code, \ but
+complex systems and developers will suffer greatly from the inherent
+\ lack of clarity\ | \Easier to separate each function call
+and class into individual parts, \ and debugging can be made much
+easier (if you\'re smart)\ | \
\ \Issuing Robot
+Orders\ | \Calling robot methods directly; easy to understand
+for a whole 5 seconds,\ dependencies will FESTER\ | \Robot
+properties and actions are neatly fit into subsystems and commands,
+\ allowing for greater control and mental ease\ | \
\
+\reaction of pretentious team 1XX member\ | \dude what is
+this youre disgusting\ | \this is so good marry me\ |
+\
\ \
+
+If you yet hunger for perfection beyond Declarative, check out the SOLID
+principles, one of the most popular set of guidelines for clean code out
+there. I would recommend watching Tim Corey\'s videos on the principles.
+They\'re boring as *redacted*, but they are presented carefully enough
+to actually teach. Another caveat is that he uses C#. Even though he
+uses a different language, the principles still apply in Java. Also, C#
+and Java are very similar in basic syntax, with differences you don\'t
+need to worry about yet.
+
+Resources \-\-\--1. [Command-Based
+Programming](https://docs.wpilib.org/en/stable/docs/software/commandbased/index.html)
+FIRST documenation 2. [FRC 0 to Autonomous: #5 Command-Based
+Robot](https://youtu.be/VoxeXqy1bdQ) video 3. [Overview - SwerveIO 5.0.2
+User Documentation](https://javadoc.bancino.net/SwerveIO/latest/)
+
+Trajectories \-\-\--1. [Trajectory Generation and Following with
+WPILib](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/trajectories/index.html)
+FIRST documentation 2. [Introduction to
+PathWeaver](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/pathweaver/introduction.html)
+FIRST documentation *Not using with Swerve* 3.
+[PathPlanner](https://github.com/mjansen4857/pathplanner/wiki) 4.
+[Ramsete
+Controller](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/trajectories/ramsete.html)
+The Ramsete Controller is a trajectory tracker that is built in to
+WPILib. This tracker can be used to accurately track trajectories with
+correction for minor disturbances.
+
+Chief Delphi References \-\-\--1. [A Problem When Using Trajectory in
+Swerve](https://www.chiefdelphi.com/t/a-problem-when-using-trajectory-in-a-swerve-drive/395400)
+2. [Seeking Examples for Applying Trajectory Constraints to WPI
+Trajectory](https://www.chiefdelphi.com/t/seeking-examples-for-applying-trajectory-constraints-to-wpi-trajectory/392813)
+3. [Running Multiple Cameras - USB for front and back or side
+viewing](https://www.chiefdelphi.com/t/is-it-possible-to-have-two-cameras/338519/2)
+4. [3630 Stampede Robotics OffSeason Swerve Code
+release](https://www.chiefdelphi.com/t/3630-stampede-robotics-offseason-swerve-code-release/398713)
+5. AUTON help
+
+6. [Paper: 4 wheel independent drive & independent steering \"swerve\" -
+CD-Media:
+Papers](https://www.chiefdelphi.com/t/paper-4-wheel-independent-drive-independent-steering-swerve/107383)
+
+White Papers \-\-\--1. [Chimera\'s Swerve
+PDF](https://www.first1684.com/uploads/2/0/1/6/20161347/chimiswerve_whitepaper__2_.pdf).
diff --git a/docs/source/controls/conventions-style-guide.md b/docs/source/controls/conventions-style-guide.md
new file mode 100644
index 0000000..d084441
--- /dev/null
+++ b/docs/source/controls/conventions-style-guide.md
@@ -0,0 +1,3 @@
+ -----------------------------
+ Conventions and Style Guide
+ -----------------------------
diff --git a/docs/source/controls/ctre.md b/docs/source/controls/ctre.md
new file mode 100644
index 0000000..1ea8840
--- /dev/null
+++ b/docs/source/controls/ctre.md
@@ -0,0 +1,7 @@
+# CTRE
+
+Cross The Road Electronics links - [Official Phoenix Pro
+Documentation](https://v6.docs.ctr-electronics.com/en/2023-pro/index.html)
+
+See also [links on motion
+profiling](https://github.com/CyberCoyotes/Handbook/blob/main/docs/source/controls/motion-profiling.rst).
diff --git a/docs/source/controls/history-controls.md b/docs/source/controls/history-controls.md
new file mode 100644
index 0000000..018f3a9
--- /dev/null
+++ b/docs/source/controls/history-controls.md
@@ -0,0 +1,19 @@
+ ------------------------
+ Team History: Controls
+ ------------------------
+
+A little history about our controls approaches.
+
+2019 and Prior \-\-\--\* **Drivetrain**: Mecanum, tank drive,
+rhinotracks, or omni wheels combined with others depending on the game
+demands \* **Drive motors**: CIM motors mostly, switched to Falcons in
+2019? \* **Gyro**: NavX \* **Programming**: *Iterative* Java
+
+2022 Season Changes \-\-\--\* **Drivetrain**: MK3 swerve \* **Drive
+motors**: Falcon500 motors \* **Programming**: *Command based* Java
+adapted from SDS
+
+2023 Season Changes \-\-\--\* **Drivetrain**: MK4 swerve \* **Gyro**:
+CTRE Pigeon \* **Programming**: *Command based* Java adapted from
+[BearSwerve](https://github.com/6391-Ursuline-Bearbotics/BearSwerve)
+code base.
diff --git a/docs/source/controls/leds.md b/docs/source/controls/leds.md
new file mode 100644
index 0000000..bea3cc7
--- /dev/null
+++ b/docs/source/controls/leds.md
@@ -0,0 +1,35 @@
+# LEDs
+
+There (seems to be) two approaches to controlling LEDs on a FRC robot.
+The REV Blinkin module or using the WPI Addressable with hooking up the
+LEDs directly to the Rio. The terms **individually addressable** is a
+reference to the ability of a program, app, or remote to make very
+specific changes to the LEDs themselves whereas WPI AddressableLED is
+program specific reference.
+
+Using a Blinkin \-\-\--#. [Blinkin LED Driver
+page](https://www.revrobotics.com/rev-11-1105/) and including the [PDF
+manual](https://www.revrobotics.com/content/docs/REV-11-1105-UM.pdf) #.
+[REV Robotics Blinkin Overview - YouTube
+\]{.title-ref} #. [Cyber Coyotes Blinkin
+Example](https://github.com/CyberCoyotes/LED-BlinkinExample). Based on
+Sonic Squirrels example, but updated for 2023 codebase. #. [Sonic
+Squirrels
+Example](https://github.com/FRC-Sonic-Squirrels/MinibotCode/blob/5b58f10ef78b79384b12a69ffbe3fcba4775bba1/src/main/java/frc/robot/subsystems/blinkin.java)
+#. [Mechanical Advantage
+Example](https://github.com/Mechanical-Advantage/RobotCode2022/tree/main/src/main/java/frc/robot/subsystems/leds)
+has Blinkin and Rio (Addressable) examples #. Chief Delphi
+[blinkin-led-programming](https://www.chiefdelphi.com/t/blinkin-led-programming/339003)
+#. Chief Delphi
+[rev-blinkin-led](https://www.chiefdelphi.com/t/rev-blinkin-led/396966)
+
+Using WPI Addressable \-\-\--#. [Addressable LEDs -
+WPILib](https://docs.wpilib.org/en/stable/docs/software/hardware-apis/misc/addressable-leds.html)
+#. [Mechanical
+Advantage](https://github.com/Mechanical-Advantage/RobotCode2022/tree/main/src/main/java/frc/robot/subsystems/leds)
+has Blinkin and Rio (Addressable) examples #. [Yeti
+Robotics](https://github.com/Yeti-Robotics/aurora-java-2022) #.
+[Ursuline
+Bearbotics](https://github.com/6391-Ursuline-Bearbotics/2022_UARobotics_Rapid_React/blob/master/src/main/java/frc/robot/subsystems/LEDSubsystem.java)
+#. Chief Delphi
+[addressableleds-and-rev-robotics-blinkin](https://www.chiefdelphi.com/t/addressableleds-and-rev-robotics-blinkin/375753)
diff --git a/docs/source/controls/limelight.md b/docs/source/controls/limelight.md
new file mode 100644
index 0000000..c110e64
--- /dev/null
+++ b/docs/source/controls/limelight.md
@@ -0,0 +1,35 @@
+# Limelight
+
+\"Limelight is an easy-to-use smart camera for FRC.\"
+
+See the Official Limelight
+[docs](https://docs.limelightvision.io/en/latest/) and
+[downloads](https://limelightvision.io/pages/downloads) page. The [quick
+start](https://docs.limelightvision.io/docs/docs-limelight/getting-started/programming)
+is a good place to start
+
+## Links to Other Resources
+
+- Limelight
+ [Post](https://www.chiefdelphi.com/t/limelight-2022-0-3-update/400306)
+ Chief Delphi
+- [Basic Vision in FRC Programming -
+ YouTube](https://youtu.be/hk8yAgDogPE) Broward Botcats
+
+## AprilTags
+
+1. [Tracking AprilTags with
+ Limelight](https://docs.limelightvision.io/en/latest/apriltags_in_2d.html)
+ hardware and software **RELEASED Jan 10, 2023**
+2. [AprilTag Introduction -
+ WPILib](https://docs.wpilib.org/en/stable/docs/software/vision-processing/apriltag/index.html).
+
+## Code Examples
+
+1. Lamda Corps [Limelight (vision)
+ Example](https://github.com/Lambda-Corps/2020InfiniteRecharge/blob/master/src/main/java/frc/robot/subsystems/Vision.java).
+2.
+3. [FRC 2910
+ vision](https://github.com/FRCTeam2910/2023CompetitionRobot-Public/tree/main/src/main/java/org/frcteam2910/c2023/subsystems/vision)
+4. [FRC 2910 - drive to scoring
+ location](https://github.com/FRCTeam2910/2023CompetitionRobot-Public/blob/main/src/main/java/org/frcteam2910/c2023/commands/DriveToScoringLocationCommand.java)
diff --git a/docs/source/controls/motion-profiling.md b/docs/source/controls/motion-profiling.md
new file mode 100644
index 0000000..47a5993
--- /dev/null
+++ b/docs/source/controls/motion-profiling.md
@@ -0,0 +1,49 @@
+Motion Profiling ====
+
+When controlling a mechanism, is often desirable to move it smoothly
+between two positions, rather than to abruptly change its setpoint. This
+is called "motion-profiling," and is supported in WPILib through the
+TrapezoidProfile class
+
+# WPI
+
+For a description of the WPILib motion profiling features used by these
+command-based wrappers, see [Trapezoidal Motion Profiles in
+WPILib](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/controllers/trapezoidal-profiles.html#trapezoidal-motion-profiles-in-wpilib).
+Note: The TrapezoidProfile command wrappers are generally intended for
+composition with custom or external controllers. For combining
+trapezoidal motion profiling with WPILib's PIDController, see [Combining
+Motion Profiling and PID in
+Command-Based](https://docs.wpilib.org/en/stable/docs/software/commandbased/profilepid-subsystems-commands.html).
+To further help teams integrate motion profiling into their
+command-based robot projects, WPILib includes two convenience wrappers
+for the TrapezoidProfile class: TrapezoidProfileSubsystem, which
+automatically generates and executes motion profiles in its periodic()
+method, and the TrapezoidProfileCommand, which executes a single
+user-provided TrapezoidProfile. [Motion Profiling through
+TrapezoidProfileSubsystems and
+TrapezoidProfileCommands](https://docs.wpilib.org/en/stable/docs/software/commandbased/profilepid-subsystems-commands.html)
+
+# CTRE
+
+- [Motion Magic and other Motion
+ Profiling](https://docs.ctre-phoenix.com/en/stable/ch16_ClosedLoop.html)
+ with CTRE.
+- [254](https://www.chiefdelphi.com/uploads/default/original/3X/a/b/ab808bbf5f212c6deba8565dac83852bbd9b4394.pdf)
+ PDF explaining motion planning
+- [2019 Motion
+ Magic](https://docs.google.com/presentation/d/1zzMI3DW-elButNH0QLFdYnDyaIapeI-zZnv9CAC6WY8/edit)
+ slide presentation. Video of Corey Applegate (FRC 3244) [CTRE Motion
+ Magic](https://youtu.be/VQIgdLslU_E)
+
+Come highly recommended [Team 195- FRC Motion Control: part
+1](https://youtu.be/4rbT-oscpx0) BUT\... its from 2018 AND its 4.5 hrs
+long for both parts
+
+Additional Resources \-\-\--\* [Motion Profiling -
+wiki](https://github.com/CyberCoyotes/Handbook/wiki/Motion-Profiling)
+page \* [Telemetry
+docs](https://docs.wpilib.org/en/stable/docs/software/telemetry/index.html)
+docs page. \* [Control Modes Configuration for TalonFX and
+Falcon500](https://www.chiefdelphi.com/t/control-modes-configuration-for-talonfx-and-falcon500/374704/12)
+ChiefDelphi post.
diff --git a/docs/source/controls/path-planner.md b/docs/source/controls/path-planner.md
new file mode 100644
index 0000000..0213d33
--- /dev/null
+++ b/docs/source/controls/path-planner.md
@@ -0,0 +1,25 @@
+# PathPlanner
+
+\"PathPlanner is a motion profile generator for FRC robots created by
+team 3015.\"
+
+It is available from the [github
+repo](https://github.com/mjansen4857/pathplanner) and in the Microsoft
+Store. The [wiki](https://github.com/mjansen4857/pathplanner/wiki) is
+kept up to date so I would check there for instructions and Chief Delphi
+for tips & clarifications.
+
+You must install
+[PathPlannerLib](https://github.com/mjansen4857/pathplanner/wiki/PathPlannerLib:-Installing)
+to generate your paths.
+
+`https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib.json`
+
+Just need the latest
+[release](https://github.com/mjansen4857/pathplanner/releases)?
+
+## Links
+
+- [PathPlanner 2024
+ Beta](https://www.chiefdelphi.com/t/pathplanner-2024-beta/442364)
+ Chief Delphi discussion.
diff --git a/docs/source/controls/photonvision-on-a-limelight.md b/docs/source/controls/photonvision-on-a-limelight.md
new file mode 100644
index 0000000..b551bc2
--- /dev/null
+++ b/docs/source/controls/photonvision-on-a-limelight.md
@@ -0,0 +1,40 @@
+ -----------------------------------
+ Using Photonvision on a Limelight
+ -----------------------------------
+
+Download the [Limelight USB
+Driver](https://limelightvision.io/pages/downloads) to see the Limeight
+in Windows Explorer. It\'s needed before Balena Etcher can flash the
+limelight.
+
+[Installing
+PhotonLib](https://docs.photonvision.org/en/latest/docs/programming/photonlib/adding-vendordep.html)
+in VS Code.
+
+Check your vendordeps (.json files) if importing a previous project into
+a new year. For example, we have vendordeps
+
+- BearSwerve.json
+- PathplannerLib.json
+- Pheonix.json
+- photonlib.json
+- REVlLin.json
+- SdsSwerveLin.json
+
+After installing the Pheonix Tuner, you need to manage the vendor
+libraries inside of VS Code.
+
+
+For the others, they were copied and imported into out project
+\"vendordep\" folder, then an \"update online\" was ran from the Manage
+Vendordep from within VS Code
+
+Resources \-\-\--\* [PhotonVision discord](https://discord.gg/jWfxwqJK)
+\* [Full Robot Pose Estimation w/ PhotonVision -
+doc](https://docs.google.com/document/d/1i9y_xErWBRWlO6Ws0qoYoJbCUr-QSafhKVNoYOwd-ng/view)
+doc shared via Discord (2022-12) \* [PhotonVision Beta 2023:
+AprilTags](https://www.chiefdelphi.com/t/photonvision-beta-2023-apriltags/415626)
+Chief Delphi \* [PhotonVision beta 3D calibration lags on limelight
+camera](https://www.chiefdelphi.com/t/photonvision-beta-3d-calibration-lags-on-limelight-camera/416986/19)
+Chief Delphi. \* [Vision Programming with AprilTags Jumpstart
+2023](https://youtu.be/TG9KAa2EGzQ?t=1104).
diff --git a/docs/source/controls/photonvision.md b/docs/source/controls/photonvision.md
new file mode 100644
index 0000000..5190998
--- /dev/null
+++ b/docs/source/controls/photonvision.md
@@ -0,0 +1,11 @@
+ --------------
+ PhotonVision
+ --------------
+
+- PhotonVision - Docs
+ ().
+- PhotonVision 2021 - Chief Delphi
+ ().
+- Lime Light & The New Gloworm ()
+ Jumpstart Robotics - YouTube
+- Glowormvision ()