Edit

Note Viewer


Electrical & Code 2019

Attendance

Note Info

Students
Mentors
Date & Time
Location & Author
  • Adam P.

  • 1/18/2019

  • 3 hours

  • Aquiferland

  • Adam P.


Work Completed

Adam's Climber Prototype tests

  • Poly's code is currently not using PID for shooter motor. It's just straight voltage, -1.0 to 1.0.  To change the value, set SHOOTER_SPEED in const.py and re-deploy
  • The live-update trigger from Smart Dashboard is not working reliably, do not use it.
  • This encoder supports both Mag and Quadrature outputs, but at > 6600 RPMs you're supposed to use Quadrature
  • Bound a reverse-shooter command to left trigger, so prototype can be moved up and down
  • Remounted Talon with zipties so it doesn't fall off and yank out encoder cable again.  :(
  • The Talon SRX + CTRE Mag Encoder is supposed to be configureable to output RPMs, but I cannot work out how to do it. The CTRE doc on this is vague and awful. Same one I was disgusted with in 2016.
  • It does, however, put out native encoder units.  You can call getQuadratureDistance to see how many "units" it's traveled, or getQuadratureVelocity to see how many units per ms it's moving.
  • I added "Shooter Quad Distance" and "Shooter Quad Velocity" to SD.
  • As of this year, the official testing tool for Talons and other CAN devices is "Phoenix Tuner". There's a shortcut to it on the desktop of DS1 and DS2. Go to the "Plot" tab, choose the SRX from the "Selected Device" dropdown at the top, and click "plot disabled" to turn on graphing, press again to stop.  Suggest hitting Auto Scale at least once.
  • I ran some tests using native encoder units (aka ticks)
    • One revolution of the screw shaft = 20,417 encoder ticks
    • At full speed (1.0) with no bucket load, going upwards on the prototype, it travels 979,012 ticks per second (or so)
    • The climber screw shafts are 8mm per rotation. Chris said with the 5:1 gear reduction the climber goes 0.8mm per revolution of the motor shaft
    • Using above, we should be able to find the velocity (in ticks) the PID will need to be set to in order to run at 14,000 RPMs, which is our goal according to Chris.
  • Given the above:
    ticks_per_output_rev = 20417
    motor_revs_per_output_rev = 5
    ticks_per_motor_rev  = ticks_per_output_rev / motor_revs_per_output_rev (= 4083.40)
    desired_motor_rpm = 14000
    goal_ticks_per_sec = ticks_per_motor_rev * desired_motor_rpm / 60 (= 952793.33)
    goal_ticks_per_100_ms = goal_ticks_per_sec / 10 (= 95279.33)

Challenges

  • CTRE docs on Talon SRX

Work for Next Meeting

  1. Make list of all the general electrical components on the robot (FRC4096 --> 2018 - 2019 --> Build Season --> Electrical folder --> Electrical components)
  2. Build a set-up to run a motor when testing and making prototypes [ <-- hold off on this, we ordered a motor tester - Adam ]
    • Zach suggests using a three way switch (on forwards, off, on reverse)
    • One side, the motor is plugged in (two smaller anderson connectors)
    • A battery is plugged into the other side (large anderson connector on the battery)
  3. Drivetrain Code
    • Continue working on robot.py, const.py, and oi.py
    • Begin commands/drivetrain.py & subsystems/drivetrain.py
    • Goal is to be done by early next week when the drivetrain is supposed to be done
  4. Vision
    • Drive robot towards vision target so the target is in view of limelight; then have robot drive to a specified distance and turn to a specified angle from the vision target (using a calibrated position and the tx & ty from the limelight)
    • Get Rotate_To_Angle_Limelight command working on Atlaz.  PID will need tuning.
    • Continue learning how to use limelight
      • Specifically learn what all of the different values on the network table are and how they can be used
      • Continue to look into the Limelight documentations
    • Go to specified range from target (check case studies on limelight website & documentation)
    • Go to specified range and aim at target (again check case studies)
  5. Line Following  (Ordered set of 3 line trackers from Vex, wait for those to arrive before resuming this work. -Adam)
    • Mount the color sensor to Atlaz. Needs to be only a few centimeters away from floor, pointed at the carpet.
    • Determine what sensor object to use in code to get values from it.  It's an I2C device.
    • Would be used to follow the white tape that is centered coming out from the spots where hatch panels are placed
    • Ultimate question is - Should line following be used instead of limelight vision in some places? Together with limelight vision? Or not at all this year?
  6. Talk to other subteams and drivers to determine what semi-autonomous controls are desired --> need list of everything we wish to accomplish and order of priorities --> this has been started, but more work is definitely needed
    • Will need to finalize these after designs are finalized but should start to get an idea now
    • Then figure out what the best ways are to implement them
    • Encoders? Gyros? Limit Switches? Vision? Line Following? etc. etc.

On Schedule?

TBD