Skip to content

addRequirements vs. observation #19

@kevinfrei

Description

@kevinfrei

The 'addRequirements' aspect of commands and subsystems can result in messy designs. It would probably be better to try to factor things into "observing"vs. "controlling". For example, for a lift & claw intake style system, factoring the system into a lift & claw separately can result in cleaner, easier to understand code. The trouble arises when you're attempting to do something like automatically close the claw if an object is detected. In order to properly do this, the claw needs to observe the position of the lift. There's generally a design problem with this, where you need the claw to be able to observe the lift.

A more elegant solution to this might be to have a subsystem have a 'observing' interface and a 'controlling' interface. Commands have to go through the 'controlling' interface, but anything can use the 'observing' interface from the robot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions