Skip to content

Indexer - #12

Open
Wow-Jr wants to merge 12 commits into
mainfrom
indexer
Open

Indexer#12
Wow-Jr wants to merge 12 commits into
mainfrom
indexer

Conversation

@Wow-Jr

@Wow-Jr Wow-Jr commented Jan 27, 2026

Copy link
Copy Markdown

No description provided.

@Quantalabs
Quantalabs self-requested a review January 27, 2026 02:00

@Quantalabs Quantalabs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TODOs can be ignored for now, they will be implemented with other branches, they are just reminders.

try {
lc.setRangingMode(LaserCan.RangingMode.SHORT);
lc.setRegionOfInterest(new LaserCan.RegionOfInterest(8, 8, 16, 16));
lc.setTimingBudget(LaserCan.TimingBudget.TIMING_BUDGET_33MS);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why?


public class IndexerConstants {

public static final int MOTOR_ID = 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public static final int MOTOR_ID = 0;
// TODO: Set IDs
public static final int MOTOR_ID = 0;

/** command that modifies hasBall, uses getDistanceMm() */
private void checkForBall() {
double x = getDistanceMm();
if (x == IndexerConstants.LaserCan_DefaultMeasurement) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (x == IndexerConstants.LaserCan_DefaultMeasurement) {
if (x >= IndexerConstants.LaserCan_DefaultMeasurement) {

Comment thread src/main/java/frc/robot/subsystems/indexer/Indexer.java
private boolean hasBall;

/** setup, adding motor and laser */
private Indexer() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add a getInstance method, otherwise nobody can use this code.

return setSpeed(IndexerConstants.InactiveSpeed);
}

/** command to sense distance from camera; used to sense if bol */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/** command to sense distance from camera; used to sense if bol */
/** command to sense distance from LaserCAN; used to sense if bol */

double x = getDistanceMm();
if (x == IndexerConstants.LaserCan_DefaultMeasurement) {
hasBall = false;
} else {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
} else {
} else if (x != -1) {

Wow-Jr and others added 5 commits January 26, 2026 18:26
* Remove entire robot/lib/swerve folder and replace all references with subsystem/ctre/CtreDriveConstants

* Remove WheelTracker, Pigeon, SwerveModule, and TalonFxManager from codebase.

* Deprecate RobotState, CancoderManager, AutoPilotCommand and SnapCommand etc

* Deprecate limelight-based vision localization code

* Deprecated robot/lib/drivers folder and its classes (CanDeviceId and Phoenix6Util)

* reformat to prepare for sysID tuning

* feat: automode scaffolding and PIDV, validation on first complex path on the field.

* fix: pid to pose

* tested snap and it work :D

* minor refactor

* refactor of the refactor

* feat: sysid tuning for drive-motors, verified on robot.

* finetuning steer-drive coupling ratio

* Merged from 2025RobotTest

* Trajectory update soon

* i think later though

* minor change

* FEAT: SysID Rotation routine and logs

* feat: enable VisualVM to debug RAM issues

* feat: add steer motor offsets of the 2nd bot

* feat: add radialDeadband to fix yaw impulse when driver releases stick

* fix kCoupleRatio value for steer/drive coupling

* Pid to pose borke again

* Fixed PIDToPose

* last few bugs trust

* aarush's test branch

* added controller

---------

Co-authored-by: dcao6668 <dcao6668@gmail.com>
Co-authored-by: github-0-0 <tomcao36@gmail.com>
Co-authored-by: APandit1-cpu <aarushpandit1@gmail.com>
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