GithubHelp home page GithubHelp logo

steelridgerobotics / 2024waffles Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 278 KB

Our team's 2nd iteration of swerve drive made for the 2024 season, Crescendo

Home Page: https://www.steelridge6343.com/

License: GNU General Public License v3.0

Python 100.00%
2024-crescendo crescendo frc frc-crescendo frc-robot path-planner python python-3 python3 robotpy swerve-drive wpilib

2024waffles's Introduction

Waffles

Waffles is Steel Ridge Robotics' (FRC 6343) official swerve drive codebase, which began development in late 2022.

What is swerve drive?

Swerve drive is an omnidirectional drive train where all wheels are independently steered and driven. This gives us unique advantages over other drive trains:

  • Strafing, driving left to right, is possible and more efficient than mechanum drive trains.
  • More speed conserved when turning, since the robot has no need to rotate.
  • More traction with the ground than a mechanum drive train. (Can't be pushed around as easily)
  • Flexing on other teams.

Software Overview

Waffles contains the following:

  • Fused CANcoders for precise steering
  • Continuous wrap for optimized steering
  • Motion profiling combined with field-orientated control to reduce skidding and improve handling.
  • Ability to switch between robot-centric and field-relative modes.
  • Skidding and collision detection, to compensate for errors in autonomous driving.
  • Advanced joystick mapping to ensure maximum speed.
  • PathPlanner support (includes Choreo configuration)
  • NavX simulation
  • Full simulation support for all modes
  • Auto Trajectories Visualized in Shuffleboard
  • Shuffleboard and Elastic Support

Technical Overview

Our swerve drive is comprised of the following:

  • 4 swerve modules in each corner of the base frame
    • 2 motors in each modules (8 motors total)
      • 1 for steering the wheel (the "steer motor")
      • 1 for driving/spinning the wheel (the "drive motor")

We use Falcon 500s for each motor, as well as 1 CANcoder for each module.

2024waffles's People

Contributors

cheeseburger4 avatar pickleface5 avatar thesavagedemon avatar

Stargazers

 avatar  avatar

Watchers

 avatar

2024waffles's Issues

Direction Motor "Tail Wagging"

Essentially, sometimes the direction motors will start oscillating back and forth 4-8 times then go into the correct angle.

Possible causes for this:

  • Improper tuning, due to being tuned on blocks and not on the carpet.
  • Issue with our current method for changing direction.
  • Conflicting values from kinematics optimizing the angle.

Rotation is not applied correctly for Autonomous

Rotation does not seem to work with PathPlanner. Translating works fine, but rotating in any auto path causes the robot to spin too much. The issue is likely caused by an issue with odometry or reading the gyro angle.

Fully Functional Drive Motors

Drive motors need to achieve the following:

  • Achieve max attainable speed forward and backwards
  • Brake quickly
  • Remain at a constant speed for any amount of time, regardless of “voltage sag”
  • Tuned for constant and measurable speed and acceleration
  • Tuned to account for “wheel slip” and friction when accelerating

Drivetrain Characterization

Drivetrain Characterization is tuning the entire drivetrain itself to ensure that no matter the current conditions of the robot, whether it be wheel slip, voltage sag, or some other unknown effect, the drivetrain performs equally in all environments. This is to ensure that in autonomous, the robot moves to exactly the right spot each time no matter the conditions.

MotionMagicVelocity for Drive Motors

Switching from Velocity to Voltage will let us create a motion profile for the drive motors, allowing us to pass in the maximum allowed acceleration (rps/s) and cruise velocity (rps) for our drive train. This fixes a multitude of issues, such as:

  • Wheels won't "slip" on the floor, lowering in-comp acceleration
  • Wheels will travel at an easily controlled velocity
  • Full control throughout the entire motion

If this turns out it isn't needed for teleop, this would be excellent for autonomous at least, due to reducing the amount of external factors that could cause auto drift during a match.

Failsafe Autonomous Path

The Failsafe auto path is the simplest auto we'll create for the robot:

  1. Move forward, out of the robot starting zone.
  2. Stop

That's literally it. Nothing fancy, just a few extra points for leaving our zone. 🥳

Rotation Stabilizing

Rotation stabilizing check the current angle of the robot compared to the current angle and adjusts it every tick to ensure we're facing the right orientation. This is very useful in the following scenarios:

  • In teleop, hitting the edge of another robot or game object.
  • Crashing into another robot in auto
  • Drift in teleop or auto due to incorrect tuning

This has not been done before and is new to our team, so this will definitely be a challenge,

Working Odometry

Odometry lets us track the robots position by taking the position and angle of each wheel and calculating it's position relative to the game field.

Fully Functional Direction Motors

Direction motors (motors in charge of rotating the wheels to specific orientations) need to achieve the following:

  • Rotate to any angle with little to no error
  • Correctly optimize rotation when needed
  • Correctly adjust to the correct starting orientation when the robot is enabled/disabled

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.