Skip to content

Conversation

@kujo27
Copy link
Contributor

@kujo27 kujo27 commented Mar 2, 2025

Why are we doing this?

Asana task URL:

Whats changing?

Added a safety so elevator will not lower when coral arm is greater than 120 degrees.

Questions/notes for reviewers

How this was tested

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

Video/screenshots (from simulator or live robot)


PR feedback legend

Symbol Meaning
⭐ ⭐ ⭐ must be addressed
⭐ ⭐ should be addressed
something to consider, a good idea

@kujo27 kujo27 requested a review from a team as a code owner March 2, 2025 01:19
@kujo27 kujo27 changed the title Elevator Safety Elevator Safety When Coming Down Mar 2, 2025

private boolean wouldHitBranch(Distance targetValue) {
var coralArmAngleDangerous = coralArm.getCurrentValue().gt(Degrees.of(coralArmCollisionAngleDegrees.get()));
var elevatorIsMoving = elevator.getTargetValue() != elevator.getCurrentValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

This will always be true; you'll have a scenario like:
getTargetValue == 0.458678758
getCurrentValue == 0.458999212

var currentValue = elevator.getCurrentValue();
var wouldCollide = wouldHitBranch(elevator.getTargetValue());
var currentTarget = wouldCollide
? elevator.getCurrentValue()
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐ ⭐ instead of limiting this to the current value, you could make it where the threshold is so the elevator is allowed to come down until that point?

@aschokking aschokking requested a review from JohnGilb March 5, 2025 18:35
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.

4 participants