-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/arm #6
base: main
Are you sure you want to change the base?
Feat/arm #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall good but a few small changes. since there is no absolute encoder on the arm we need to zero differently
subsystem/arm.py
Outdated
self.arm_moving = False | ||
return True | ||
else: | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add methods to get motor current and drive the arm up and down
subsystem/arm.py
Outdated
self.zeroed = True | ||
|
||
# Extends arm to an radians | ||
def extend(self, radians: radians) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure that the angle is between the min and max value of the arm before setting angle
command/arm.py
Outdated
|
||
def end(self, interrupted: bool): | ||
if interrupted: | ||
self.subsystem.zeroed = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zero arm command should drive arm down slowly until current is above a certain threshold. then stop the arm and set motor sensor to 0.
subsystem/arm.py
Outdated
def __init__(self): | ||
super().__init__() | ||
self.arm_motor = TalonFX(can_id=constants.ARM_MOTOR_ID, config=config.arm_config) | ||
self.arm_motor_follower = TalonFX(can_id=constants.ARM_MOTOR_ID, inverted=True, config=config.arm_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each motor has its own id. also can ids should be in config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can ids will be 10 and 11
@e-bauman all changes implemented |
Eric & I wrote subsystem and commands