Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KrithikAlluri committed Oct 10, 2024
1 parent c54e732 commit 8c9812b
Show file tree
Hide file tree
Showing 35 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 1257Programming
Copyright (c) 2017 2720Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Team 2720's repository for training new members.
//todo

Formatted Documentation: [https://frc1257.github.io/robotics-training/#/](https://frc1257.github.io/robotics-training/#/)
Formatted Documentation: [https://2729stormrobotics.github.io/RedWatchDocumentation/#/](https://2729stormrobotics.github.io/RedWatchDocumentation/#/)

Documentation generated with [Docsify](https://docsify.js.org/)
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Team 2720's repository for teaching new members.

[Get Started](#main)
[GitHub](https://github.com/FRC1257)
[GitHub](https://github.com/2729StormRobotics)
2 changes: 1 addition & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* [Main](java/4-Objects/programs/Cars/Main.md)
* [Car](java/4-Objects/programs/Cars/Car.md)
* [Taxi](java/4-Objects/programs/Cars/Taxi.md)
* [1257 Formatting Guide](java/Formatting_Guide.md)
* [2720 Formatting Guide](java/Formatting_Guide.md)
* [FRC](frc/README.md)
* [Basics](frc/1-Basics/README.md)
* [Program Setup](frc/1-Basics/1a-Setup.md)
Expand Down
4 changes: 3 additions & 1 deletion docs/frc/1-Basics/1a-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ First of all, we need to get set up with some projects.

First, you must make a GitHub account at [github.com](https://github.com). I would recommend using a personal email for this, although you can use a school email if you would like. Then, go to this link:

[Snail Robot Template](https://github.com/FRC1257/snail-robot-template).

Coming soon
[Robot Template](https://github.com/2729StormRobotics).

Click the green button labeled `Use this template`. Make sure that the `Owner` tag has **your** account under it. For the name, you can put anything you want, like `Learning-Robot-Code`. For repository visibility, you can choose either `Public` or `Private`, but I would personally choose `Private`. Every time you want to make a new robot project, you should follow these steps.

Expand Down
2 changes: 1 addition & 1 deletion docs/frc/1-Basics/1b-Match_Structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Competition matches are divided into two main periods: *autonomous* and *teleope

Once the match starts, autonomous begins and it lasts for 15 seconds. Then, teleop begins and lasts for 135 seconds. The match ends when teleop ends.

During the autonomous period, we generally want to score points and position the robot appropriately for the beginning of teleop. Thus, we tend to do a lot of preparation for this period. (See the [Autonomous section](https://frc1257.github.io/robotics-training/#/frc/4-Autonomous/README) for more details.)
During the autonomous period, we generally want to score points and position the robot appropriately for the beginning of teleop. Thus, we tend to do a lot of preparation for this period. (See the [Autonomous section](https://2729stormrobotics.github.io/RedWatchDocumentation/#/frc/4-Autonomous/README) for more details.)
4 changes: 2 additions & 2 deletions docs/frc/1-Basics/2a-Motors.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An actuator is defined as "a component of a machine that is responsible for movi

Our robot is essentially entirely made up of motors. All moving components are controlled by motors or pneumatics, and our job as programmers is to figure out how to convert drive team input into the robot actually doing its job. We can make sure that certain motors move when drive team pushes buttons or joysticks on a game controller.

Motors are widely used throughout most, if not all of our robot's subsystems, especially on the drivetrain. When we have a motor, we can have our robot code apply a voltage to the motor, which will cause it to spin. On our robot, this motor will be attached to a gearbox and other mechanical contraptions to transform this rotational motion into the motion desired for the robot. As of the 2019-20 season, 1257 mainly uses NEO Brushless and NEO 550 motors made by REV Robotics.
Motors are widely used throughout most, if not all of our robot's subsystems, especially on the drivetrain. When we have a motor, we can have our robot code apply a voltage to the motor, which will cause it to spin. On our robot, this motor will be attached to a gearbox and other mechanical contraptions to transform this rotational motion into the motion desired for the robot. As of the 2024 season, 2720 mainly uses NEO Brushless and NEO 550 motors made by REV Robotics.

![SPARK MAX](img/SPARKMAX.png ':size=330x310') ![NEO 550](img/NEOvs550.png ':size=330x230')

Expand Down Expand Up @@ -96,7 +96,7 @@ Now, to apply power to the motor and make it move at a speed, we can use `motor.

## Other Motor Controllers

The SPARK MAX is not the only motor controller we could use—in the past, 1257 has used Talon SRXs and Victor SPXs (both by [CTRE](http://www.ctr-electronics.com/control-system.html?p=3)).
The SPARK MAX is not the only motor controller we could use, other teams have used Talon SRXs and Victor SPXs (both by [CTRE](http://www.ctr-electronics.com/control-system.html?p=3)).

While the motor controller may differ, the general process of controlling the motor is most the same. If Talon SRXs were being used, changes would go towards the class name (now `WPI_TalonSRX`) and any functions taken from that class (e.g. `setIdleMode()` would be `setNeutralMode()`, and `setSmartCurrentLimit()` would be `configContinuousCurrentLimit()`.

Expand Down
2 changes: 1 addition & 1 deletion docs/frc/1-Basics/2b-Vendor_Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

When we use hardware from a third-party source, we need to place what are called "vendor dependency" files into our robot program.

A prime example of such hardware would be a motor controller (see [Motors](https://frc1257.github.io/robotics-training/#/frc/1-Basics/2-Motors) for more detail). Say we are using a SPARK MAX controller from REV Robotics--in order for the controller to actually function, we need to get the vendor dependency (a `.json` file) from REV Robotics' [website](http://www.revrobotics.com/sparkmax-software/).
A prime example of such hardware would be a motor controller (see [Motors](https://2729stormrobotics.github.io/RedWatchDocumentation/#/frc/1-Basics/2-Motors) for more detail). Say we are using a SPARK MAX controller from REV Robotics--in order for the controller to actually function, we need to get the vendor dependency (a `.json` file) from REV Robotics' [website](http://www.revrobotics.com/sparkmax-software/).

## Installing

Expand Down
4 changes: 1 addition & 3 deletions docs/frc/1-Basics/3-Pneumatics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ A solenoid is a device that essentially converts certain electrical signals into

On the other hand, a double solenoid has two solenoids, and when we apply voltage to just one of them, the cylinder shifts in the corresponding direction. The double solenoid works like a toggle -- the solenoid will use power to go to one position, but will stay there until the opposite solenoid is powered.

1257 used *three-way, two-position* solenoids in their 2019 climb system. Along with the capabilities of a basic double solenoid, this device allows air to act on both sides/directions simultaneously, such that the cylinder can be "frozen" in a position.

### Compressor & PCM

![Compressor](img/compressor.jpg ':size=200x200') ![PCM](img/pcm.jpg ':size=200x200')
Expand Down Expand Up @@ -62,7 +60,7 @@ This mechanism is an example of how actuations can be only "fully in" or "fully

We can now translate the basics of pneumatics into our robot program.

Initializing and commanding solenoids in the program is similar to how we did in the [Motors.md](https://frc1257.github.io/robotics-training/#/frc/1-Basics/2-Motors) section. Two things must be known before creating our program, however: whether *single* or *double* solenoids are being used, and also the respective ID port numbers on the PCM. Here's what we'll do:
Initializing and commanding solenoids in the program is similar to how we did in the [Motors.md](https://2729stormrobotics.github.io/RedWatchDocumentation/#/frc/1-Basics/2-Motors) section. Two things must be known before creating our program, however: whether *single* or *double* solenoids are being used, and also the respective ID port numbers on the PCM. Here's what we'll do:

```java
// Single Solenoid
Expand Down
4 changes: 2 additions & 2 deletions docs/frc/1-Basics/4b-Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This folder doesn't contain anything at the moment, but when we start programmin

This is the biggest file in the template and probably the most important. This file can be thought of as almost a map or blueprint of how the entire robot is put together. This file contains all the different components of the robot from the various classes in our project and puts them together.

Our template has a lot of areas that are supposed to be filled in. To see a fully completed version of `RobotContainer`, please see our version in the 2020 robot: [`RobotContainer.java`](https://github.com/FRC1257/2020-Robot/blob/master/src/main/java/frc/robot/RobotContainer.java).
Our template has a lot of areas that are supposed to be filled in. To see a fully completed version of `RobotContainer`, please see our version in the 2024 robot.

First of all, in the constructor for `RobotContainer`, we create all of our controllers (we always use 2) that we use for controlling the robot. The primary function of our constructor is to call a bunch of other functions which we discuss below.

Expand Down Expand Up @@ -60,7 +60,7 @@ This folder contains some utility classes that are used by other sections of our

## Constants.java

`Constants.java` is a file that will be frequently edited. When we make our robot code, we will many times have "magical numbers" that we just throw in. For instance, we might test our intake and discover that 60% is a good speed to set it to. Instead of just throwing this in our robot code where it could easily get lost, we put it in `Constants.java`. `Constants.java` serves as the main hub for every constant we could possible put in our robot. For an example, see this file in our 2020 Robot Code: [`Constants.java`](https://github.com/FRC1257/2020-Robot/blob/master/src/main/java/frc/robot/Constants.java).
`Constants.java` is a file that will be frequently edited. When we make our robot code, we will many times have "magical numbers" that we just throw in. For instance, we might test our intake and discover that 60% is a good speed to set it to. Instead of just throwing this in our robot code where it could easily get lost, we put it in `Constants.java`. `Constants.java` serves as the main hub for every constant we could possible put in our robot.

We structure this file with [inner static classes](https://www.geeksforgeeks.org/static-class-in-java/). An example would be `ElectricalLayout`, where we store all IDs/port numbers for robot hardware. Using static classes allows us to reference constants through something like `Constants.ElectricalLayout.CONTROLLER_DRIVER_ID` and put a lot more organization into our program.

Expand Down
2 changes: 1 addition & 1 deletion docs/frc/1-Basics/5-First_Subsystem.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# First Subsystem

In this 4 part section, we will go over one of the most common subsystems that we make on Team 1257: the roller intake!
In this 4 part section, we will go over one of the most common subsystems that eam 1257 makes: the roller intake!

Click [here](https://github.com/FRC1257/training-programs/tree/master/basics/roller-intake) for a link to the full code for this tutorial.

Expand Down
4 changes: 2 additions & 2 deletions docs/frc/1-Basics/5a-Roller_Intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Now that we have the basics out of the way, it's time to start coding!

## Snail Subsystem

Before we make our file that represents the subsystem in code, there is one file in our template which is essential: `SnailSubsystem.java`. This file is an abstract class that each subsystem class must extend to be recognized as a subsystem in our code. For a refresh on what abstract classes are and their uses, go to our [Polymorphism page](https://frc1257.github.io/robotics-training/#/java/4-Objects/6-Polymorphism).
Before we make our file that represents the subsystem in code, there is one file in our template which is essential: `SnailSubsystem.java`. This file is an abstract class that each subsystem class must extend to be recognized as a subsystem in our code. For a refresh on what abstract classes are and their uses, go to our [Polymorphism page](https://2729stormrobotics.github.io/RedWatchDocumentation/#/java/4-Objects/6-Polymorphism).

Here is a copy of the `SnailSubsystem` code:

Expand Down Expand Up @@ -111,7 +111,7 @@ The first part of the code is basic setup that imports a bunch of necessary line

### enum State

The first chunk of code is when an enum called `State` is declared. If you need a refresher on enums, go to our page on [enums.](https://frc1257.github.io/robotics-training/#/java/2-Control_Flow/7-Enums) The enum is essentially a custom data structure holding any of the **possible** states that our subsystem could be in.
The first chunk of code is when an enum called `State` is declared. If you need a refresher on enums, go to our page on [enums.](https://2729stormrobotics.github.io/RedWatchDocumentation/#/java/2-Control_Flow/7-Enums) The enum is essentially a custom data structure holding any of the **possible** states that our subsystem could be in.

### RollerIntake()

Expand Down
4 changes: 1 addition & 3 deletions docs/frc/1-Basics/5e-Simulation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Making Simulation Classes (Roller Intake)

New for 2024 and will be updated soon.
For now, take a look at this [repository](https://github.com/FRC1257/virtual-robot) with a bunch of common simulated subsystems (arms, elevators, intakes, etc.)
Also, look at this documentation for simulated system [classes](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/introduction.html).
New for 2024 and will be updated soon.
5 changes: 2 additions & 3 deletions docs/frc/1-Basics/6-Claw_Intake.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Claw Intake

Now that you know the basics behind making a subystem and its supporting files, we are going to cover making other common subsystems to practice. The next few lessons will be about learning each of the major subsystems that 1257 uses and how to program them.
Now that you know the basics behind making a subystem and its supporting files, we are going to cover making other common subsystems to practice. The next few lessons will be about learning each of the major subsystems that 2720 uses and how to program them.

## Overview

![openClaw](img/openClaw.jpeg) ![closedClaw](img/closedClaw.jpeg)

The first subsystem we'll be covering is a claw intake, which uses force to clamp onto game pieces and hold them. Above is what a typical claw looks like that uses pneumatics to control the actuation of the claw. In this specific instance, when the cylinder extends, the claw closes, and when it retracts, the claw opens. In the past, we've used claws in robots such as Team 1257's second 2018 robot (the original robot did not have a claw, but it was rebuilt for the offseason Brunswick Eruption event).
The first subsystem we'll be covering is a claw intake, which uses force to clamp onto game pieces and hold them. Above is what a typical claw looks like that uses pneumatics to control the actuation of the claw. In this specific instance, when the cylinder extends, the claw closes, and when it retracts, the claw opens. In the past, teams have used claws such as Team 1257's second 2018 robot.

### Why Pneumatics?

Expand Down Expand Up @@ -298,4 +298,3 @@ public final class Constants {

If there are any lingering questions about anything gone over in this lesson, please contact a senior programming member. Click [here](https://github.com/FRC1257/training-programs/tree/master/basics/claw-intake) for a link to the full code.

With the claw lesson over, you now know how to code two major subsystems that team 1257 uses! Next lesson, we will learn about yet another subsystem that team 1257 uses nearly every year: the arm!
4 changes: 2 additions & 2 deletions docs/frc/1-Basics/8-Elevator.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You now know how to make three major subsystems that our team uses. In this less

![Elevator CAD](img/elevatorExtended.jpeg ':size=392x389')

Pictured above is an elevator subsystem. Not every elevator looks like this, though almost all used by 1257 have followed the same general concept. There are pulleys set up that are spun using motors that raise the elevator up and down. In many designs, the motors both spin in the same direction though there are also quite a few where the spin in opposite directions because of the ways that the pulleys are set up.
Pictured above is an elevator subsystem. Not every elevator looks like this, though almost all of them have followed the same general concept. There are pulleys set up that are spun using motors that raise the elevator up and down. In many designs, the motors both spin in the same direction though there are also quite a few where the spin in opposite directions because of the ways that the pulleys are set up.

When considering only manual control, elevators are actually very similar to arms in that they just use 1-2 motors that you can control with a joystick. Typically, elevators have heaver loads than arms so they will use 2 motors often while arms may be seen with only one motor. In this tutorial, we'll review how to program an elevator that uses two motors.

Expand Down Expand Up @@ -296,4 +296,4 @@ public final class Constants {
If there are any lingering questions about anything gone over in this lesson, please ask a senior programming member. Click [here](https://github.com/FRC1257/training-programs/tree/master/basics/elevator) for a link to the full code.
With the elevator lesson over, you now know how to code four major subsystems that our team uses! Next lesson, we will learn about arguably the most important subsystem that Team 1257 uses: the drivetrain!
With the elevator lesson over, you now know how to code four major subsystems that our team uses! Next lesson, we will learn about arguably the most important subsystem ever: the drivetrain!
Loading

0 comments on commit 8c9812b

Please sign in to comment.