You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the command that well read the joystick inputs from the driver and then tell the SwerveSubsystem to go a certain X speed, Y speed and rotating speed. It can be greatly improved through acceleration limiters, slow modes, etc.
We already have acceleration limiters using SlewRateLimiters but they are used before multiplying by the max speed and it should instead be after. This will result in the unit of the limiter being m/s/s which will be easier to tune.
Implement a slow mode button. A button that changes the desired max speed which will remap the joystick to go slower, giving more resolution.
Implement an outreach mode vs competition mode which will slow down the robot (to avoid damaging people’s carpet…). Could use networktables to set comp mode vs outreach mode but if FMS is attached, force comp mode.
After improving this command, look back at Merge’s SwerveTeleop from last year. It used clever OOP code to allow the command to be extended and the rotation to be overridden by auto code but kept the driver controls of the X and Y (or any combination of X, Y, and rot overriden)
Here's the proper bit for converting linearMagnitude and linearDirection back into X, Y speeds. I put the code from the GeomUtil into this line. I'm not sure why this piece has to be so complicated.
// Calcaulate new linear componentsTranslation2dlinearVelocity =
newPose2d(newTranslation2d(), linearDirection)
.transformBy(newTransform2d(newTranslation2d(linearMagnitude, 0.0), newRotation2d()))
.getTranslation();
This is the command that well read the joystick inputs from the driver and then tell the SwerveSubsystem to go a certain X speed, Y speed and rotating speed. It can be greatly improved through acceleration limiters, slow modes, etc.
Here are some good examples from here teams:
The text was updated successfully, but these errors were encountered: