Skip to content

Conversation

@achung28
Copy link

No description provided.

@e-bauman e-bauman changed the base branch from main to dev December 16, 2025 21:26
.with_neutral_mode(signals.NeutralModeValue.BRAKE)
).with_feedback(
configs.FeedbackConfigs()
.with_feedback_remote_sensor_id(signals.FeedbackSensorSourceValue.FUSED_CANCODER)
Copy link
Contributor

Choose a reason for hiding this comment

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

include the gear ratio

self.pivot_motor.set_sensor_position(
self.pivot_angle * constants.intake_pivot_gear_ratio / (2 * math.pi)
)
pos = self.pivot_angle * constants.intake_pivot_gear_ratio / (2 * math.pi)
Copy link
Contributor

Choose a reason for hiding this comment

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

include the gear ratio in the feedback config so that you don't need to here

/ constants.intake_pivot_gear_ratio
* math.pi
* 2
self.pivot_motor_pos.value / constants.intake_pivot_gear_ratio * math.pi * 2
Copy link
Contributor

Choose a reason for hiding this comment

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

if you include the gear ratio in the config you don't need to do it here

setting the angle of the pivot
"""

ff = config.intake_max_ff * math.cos(config.intake_ff_offset - angle)
Copy link
Contributor

Choose a reason for hiding this comment

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

if the gear ratio is done above you don't need to do the gravity feedforward here

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