crossbotics

Pedro Path Builder

Draw a path on the BIOBUZZ field. See where the 18 x 18 in robot goes and what it hits. Then copy the Java for FTC-Helper-Lib's Pedro module.

Work in progress. The red marks come from a simple field model (the field parts seen from above). Always try a new path in the simulator, then slowly on the real field.

Tap the map to add:Tap adds: Right-click: more
your path robot hits something other alliance 1 the end of part 1 ○ control point (the path bends toward it) ● the heading a part ends with (drag it around) ◆ A, B: an action starts here

Checks

    Robot

    BIOBUZZ's field is turned half a turn between the alliances, not mirrored. So keep mirrorForRed() false: the same numbers work from both walls.

    Start spot

    Shown on the Driver Station at INIT as "Place robot : ..." (with the s.start line on): read it at match setup.

    Drag the green dot to move it. x right, y away from your wall, inches. Heading: 0 = facing away, 90 = facing left.

    Parts

    Hold: Pedro keeps the robot on the end point (for scoring). Each part starts where the one before ends. The robot drives the parts with no stop between them.

    Actions along the path

    Start something while the robot keeps driving: the intake halfway, the launcher 12 in before the end. Choose an action above the map and tap the path, or press Add one. Drag an orange marker along the path to move it. A launcher's fireAllAction() or fireAction(n) gets a flywheel box: empty, the usual speed; a number, that shot's own RPM (for a robot with no camera). A new part to a spot behind the robot drives backwards along it, so it needs no turn.

    Each one starts once, at its place, and the path goes on (like a run step). The code lists them in the order they come along the path. Distances count along the whole path, all parts. The rules

    Java

    Where each part goes, in your autonomous's Java file (the one with extends Auto<Robot>, in your autos folder, like the Pedro example's CurveToTheGoal.java): the import lines at the top of the file, under the other import lines; the static final PedroPath ... line inside the class, above the steps(...) method (that is what "your other fields, at the top of the class" means); and the s.follow(...) or s.driveTo(...) lines inside steps(Steps s, Robot robot). Lesson 8 shows a whole file.

    
    				

    Edit a path you have

    Paste your PedroPath code and its follow step (or driveTo steps with their s.start line). Its PathAt lines become markers. Plain numbers only.