Giter Club home page Giter Club logo

Get Started

A comprehensive guide and documentation on implementation a minimalistic path following algorithm in FTC


Warning

This site assumes that you are already moderately-versed with the Java language the FTC SDK.

Tip

I aim to provide explanations and implementations of the different control systems to programmers of FTC regardless of their experience or prior knowledge level.

Tip

If your team does not want to invest money into expensive hardware such as encoders and dead wheels, this implementation may not be the right one for you.

Introduction


Mission

Welcome! This website serves as a comprehensive documentation and guide on the implementation of field centric “pure pursuit” for Holonomic Drivetrains in FTC. This is intended to serve tips , sample code, and resources needed along with explanations and implementations of different control systems for accurate path following.

Any team looking to implement a minimalistic and time efficient path following algorithm in FTC will be able to do so by following the code and conceptual explanations in this documentation. My goal is that the code samples and concept sections will give simple explanations that will enable anyone to understand the algorithm completely and trouble shoot any problems they may incur.

Tank Drive vs Mecanum


Example of field-centric pure pursuit

Path follower implemented for a Mecanum Drivetrain

Example of field-centric pure pursuit

Path follower implemented for a Tank Drivetrain

This path follower can be implemented for both Tank and Mecanum drivetrains. However, there are some key differences between what is needed and how some methods are implemented for each respective drive train. Each page will contain one of the notification bars shown below:

[!ATTENTION] This is for both Tank and Mecanum Drivetrains

[!ATTENTION] This is only for Mecanum drivetrains

[!ATTENTION] This is only for Tank drivetrains

If the page does not contain implementations or explanations necessary for your drive train type, you may skip over it.


Skills you will need

Tip

Make sure you know all of these topics thoroughly as it is the foundation for our path-following algorithm. Without knowing these topics, you will get lost as we progress through the difficult topics and concepts.

Although this implementation is very simple, there are some topics you will need to understand before proceeding. The topics are listed below along with links to resources that may help refresh these topics or learn them from scratch.
  1. Understanding of simple Trigonometry (Cosine , Secant , Tangent, etc.)

  2. Understanding of hardware (Motors , Encoders)

  3. Basic Calculus (Derivatives , integrals)

  4. Knowledge of the java programming knowledge

    public static void main(String[] args) {
        // An arraylist of type Point is initialized
        ArrayList<Point> pathPoints = new ArrayList<>();

        // Adding points to the array list
        pathPoints.add(new Point(0 , 0));
        pathPoints.add(new Point(0 , 25));
        pathPoints.add(new Point(15 , 40));

        // Storing the output of the method as a variable
        boolean valueExists = xValueExists(pathPoints , 40);

        // Printing the variable to view the result
        System.out.println(valueExists);

    }

      /*
        Method returns a boolean
        Parameter pathPoints is of type ArrayList<Point>
        Parameter xValue is of type double
      */
  
    public static boolean xValueExists(ArrayList<Point> pathPoints , double xValue){
        // Iterates through the list of points
  
        for(int i = 0 ; i < pathPoints.size(); i ++){
            /* If statement checks the x value of the current point in the iteration process is
             equal to the x value you are looking for */
  
            if(pathPoints.get(i).x == xValue){
                return true;
            }
        }

       // returns false if none of the x values of the points in the list were equal to the xValue
       return false;
    }

rohitdasari0424's Projects

docsify icon docsify

🃏 A magical documentation site generator.

docsify-tabs icon docsify-tabs

A docsify.js plugin for rendering tabbed content from markdown

just-the-docs icon just-the-docs

A modern, high customizable, responsive Jekyll theme for documention with built-in search.

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.