Open jkleiber opened 1 year ago
My initial perspective is the following:
isFinished()
always returns true). This reduces complexity, and we can cancel the command using button bindings. Generally our subsystems should be "set and forget" rather than relying on commands to actively manage the robot state.With respect to point 4 above, there are some commands that may seem to involve complexity that actually don't. For example, in 2015 Recycle Rush, my former team had a really complicated system for automatically stacking totes. However, all of this complexity was managed by the subsystem in its periodic method The stacking algorithm is simple: Elevator:
But the constraints were complicated:
Therefore the periodic function (if this had been written in C++) for the elevator code would need to know:
All this to say, I think a StackCommand could be implemented such that it runs as long as the Stack button is held. isFinished can be true always because the subsystems independently work together.
But this is where point 1 comes in: If both subsystems need to know where the other one is in order to avoid collision (this robot needed that capability early in the season until those problems were designed out), then the Hardware interface is actually useful (for sensors). So it probably makes sense for the actuators to be local to their specific SubsystemIO, but the sensors to be in a Sensor interface that may be shared between SubsystemIOs
Simulation is a big consideration. Realistically, we probably will get limited support for simulated devices (like CANSparkMax
). The intent of the SubsystemIO classes is to drive the real robot or the simulation, so I think it doesn't really matter if we move the actuators into those classes as long as we have a ProcessIO
and a ProcessSimIO
function. I still think it makes sense to keep the SensorInterface centralized in case subsystems want to share sensors, and it allows us to expand back out into this framework in the future, so maybe we just don't nuke it for now and only use it for sensors?
Yeah, if it works
Summary In the port + improvement we made a lot of design decisions re: software architecture. It would be good to take a look at these decisions and make sure they were the right ones.
Specifically, I'd like to consider our stance on:
Work to Do