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

Dynamic Auto Upgrades #142

Merged
merged 12 commits into from
Mar 2, 2024
Merged

Dynamic Auto Upgrades #142

merged 12 commits into from
Mar 2, 2024

Conversation

JohnGilb
Copy link
Contributor

@JohnGilb JohnGilb commented Feb 29, 2024

Why are we doing this?

Adding more features to the dynamic auto in preparation for the upcoming event.

  • Basic structure to mark special locations on the field to fire from (e.g. podium, or Spikes)
  • Special handling for notes up against obstacles

Asana task URL:

Whats changing?

  • Simulator now treats notes differently based on their states, for example, "hiding" unavailable notes by placing them under the field.
  • Temporarily changed the arm to always shoot at 0mm of extension until we can confirm the newer dynamic ranges.
  • Arm can now report the maximum range it knows how to shoot from, so we never try to shoot autonomously from further than that.
  • Added a new Availability, AgainstObstacle, to instruct the robot to try something different to deal with the note near the stage.
  • Refactored the NoteMap in to a generic ReservableLocationMap, that can be reused for any map of objects on the field that need to appear/disappear if they are used by other robots (like scoring locations!)

Questions/notes for reviewers

How this was tested

  • unit tests added
  • tested on robot
  • tested in simulator
    HandleStageNote

@JohnGilb JohnGilb marked this pull request as ready for review March 2, 2024 00:31
@JohnGilb JohnGilb requested a review from a team as a code owner March 2, 2024 00:31
@aschokking
Copy link
Contributor

For tested in simulator, I'd like to propose that going forward we include videos of it in the PRs, I think it would help make things a lot easier to understand. What do you think?

@@ -81,6 +81,11 @@ public class ArmSubsystem extends BaseSetpointSubsystem<Double> implements DataF
private int totalLoops = 0;
private int loopsWhereCompressorRunning = 0;

private static double[] experimentalRangesInInches = new double[]{0, 36, 49.5, 63, 80, 111, 136};
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐ ⭐ should our short-run thing be an array with only 1 item in it at the subwoofer distance?

Copy link
Contributor

Choose a reason for hiding this comment

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

That way getMaximumRangeForAnyShotMeters would be limited naturally to that distance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll update - two entries is less likely to cause issues, so I'll just have the range be between 0 and subwoofer*1.2 or so.

* Should be called in AutonomousInit
*/
public void freezeConfigurationForAutonomous() {
//
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐ note about what this should eventually do?

public static Pose2d CenterLine3 = new Pose2d(8.2956, 4.1056, new Rotation2d());
public static Pose2d CenterLine4 = new Pose2d(8.2956, 2.4292, new Rotation2d());
public static Pose2d CenterLine5 = new Pose2d(8.2956, 0.7528, new Rotation2d());
public static Pose2d CenterLine1 = new Pose2d(8.2705, 7.4584, new Rotation2d());
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐ should these be a shared number?

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'll add it to the BasePoseSubsystem and reference it here.

@JohnGilb JohnGilb merged commit ea80915 into main Mar 2, 2024
1 check passed
@JohnGilb JohnGilb deleted the feature/DyanmicAutoUpgrades branch March 2, 2024 01:25
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.

3 participants