Class Mecanum

java.lang.Object
dev.narlyx.tweetybird.Drivers.Mecanum
All Implemented Interfaces:
TweetyBird.Driver

public class Mecanum extends Object implements TweetyBird.Driver
A simple example driver for a Mecanum drivetrain setup.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Used to configure and start the driver.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor used to setup all variables from builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setHeading(double axial, double lateral, double yaw, double speed)
    This method will power all four motors based on a target Axial, Lateral, Yaw, and Speed input
    void
    This method will stop all of the motors and attempt to lock them in place

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Mecanum

      public Mecanum(Mecanum.Builder builder)
      Constructor used to setup all variables from builder.
      Parameters:
      builder - Passed builder
  • Method Details

    • setHeading

      public void setHeading(double axial, double lateral, double yaw, double speed)
      This method will power all four motors based on a target Axial, Lateral, Yaw, and Speed input
      Specified by:
      setHeading in interface TweetyBird.Driver
      Parameters:
      axial - Value from -1 to 1 to favor the axial direction
      lateral - Value from -1 to 1 to favor the lateral direction
      yaw - Value from -1 to 1 to set rotation
      speed - Value from 0 to 1 to set how fast the bot will cary out axial and lateral
    • stopAndHold

      public void stopAndHold()
      This method will stop all of the motors and attempt to lock them in place
      Specified by:
      stopAndHold in interface TweetyBird.Driver