# 20220207~20220210 設計組寒訓 ###### tags: `工作筆記 設計組` ## 20220207 ### 蔡程翔 #### 今日進度 - 準備製作機器人的材料 - 根據設計圖組裝機器人 - 根據不合理的地方再修改一下 #### 遇到問題 - 六角軸圖有點太短 - 支撐的2跟1吋2吋管上面沒有洞可以鎖 - 鎖底部的螺絲有點卡住 - 有人鑽錯洞~ #### 解決方法 - 修改圖的長度,並多切大約2公分 - 根據要鎖的地方,然後再鑽洞 - 用長螺絲去鎖,然後會卡的地方就先用培林鑽鑽洞 - 鑽錯的那一根 重鑽 #### 心得 - 之後看圖的時候要再確定位置,不要直接鑽,因為有可能我會看錯。 ### 林聖貴 #### 今日進度 - 今日組裝了Bunper與儲球需要的皮帶輪,並且討論了未來intake改動,後便摸空與隊長一同學習robot的程式,以下為學習內容。 :::spoiler 程式碼 ```java= // Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. package frc.robot; import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.SpeedControllerGroup; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.drive.DifferentialDrive; import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; /** * The VM is configured to automatically run this class, and to call the functions corresponding to * each mode, as described in the TimedRobot documentation. If you change the name of this class or * the package after creating this project, you must also update the build.gradle file in the * project. */ public class Robot extends TimedRobot { private static final String kDefaultAuto = "Default"; private static final String kCustomAuto = "My Auto"; private String m_autoSelected; private final SendableChooser<String> m_chooser = new SendableChooser<>(); Joystick js1 = new Joystick(0); public final int kFrontLeftChannel = 3; public final int kLeftRearChannel = 4; public final int kFrontRightChannel = 1; public final int kRearRightChannel = 2; public final int leftStick_X = 0; public final int leftStick_Y = 1; public final int rightStick_X = 4; public final int rightStick_Y = 5; public final int trigger_L = 2; public final int trigger_R = 3; public final int Btn_A = 1; public final int Btn_B = 2; public final int Btn_X = 3; public final int Btn_Y = 4; public final int Btn_LB = 5; public final int Btn_RB = 6; public final int Btn_LS = 9; public final int Btn_RS = 10; //Motor WPI_TalonSRX LeftFront = new WPI_TalonSRX(kFrontLeftChannel); WPI_TalonSRX LeftRear = new WPI_TalonSRX(kLeftRearChannel); WPI_TalonSRX RightFront = new WPI_TalonSRX(kFrontRightChannel); WPI_TalonSRX RightRear = new WPI_TalonSRX(kRearRightChannel); // SpeedControllerGroup and DifferentialDrive SpeedControllerGroup LeftMotor = new SpeedControllerGroup(LeftFront,LeftRear); SpeedControllerGroup RightMotor = new SpeedControllerGroup(RightFront,RightRear); DifferentialDrive drive = new DifferentialDrive(LeftMotor, RightMotor); /** * This function is run when the robot is first started up and should be used for any * initialization code. */ @Override public void robotInit() { // m_chooser.setDefaultOption("Default Auto", kDefaultAuto); // m_chooser.addOption("My Auto", kCustomAuto); // SmartDashboard.putData("Auto choices", m_chooser); RightFront.setInverted(true); RightRear.setInverted(true); LeftFront.setInverted(false); LeftRear.setInverted(false); } @Override public void robotPeriodic() {} @Override public void autonomousInit() { // m_autoSelected = m_chooser.getSelected(); // System.out.println("Auto selected: " + m_autoSelected); } @Override public void autonomousPeriodic() { // switch (m_autoSelected) { // case kCustomAuto: // // Put custom auto code here // break; // case kDefaultAuto: // default: // // Put default auto code here // break; //} } @Override public void teleopInit() {} @Override public void teleopPeriodic() {} /** This function is called once when the robot is disabled. */ @Override public void disabledInit() {} /** This function is called periodically when disabled. */ @Override public void disabledPeriodic() {} /** This function is called once when test mode is enabled. */ @Override public void testInit() {} /** This function is called periodically during test mode. */ @Override public void testPeriodic() {} } ``` ::: ## 20220208 ### 曹允維 #### 今日進度 - ### 蔡程翔 #### 今日進度 - 把昨天還沒裝完的部分裝完了 - 上輪子還有皮帶跟鏈條 - 軌道有噴砂 #### 遇到問題 - 在2邊皮帶變向的地方沒有長度剛好的橡皮圈 - 有些固定件還沒C好 - 在軌道要上去的地方還是不穩 #### 解決辦法 - 找2條比較短的然後剪掉,弄到適合的長度時,再接起來。 - 去雷切固定件然後再把他們拉釘拉上去 ### 林聖貴 #### 今日進度 - 將儲球的機制改善完成 #### 遇到問題 - 皮帶替代用橡皮圈不夠緊繃,使用止血帶阻力過大 - 皮帶輪的傳動方式設計上有沒貼合空轉的問題 #### 解決辦法 - 重新製作了橡皮圈 - 使用較大的果凍輪解決了空轉問題 ::: spoiler 照片 ![](https://i.imgur.com/q7VMXd3.jpg) ::: ## 20220209 ### 蔡程翔 #### 今日進度 - 把儲球輪子的種類和大小再確定一次,如果有不穩的的時候,再換可以用的輪子。 - 將程式組測試的結果再根據有問題的地方修改我們輪子的配置。 - 去雷切輸球跟射球的連接裝置的固定件。 #### 遇到問題 - 原本的輪子在輸球的時候如果沒有初速度,他的球會在軌道那邊一直空轉。 - 程式組測試完之後發現,輸球連接到射球的地方,輸球的速度不夠。 #### 解決方法 - 嘗試使用其他不同種的輪子,從原本的中間一顆4吋旁邊2顆2吋,然後又變成中間變成2顆4吋果凍倫,最後的話再換成灰輪。 - 我們將最上面皮帶輪的地方在多加一顆果凍輪,希望可以加強他的力道。 ## 20220210 ## 20220211 ### 蔡程翔 #### 今日進度 - 將儲球的的連接件C好,然後再把一些裝到收球上面 - 雷切了收球的prototype #### 遇到問題 - 小台的CNC在C的時候要有人顧 - 再組裝固定件的時候因為有些地方被除料,所以不能拉釘。 #### 解方方法 - 我在那邊顧著CNC一整個下午 - 那些不能拉的地方為了對稱,所以就拉了一些空的拉釘 #### 心得 - 我覺得我雷切的速度越來越快了,但是我還是覺得我整體做事的效率可以再加強,這天原本六點多賴政諺和曹允維走的時候都有交代事情,但是我在弄拉釘,根本沒時間去做,就可能之後做事情的時候再有效率一點吧。