Skip to content

Commit

Permalink
Update README's
Browse files Browse the repository at this point in the history
	modified:   README.md
	modified:   src/main/java/frc/robot/README
	modified:   src/main/java/frc/robot/Robot.java
  • Loading branch information
tbowers7 committed Nov 6, 2024
1 parent 224d482 commit 589eda4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 14 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
# Az-RBSI
Arizona's Reference Build and Software Implementation for FRC Robots (read: "A-Z-ribsy")

## Notes

Will need to update the drive subsystem once AdvantageKit's 2025-beta is
publicly available, as it nicely wraps CTRE's swerve library in the usual
AK formalism (with all the logging!).

https://github.com/Mechanical-Advantage/AdvantageKit/blob/main/docs/docs/example-projects/talonfx-swerve-template.md


## Purpose

Expand Down
33 changes: 25 additions & 8 deletions src/main/java/frc/robot/README
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Main.java
file.

Robot.java
This file is called by Main.java and directs the operation of the robot
This file is called by ``Main.java`` and directs the operation of the robot
according to the currently commanded mode (disabled, autonomous, teleop,
test, and simulation). Care must be taken when modifying this module to
ensure proper operation of the robot. One section that would be useful to
Expand All @@ -32,21 +32,33 @@ Robot.java

RobotContainer.java
A file for holding robot subsystems and commands. This file is called
from Robot.java and is where all subsystems and commands should be gathered
and organized including button bindings for operator controls, CANbus and
DIO port enumeration for robot devices, and camera pose information (with
respect to robot center).
from ``Robot.java`` and is where all subsystems and commands should be
gathered and organized including button bindings for operator controls,
CANbus and DIO port enumeration for robot devices, and camera pose
information (with respect to robot center).


--------------------
Subdirectories:

commands/
Commands build in separate modules (rather than in subsystem definitions or
inline commands in RobotContainer.java) live in this directory.
inline commands in ``RobotContainer.java``) live in this directory.
Organization of files and subdirectories herein is left to the discrection
of teams.

generated/
This directory holds the ``TunerConstants.java`` file produced by Phoenix
Tuner X's swerve generator (you must generate this file for your specific
drivetrain -- the one included in the Az-RBSI is an example only). It must
be modified as described in the AdvantageKit documentation (removal of
final function and final import; modification of ``kSteerInertia`` and
``kDriveInertia`` constants to be ``0.004`` and ``0.025``, respectively;
optional "Pro" feature, set ``kSteerClosedLoopOutput`` and/or
``kDriveClosedLoopOutput`` to ``ClosedLoopOutputType.TorqueCurrentFOC``;
characterize the drive and turn feedforward gains [``kS``,``kV``,``kA``]
using the auto routines included in the Az-RBSI).

subsystems/
The hardware definition of subsystems is done in this directory.
Organization of files and subdirectories herein is left to the discrection
Expand All @@ -56,8 +68,13 @@ util/
Various utility functions used by the Az-RBSI are included in this
directory. Most teams will not need to modify these routines, but
additional utilities deemed necessary by individual teams may be placed
here for organizational purposes.
here for organizational purposes. The EXCEPTIONS are
``PowerMonitoring.java`` and ``OverrideSwitches.java``, which may be
modified to meet the specific designs of teams. ``PowerMonitoring.java``
can be modified to add additional mechanisms to the power monitor logging,
and ``OverrideSwitches.java`` can be modified to match any manual override
switches on an operator console as described in that module.


--------------------
Last Modified: 10 Oct 2024, TPEB
Last Modified: 06 Nov 2024, TPEB
10 changes: 4 additions & 6 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import frc.robot.Constants.PowerConstants;
import frc.robot.RobotContainer.Ports;
import frc.robot.util.VirtualSubsystem;
import java.util.List;
import org.littletonrobotics.junction.LogFileUtil;
import org.littletonrobotics.junction.LogTable;
import org.littletonrobotics.junction.LoggedRobot;
Expand All @@ -39,7 +38,6 @@ public class Robot extends LoggedRobot {
private Command m_autonomousCommand;
private RobotContainer m_robotContainer;
private Timer m_disabledTimer;
private List<VirtualSubsystem> virtualSubsystems;

/**
* This function is run when the robot is first started up and should be used for any
Expand Down Expand Up @@ -136,10 +134,10 @@ public void disabledInit() {
@Override
public void disabledPeriodic() {
// After WHEEL_LOCK_TIME has elapsed, release the drive brakes
// if (m_disabledTimer.hasElapsed(Constants.DrivebaseConstants.kWheelLockTime)) {
// m_robotContainer.setMotorBrake(false);
// m_disabledTimer.stop();
// }
if (m_disabledTimer.hasElapsed(Constants.DrivebaseConstants.kWheelLockTime)) {
m_robotContainer.setMotorBrake(false);
m_disabledTimer.stop();
}
}

/** This autonomous runs the autonomous command selected by your {@link RobotContainer} class. */
Expand Down

0 comments on commit 589eda4

Please sign in to comment.