TUR-04: Slip-ring turret - round and round, always the short way
- Your robot needs: Turret.
- Starter bots that fit: none (it needs parts the starter bots do not have).
- Library version: v0.17.0 or newer.
- The docs it tests: Setting up a turret.
Why
A turret with a slip ring (a part that carries the wires through a turning joint) has no wire limits. With .continuous() the library drops min and max, always turns the shortest way, and is never "out of range". Few teams have one, so every report helps.
Safety
- Check the slip ring by hand first: turn the turret 3 full turns each way with the robot on. No device may drop off.
- The turret can now turn without end: fingers, cables and other parts away from it.
Setup
.continuous()on the turret's line inRobot.java, and nomin/maxinTunables.Turret(they are ignored; remove them).- A way to know its angle at START: a home switch (TUR-01), an absolute encoder, or the start mark (TUR-02).
- A goal the camera can see (or odometry aim), to test following.
Steps
- INIT, START. Read the turret line: angles show from -180 to 180.
- Point it at 170 with the stick, then ask for -170 (a button with
robot.turret.aimAt(-170), or follow a goal there). It turns 20 degrees through the back, not 340 the other way. - With following on, drive the robot in 3 full circles around the goal. The turret keeps on the goal and never says
goal out of turret range. - Stop. Check the slip ring's wires and the turret's angle against a mark.
Pass rule
Every move in step 2 takes the short way (2 of 2 tries, each way once), and after 3 circles the angle is within 3 degrees of the real one with no device lost (0 drop-outs).
Record
Write these down while you test. The report form has them as a list to fill in.
- slip ring model, turret motor or servo, gear ratio
- how it knows its angle (switch, absolute encoder, start mark)
- the angle error after 3 circles (degrees)
- any device that dropped out (the Driver Station or the hub's lights)
If your robot is different
A CR servo turret with an absolute encoder on a slip ring is a common build: say which you have. If your turret can turn more than one turn but not forever, do not use .continuous(): write min and max (for example -190 to 190) instead, and test that with TUR-02.
Report your result
Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.
Report resultNo reports for this test yet: yours would be the first. Every test's reports.
Something wrong on this page? Tell us with a short GitHub form.