Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For tracking changes in game robot: Post sfr #59

Draft
wants to merge 72 commits into
base: main
Choose a base branch
from
Draft

Conversation

RobertTheBlair
Copy link
Contributor

This PR will give observers notification of new code on game branch, and help review code

// String logfolder = "/home/lvuser";
// Logger.addDataReceiver(new WPILOGWriter(logfolder));
// Logger.addDataReceiver(new NT4Publisher());
// Logger.start();

//SignalLogger.enableAutoLogging(true);
//SignalLogger.start();
SignalLogger.setPath("/home/lvuser/log/");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want these in the code during game time?
Do we want this for all containers, even the test ones?


DataLogManager.start();
DriverStation.startDataLog(DataLogManager.getLog());

UtilMath.overhand.put(1.33, 236d); //S2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be initialized in the arm subsystem, since that's the user. Code in Robot class should be very generic.

@@ -17,7 +18,7 @@ public class ScoreInTrapStutter extends SequentialCommandGroup {
public ScoreInTrapStutter(PizzaBoxSubsystem pizzaBoxSubsystem, ArmSubsystem armSubsystem) {
addCommands(
new PrintCommand("Score in trp stutter initialize"),
new SpinToArmAngle(armSubsystem, ArmSubsystem.Arm.TRAP_ANGLE).withTimeout(3));
new SpinToArmAngle(armSubsystem, ArmSubsystem.Arm.TRAP_ANGLE).withTimeout(3));


for(int index = 0; index < 8; index++)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we still want 8 tries?

@@ -11,8 +11,8 @@
public class Retract extends Command {
/** Creates a new Retract. */
private final ReactionSubsystem m_Subsystem;
private double currPos; //position in rotation
private double endPos;
//private double currPos; //position in rotation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's OK to delete dead code


// Called when the command is initially scheduled.
@Override
public void initialize() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wish we had a direct way to do this.

speed = 0;
}

if(booster)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would do the booster check earlier, so the sanity checks around encoder angle will win.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also should the booster work in both directions? here, it's only the positive value, even if the arm should be moving the other direction

@@ -70,7 +67,7 @@ public SwerveSubsystem(File directory)
System.out.println("}");

// Configure the Telemetry before creating the SwerveDrive to avoid unnecessary objects being created.
SwerveDriveTelemetry.verbosity = TelemetryVerbosity.NONE;
SwerveDriveTelemetry.verbosity = TelemetryVerbosity.HIGH;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want this as HIGH for game day?

@@ -81,7 +78,7 @@ public SwerveSubsystem(File directory)
{
throw new RuntimeException(e);
}
swerveDrive.setHeadingCorrection(false); // Heading correction should only be used while controlling the robot via angle.
swerveDrive.setHeadingCorrection(true); // Heading correction should only be used while controlling the robot via angle.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm curious how this drives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants