Replies: 20 comments 1 reply
-
@Oliver-Cushman are you fine with tackling this? 😗 |
Beta Was this translation helpful? Give feedback.
-
yeah i got it. for now ill hold off from instantiating it in robotcontainer until the whole file is done. |
Beta Was this translation helpful? Give feedback.
-
This should be complete with the last commit, 3554991; however, I think that we need to pass in the Commands, not the Subsystems, into the handoff. This will fit with our flowchart because the handoff does not need to communicate with the subsystems directly |
Beta Was this translation helpful? Give feedback.
-
That can only be done when the method for that is implemented into the Commands themselves, so I'm moving that back into in progress |
Beta Was this translation helpful? Give feedback.
-
The handoff needs to run the commands in the subsystems though, no? If we want to do things like intake.toShooter().andthen(waitSeconds()).andThen(shooter.stop().alongWith(pivot.reset())) then we would need at least |
Beta Was this translation helpful? Give feedback.
-
This is an interesting discussion, and I'm glad what we are talking about. I had this discussion with Rudy in class today. If we were to use the subsystem methods inside of the handoff/piece control, that would cause the logic to be extended down into the handler, which really should only be controlling the interaction between the subsystems. If we were to only keep the Commands for the shooter (which needs to be done, if we were to extend the logic down), the logic flowchart would look like this: The handoff should really only be controlling the interaction, not what each subsystem is doing as a response to those interactions. Of course, it's always possible to move the subsystem logic down to the handler; however, that file is responsible for more things overall and might get overwhelming to determine what this class is supposed to do. The goal of the command files is for the handler to be able to edit and control groups of subsystems at a time instead of each one individually. Both work, but I'd love to hear everyone's thoughts. |
Beta Was this translation helpful? Give feedback.
-
I think it might be smarter to instantiate the ShooterCalc class for example, and then I can just modify the constructor in that class to create a new pivot and shooter. |
Beta Was this translation helpful? Give feedback.
-
Do you think that the elevator command should exist as well? |
Beta Was this translation helpful? Give feedback.
-
Well I'm not sure how you want to handle the elevator considering it actually extends Command rather than just being a class composed of command methods like ShooterCalc. |
Beta Was this translation helpful? Give feedback.
-
Most likely, that will be changed to the same format as ShooterCalc, depending on the outcome of this issue. |
Beta Was this translation helpful? Give feedback.
-
By the way, should handoff use prepareFireMovingCommand instead of prepareFireCommand? Because prepareFireCommand will just start preparation for the position it is given, and prepareFireMoveCommand repeatedly changes shooter speed and angle based on current swerve position. In my opinion this might be a better option because I don't think we want to stand still before we even start orienting and speeding up our shooter, and it would be better to already have it mostly ready by the time we are ready to shoot. |
Beta Was this translation helpful? Give feedback.
-
I personally think it would be better to make it another file composed of commands, but you should have that conversation with Rudy as I don't know his full idea of what the class is. |
Beta Was this translation helpful? Give feedback.
-
I agree, ill make that change now for #27 |
Beta Was this translation helpful? Give feedback.
-
I was able to talk with Rudy about it today, and he said that he would start converting the file soon. I appreciate the advice. |
Beta Was this translation helpful? Give feedback.
-
I believe that the current state of public Command placeTrap() {
return new ElevatorCommand(ElevatorConstants.TRAP_POSITION);
} and inside of PieceControl.java:
public Command placeTrap() {
return elevator.getPlacementCommand(ElevatorConstants.TRAP_POSITION)
.andThen(claw.outtake());
}
. . .
Elevator.java:
public Command getPlacementCommand(double position) {
return runOnce(() -> motor.setTargetPosition(position))
.andThen(Commands.waitUntil(this::getAtDesiredPosition);
} |
Beta Was this translation helpful? Give feedback.
-
Back to the topic of this issue: It is smart to keep all subsystems in This is starting to stray away from the root issue of subsystems being passed into the constructor of whatever file is meant to manage them, even if they aren't yet used outside of the file. Should a sister issue be created, or should this be converted to a discusion? |
Beta Was this translation helpful? Give feedback.
-
I agree, I think that Elevator Command going back to being a file that extends command and just moves the arm to the needed position and then placing with the claw is the cleanest solution (though we do need an outtake command for the claw, which is already made so it's chill_ |
Beta Was this translation helpful? Give feedback.
-
I think we can change this to a discussion on the general strucuture of the code and piece manager file, and that that discussion shouldn't necessarily be finalized until we at least have a bot, figure out any issues with our structure, and figure out what works the best |
Beta Was this translation helpful? Give feedback.
-
I'd like to jump in on this, I don't mind the removal of the elevator class/command, however I guess I'm still confused on the structure that you are suggesting. Do you mean to remove elevator and shooter calc entirely? Or maybe to rename the handler to placement.java? Or if this is just a concern about the commands file, we could just move the commands to the subsystem folder that they control. i would love to talk with you about this at lunch. @GalexY727 @RudyG252 @Oliver-Cushman |
Beta Was this translation helpful? Give feedback.
-
This was already resolved and ended up becoming a situation that is simular to the tldaw |
Beta Was this translation helpful? Give feedback.
-
BEFORE THIS WAS A DISCUSSION IT WAS AN ISSUE:
Scroll down to dive deeper and unearth this discussion
Issue: Subsystems as parameters rather than creating new objects
Make the handoff command accept parameters for the subsystems it requires rather than making new subsystems in its constructor. pass those in from the robot container.
Beta Was this translation helpful? Give feedback.
All reactions