GithubHelp home page GithubHelp logo

535tobor / 2023-2024seasoncode Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 35.3 MB

2023-2024 Centerstage Season Code

Home Page: https://535tobor.github.io/CenterStage

License: BSD 3-Clause Clear License

Java 100.00%
first-tech-challenge ftc-2023 ftc-2024 ftc-java ftc-sdk ftc-teamcode

2023-2024seasoncode's People

Contributors

535tobor avatar pi-this avatar

Watchers

 avatar  avatar

2023-2024seasoncode's Issues

version 1.0 Push Bot

The first full-release version 1.0 Push Bot is here!

These programs can earn points by pushing pixels in autonomous and teleop along with parking. The code is organized, and cleaned, and usages were made, such as using encoders in autonomous to move the robot a specific amount of inches.

The Piece

The Piece
This three release version name, "Piece" will include new features, bug fixes, added documentation and descriptions, example files under the reference folder, and global enhancement to for the future season.

Piece 1
The first set release of the piece was recently released, "Piece 1."
In this first piece an error was fixed that avoided proper turning in Teleop.
Also in this version, a reference folder was added to the Team Code so that example could be added for quick reference when programming Tobor's season code.

Piece Future
In the future, Piece 2 and 3 should contain enhancements to Autonomous, along with any minor or major bug changes. More reference example files will be added, along with better code commenting, organization, and descriptions. I might even enhance Teleop a bit, but working with Teleop in these pieces will most likely just be bug fixes.

Overview of programming season

Greetings, and welcome to this year's FTC game season, Center Stage. It is always advisable to organize your code and add various commenting techniques. This year, Tobor has introduced an operations folder that contains all the operations for the entire season. Outside the operations folder are the Autonomous and TeleOp project files, which are Java projects that can be selected within the driver station. Any files within the team code and outside the operations folder can be run as TeleOp or Autonomous from the driver station. Team Tobor is excited to experiment with this new coding technique of operational organization. We are thrilled to undertake adventures into editing, experimenting, and exploring new ways to improve the code for this year's season, Center Stage. So, with that said, Tobor hopes all the FTC teams around the world will have a wonderful experience and says, โ€œYou are going to do great!โ€

A new form of organization that I like to call operational organization was added to the team code:
https://github.com/535tobor/2023-2024SeasonCode/tree/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations

Tobor's tensor flow model has been added to the code for use in Autonomous:
https://github.com/535tobor/2023-2024SeasonCode/tree/master/FtcRobotController/src/main/assets

Various Enums have been added to the code for organization:

package org.firstinspires.ftc.teamcode.operations;

public enum Wheels {
    FRONT_LEFT("fl"),
    FRONT_RIGHT("fr"),
    BACK_LEFT("bl"),
    BACK_RIGHT("br");

    private final String name;

    Wheels(final String name) {this.name = name;}

    public String abbreviation() {
        return name;
    }
}

An interface was added to the operational organization of the code for higher performance:

// public is not needed, because Interface has public by default
package org.firstinspires.ftc.teamcode.operations;

 interface TargetSetup {
     /*
     this interface was made so that
     both LinearOpMode and OpMode can be
     ran within the same class
      */
     void runInit();
     void runInitLoop();
     void runStart();
     void runLoop();
     void runStop();
}

In Operational Organization the code has a target operations file. In this setup, any file that is called 'Target' at the beginning of the name means that the file is the head class of that folder. For example, the head class of the folder operations is the
'TargetOperations' file, shown below:

package org.firstinspires.ftc.teamcode.operations;

import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;

public abstract class TargetOperations extends LinearOpMode implements TargetSetup {

    public static boolean pixelMotorConfig = false;
    public static boolean barMotorConfig = false;

    public void stopAll() {
        requestOpModeStop();
    }

}

By using 'TargetOperations' as the head operations class, I can extend the class in my TeleOp project like so:

public class GameCode extends TargetOperations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.