Skip to content

Fix rewired arm encoders#128

Open
ErikCald wants to merge 4 commits intomainfrom
Erik-FixArmEncoders
Open

Fix rewired arm encoders#128
ErikCald wants to merge 4 commits intomainfrom
Erik-FixArmEncoders

Conversation

@ErikCald
Copy link
Collaborator

@ErikCald ErikCald commented Dec 5, 2023

Software asked Hardware to rewire the through bore arm encoders in order to practice/test to make sure we can it.

Previously we had the through bore encoders wired directly into the roborio, and used that absolute encoder to set the NEO internal encoder.

With the new wiring, the through bore encoder is directly plugged into the sparkmax, eliminating the need for syncing encoders all together. Also, we can now run the PID on the arm directly through the absolute encoder which has more resolution. The absolute encoder also has less slop than the NEO encoder because it's 1:1 with the output shaft.

I wanted to quickly get this working on 2023 main because too many students are dependent on it, and in case we have outreaches with poseidon.

Reordered burn flashing and encoder syncing. Now it will completely finish doing the encoder syncing and then call burn flash on the sparkmaxes.

Seems calling burnFlash on the sparkmax was holding up the sparkmax while the encoder syncing was trying to be done.
Reducing speed for outreaches mainly.
@ErikCald ErikCald self-assigned this Dec 5, 2023

public static final double TOP_NEO_GEAR_RATIO = Config.robotSpecific(23.5, 0.0, 0.0, 0.0, 0.0, 60.0, 60.0); //comp --> 23.5
public static final double BOTTOM_NEO_GEAR_RATIO = 62.5;
public static final double TOP_NEO_GEAR_RATIO = Config.robotSpecific(1.0, 0.0, 0.0, 0.0, 0.0, 60.0, 60.0); // NEO Encoder gear ratio is 23.5;
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Suggest to have a different name to avoid confusion, i.e., don't use NEO_GEAR_RATIO.
  2. Why original top and bottom gear ratios are different?

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.

2 participants