frc4123 / 2024 Goto Github PK
View Code? Open in Web Editor NEWthe official code for the 2024 season
License: Other
the official code for the 2024 season
License: Other
SmartDashboard.putNumber("Robot Heading", getHeading());
SmartDashboard.putString("Robot Location", getPose().getTranslation().toString());
SmartDashboard.putString("Swerve[" + cancoder.getDeviceID() + "] state", state.toString());
SmartDashboard.putNumber("Swerve[" + cancoder.getDeviceID() + "] abs enc", getAbsoluteEncoderRad());
SmartDashboard.putString("swerve inputs", String.format("xSpeed: %.2f\tySpeed: %.2f\tturningSpeed: %.2f", xSpeed, ySpeed, turningSpeed));
SmartDashboard.putString("Front Left State", frontLeft.getState().toString());
SmartDashboard.putString("Front Right State", frontRight.getState().toString());
SmartDashboard.putString("Back Left State", backLeft.getState().toString());
SmartDashboard.putString("Back Right State", backRight.getState().toString());
public static final double kDriveMotorGearRatio = 1 / 6.75;
andpublic static final double TurningMotorGearRatio = 1.0 / (150 / 7);
angleRotations = Math.IEEEremainder(angleRotations, 1);
Wheels turning without chaos, but not facing the right direction
A. If all driving is reversed, (forward = backward | left = right)
B. If Wheels are in "X" formation
new Translation2d(kWheelBase / 2, kTrackWidth / 2), // front left
new Translation2d(kWheelBase / 2, -kTrackWidth / 2), // front right
new Translation2d(-kWheelBase / 2, kTrackWidth / 2), // back left
new Translation2d(-kWheelBase / 2, -kTrackWidth / 2)); // back right
C. If Wheels will face correct direction when aligned in same direction (before robot booting) but will not work if wheels are turned to all different directions (before robot booting)
driveEncoder.setPosition(0);
turnEncoder.setPosition(getAbsoluteEncoderRad());
Wheels seem to be turning and overcorrecting themselves (too jerky turns)
public static final double kPTurning = 0.4;
return Math.IEEEremainder(-gyro.getAngle(), 360);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.