Skip to content
Work in progress. This library and its docs are new and still changing, and some parts are not yet tested on a real robot. If something is wrong or unclear,tell us with a short GitHub form.

The auto builder: odometry and Pedro

Build driveTo steps and Pedro paths on the field map, run them in the simulator, and copy the Java.

You need:

Open the auto builder (page 6). Pick the mode:

  • Simple steps: the drives, turns and actions of page 6.
  • Pedro path: a mecanum robot with odometry. Tap to add lines or curves. Drag the ends and the curve points. Pick each part’s heading and speed limit. Tick Hold the end. Add things to start along the path (PathAt). The Java has a follow with a PedroPath, or one driveTo per part.

The builder says when your robot cannot do a mode, and Run stays off:

  • follow needs the follower(...) line in Robot.java.
  • driveTo steps need only odometry.

The map in Pedro path mode, close up. The path has two parts: a straight line, then a curve:

The Pedro path on the map, marked: the start, the end of part 1 (a straight line), the control point (a white dot with dashed lines to the curve), the end of part 2, the heading knob (the yellow dot that sets which way the robot faces at the end), and an orange diamond for a PathAt (“Intake on”).

  • Drag the ends to move a part. Drag the control point to bend the curve. The robot does not drive through it: it pulls the curve toward it.
  • Drag the heading knob to change which way the robot faces.

The settings for the path and each part:

The Path settings, marked: follow (one Pedro path) or driveTo steps, the path name in the Java, Hold the end, and for a part: line or curve, which way it faces, when it turns, the speed limit, and “+ point” to add a control point.

Actions along the path are the PathAt lines: they start something while the robot drives.

Actions along the path, marked: “+ Add one” (a PathAt), where it starts (here: a part of the path, 0 to 1), how far (0.5 = halfway), a command or an action, and what it starts (robot.intake::in).

A Pedro plan is one path. Add the steps before and after it in your file.

  • The builder runs your driveTo steps or your Pedro path in the simulator, as BLUE and as RED.
  • The report says done for every point or path.
  • The Java is in your auto file, with the steps before and after it.
Problem Why, and the fix
Run stays off in Pedro path mode Robot.java has no follower(...) line (Add Pedro paths)
Run stays off for driveTo steps Robot.java has no odometry(...) line (Add odometry)
A step or path ends in the wrong place See the problems on Drive to points and Add Pedro paths

Next: Advanced autos: beyond the auto builder.

Look it up: the auto builder, every detail.

Something wrong on this page? Tell us with a short GitHub form.