Skip to content

[climber] feat: 初步增加climber程式#65

Open
wayx112 wants to merge 8 commits intomainfrom
ClimberV2
Open

[climber] feat: 初步增加climber程式#65
wayx112 wants to merge 8 commits intomainfrom
ClimberV2

Conversation

@wayx112
Copy link
Contributor

@wayx112 wayx112 commented Mar 2, 2026

No description provided.


public void shoot() {
double targetVelocity = ShooterConstants.targetVelocity;
double targetVelocity = SmartDashboard.getNumber("Shooter Target Velocity", ShooterConstants.targetVelocity);
Copy link
Contributor

Choose a reason for hiding this comment

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

這個是不是不小心 commit 到了

SmartDashboard.putNumber("shooterVelocity", getShooterVelocity());
SmartDashboard.putNumber("shooterMotorVoltage", shooterMotor.get() * shooterMotor.getBusVoltage());
SmartDashboard.putData("ShooterSubsystem", this);
SmartDashboard.getNumber("Shooter Target Velocity", ShooterConstants.targetVelocity);
Copy link
Contributor

Choose a reason for hiding this comment

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

這個是不是也不小心 commit 到了?

@wayx112 wayx112 requested a review from Hannahjjj97 March 3, 2026 12:34

public Command climbUpCmd() {
Command cmd = runEnd(this::climbUp, this::stopClimb);
cmd.setName("Climb Up");
Copy link
Contributor

Choose a reason for hiding this comment

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

命名要跟其他 subsystem 一樣用小駝峰式命名

Copy link
Contributor

Choose a reason for hiding this comment

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

下面的也是


public Command climbUpCmd() {
Command cmd = runEnd(this::climbUp, this::stopClimb);
cmd.setName("Climb Up");
Copy link
Contributor

Choose a reason for hiding this comment

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

下面的也是

return encoder.getDistance(); // Adjust distance per pulse if necessary
}

private double manualClimbControl(double setpoint) {
Copy link
Contributor

Choose a reason for hiding this comment

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

為什麼這個叫作 manual 可是是用 PID 控制阿

Comment on lines +23 to +27
climbMotor = new SparkMax(ClimberConstants.climbMotorId, MotorType.kBrushless);

encoder = new Encoder(ClimberConstants.climbEncoderIdA, ClimberConstants.climbEncoderIdB);
pidController = new PIDController(ClimberConstants.climberKp, ClimberConstants.climberKi,
ClimberConstants.climberKd); // Adjust PID constants as needed
Copy link
Contributor

Choose a reason for hiding this comment

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

要不要看一下其他 subsystem,new 一個物件的程式他們都沒有寫在建構式裡面,是直接寫在類別裡面。要不要跟他們一樣

Copy link
Contributor

Choose a reason for hiding this comment

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

然後 pidController 要不要換個名字,有點看不出來他是幹嘛的


@Override
public void periodic() {
// This method will be called once per scheduler run
Copy link
Contributor

Choose a reason for hiding this comment

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

要不要先把一些可能會需要看的參數先放出來

@wayx112 wayx112 requested a review from Hannahjjj97 March 5, 2026 04:56
@wayx112 wayx112 requested a review from BrianHu0925 March 6, 2026 10:16
@BrianHu0925
Copy link

老哥還有個 checkstyle 問題喔

@Hannahjjj97
Copy link
Contributor

有衝突喔

@Hannahjjj97
Copy link
Contributor

余悅有整理過 dashboard,climber dashboard 資料要改成同個格式喔

@Hannahjjj97
Copy link
Contributor

然後可能先用這個分支測完之後 沒問題再 merge 喔,motor id 記得確認一下

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