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

Feat/arm #6

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Feat/arm #6

wants to merge 21 commits into from

Conversation

cyrusnaficy
Copy link

Eric & I wrote subsystem and commands

Copy link
Contributor

@e-bauman e-bauman left a 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
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor

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

@Ericxiyinyang
Copy link

@e-bauman all changes implemented

@e-bauman e-bauman self-requested a review December 13, 2024 21:49
subsystem/arm.py Outdated Show resolved Hide resolved
command/arm.py Outdated Show resolved Hide resolved
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