Skip to content

Conversation

@SyntaxBreak
Copy link
Contributor

Changed climber script to use postion control, PID still needs to be tuned.

Copy link
Contributor

@myrachauhan-ui myrachauhan-ui left a comment

Choose a reason for hiding this comment

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

Great! Would prefer the climb speed to be higher

@SyntaxBreak SyntaxBreak marked this pull request as draft January 29, 2026 01:26
@DannyPomeranian DannyPomeranian force-pushed the position-controlled-climber branch from d087ca6 to 851aafd Compare January 29, 2026 01:29
@SyntaxBreak SyntaxBreak changed the title Position controlled climber Limit switch climber Jan 29, 2026
@SyntaxBreak SyntaxBreak force-pushed the position-controlled-climber branch from 19b93fc to b3c59d8 Compare January 29, 2026 06:16
@SyntaxBreak SyntaxBreak force-pushed the position-controlled-climber branch from b3c59d8 to 7f8b4e0 Compare January 29, 2026 06:16
@SyntaxBreak SyntaxBreak marked this pull request as ready for review January 29, 2026 06:20
config.limitSwitch.forwardLimitSwitchType(
LimitSwitchConfig.Type.kNormallyOpen
).forwardLimitSwitchTriggerBehavior(
LimitSwitchConfig.Behavior.kStopMovingMotor
Copy link
Member

Choose a reason for hiding this comment

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

This is the default behaviour, right?

LimitSwitchConfig.Behavior.kStopMovingMotor
).reverseLimitSwitchType(
LimitSwitchConfig.Type.kNormallyOpen
).reverseLimitSwitchTriggerBehavior(LimitSwitchConfig.Behavior.kStopMovingMotor)
Copy link
Member

Choose a reason for hiding this comment

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

I suspect you want the reverse limit switch to zero the position? Otherwise this would start at an arbitrary position and your forward soft limit might not do what you expect.

MAX_FORWARD_EXTENSION, MAX_REVERSE_EXTENSION = 120, -120

current_climber_speed = will_reset_to(0.0)
forward_climber_speed, reverse_climber_speed = tunable(0.8), tunable(0.8)
Copy link
Member

Choose a reason for hiding this comment

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

nit: this would probably be clearer across multiple statements instead


if self.gamepad.getYButton():
self.climber.climb()
if self.gamepad.getBButtonPressed():
Copy link
Member

Choose a reason for hiding this comment

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

Why do we want these to only happen once on a button press?

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.

5 participants