Skip to content

Conversation

@JAMthepersonj
Copy link
Contributor

No description provided.

@Levercpu
Copy link
Contributor

this doesnt appear to be using the newly created class of TunablePidManager. Also why are we doing pid tuning in swerve debug mode and not tuning mode. this appears to not follow the conventions for pid tuning set by the hihi extender commit. I might be wrong and you should ask ben before doing any of the stuff I say but if he says then look at how the extender pid tuning is written.

this.poseEstimator =
new PoseEstimator(
frontLeft, frontRight, backLeft, backRight, apriltagIO, kinematics, getLastGyro());
if(Constants.SWERVE_DEBUG){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the constant TUNING_MODE?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's probably reasonable, we can enable/ disable this as a whole

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


private final SparkMax driveMotor;
private final SparkBaseConfig driveConfig;
private final SparkMaxConfig driveConfig;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't actually be keeping this around, we've seen it's better to only have local variable versions of the config objects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

SmartShuffleboard.put("Drive", "BL ABS Pos", backLeft.getAbsPosition());
SmartShuffleboard.put("Drive", "BR ABS Pos", backRight.getAbsPosition());
}
if(Constants.SWERVE_DEBUG){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per Aditya's ideas, switch this to TUNING_MODE

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Override
public void updateConfig(
double closedLoopRampRate, double secondaryCurrentLimit, int smartCurrentLimit) {
driveConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't re-use the instance variable, create a new instance of the config here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

neo-Aditya
neo-Aditya previously approved these changes Feb 25, 2025
Copy link
Contributor

@neo-Aditya neo-Aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, is this tested?

codetoad added 2 commits February 25, 2025 18:48
# Conflicts:
#	src/main/java/frc/robot/constants/GameConstants.java
Copy link
Contributor

@neo-Aditya neo-Aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull from main

@Levercpu
Copy link
Contributor

yeah pull from main if possible

@Levercpu Levercpu added needs testing Needs testing on real robot stale labels Mar 28, 2025
@neo-Aditya neo-Aditya removed the stale label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs testing Needs testing on real robot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants