Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Superstructures #145

Open
wants to merge 1 commit into
base: mf3-dev
Choose a base branch
from
Open

Superstructures #145

wants to merge 1 commit into from

Conversation

rcahoon
Copy link
Member

@rcahoon rcahoon commented Dec 10, 2024

Description

Add support for encapsulating Mechanisms into superstructures.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Be detailed so that your code reviewer can understand exactly how much and what kinds of testing were done, and which might still be worthwhile to do.

  • Unit tests: Units tests for new functionality are included in this PR
  • Simulator testing: [Add your description here]
  • On-robot bench testing: [Add your description here]
  • On-robot field testing: [Add your description here]

@rcahoon rcahoon requested a review from dejabot December 10, 2024 17:03
Copy link
Contributor

@dejabot dejabot left a comment

Choose a reason for hiding this comment

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

did you debate having superstructures be an attribute of Mechanism vs having Superstructure as a subclass of Mechanism (maybe with the ctor taking the constituent Mechanisms as arguments)? if so, curious about any rationale there. (you've thought about this a lot more - my initial instinct here would be to have Superstructure be a subclass, but I haven't thought through potential gotchas yet...)

@rcahoon rcahoon force-pushed the rcahoon/mf3-conditions branch from c45557f to 136abd9 Compare December 13, 2024 05:25
@rcahoon rcahoon force-pushed the rcahoon/mf3-superstructure branch from e7abdd1 to dad9af2 Compare December 13, 2024 05:25
@rcahoon rcahoon force-pushed the rcahoon/mf3-conditions branch from 136abd9 to a6da2db Compare December 13, 2024 05:34
@rcahoon rcahoon force-pushed the rcahoon/mf3-superstructure branch from dad9af2 to 5f32fb1 Compare December 13, 2024 05:41
@rcahoon rcahoon force-pushed the rcahoon/mf3-conditions branch from a6da2db to 0004857 Compare December 13, 2024 06:09
@rcahoon rcahoon force-pushed the rcahoon/mf3-superstructure branch from 5f32fb1 to b12b003 Compare December 13, 2024 06:09
@rcahoon
Copy link
Member Author

rcahoon commented Dec 14, 2024

did you debate having superstructures be an attribute of Mechanism vs having Superstructure as a subclass of Mechanism (maybe with the ctor taking the constituent Mechanisms as arguments)? if so, curious about any rationale there. (you've thought about this a lot more - my initial instinct here would be to have Superstructure be a subclass, but I haven't thought through potential gotchas yet...)

Talked through this offline. We're going to have a Superstructure base class, but do this:

public class Arm extends Superstructure<...> {
    ...

    public Arm() {
        this.shoulder = addMechanism(new Shoulder());
        this.elevator = addMechanism(new Elevator());
        this.wrist = addMechanism(new Wrist());
    }

    ...
}

@rcahoon rcahoon force-pushed the rcahoon/mf3-conditions branch 2 times, most recently from ad7d77a to c6264db Compare December 14, 2024 10:08
Base automatically changed from rcahoon/mf3-conditions to mf3-dev December 14, 2024 10:10
@rcahoon rcahoon force-pushed the rcahoon/mf3-superstructure branch from b12b003 to 76d8c55 Compare December 14, 2024 21:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants