Setting up a mecanum drive train with okapi

A mechanum is controlled in exactly the same way as a x-base, so use the x-base controller.

You should measure the turning point (center) of the wheels. Okapi uses this information to calculate how much to turn the wheels to turn the robot a certain number of degrees.

As for the rest of your questions, the answers are slightly difficult to answer with the current version of okapi. You would have to do construct the chassis controller yourself without using the factory.

The alternative is to use the new beta version of okapilib.

Okapi v4 allows you to do this:

void opcontrol() {
  auto chassis = ChassisControllerBuilder().withMotors(1, -2, -3, 4).build();
  auto xModel = std::dynamic_pointer_cast<XDriveModel>(chassis->getModel());
  Controller controller(ControllerId::master);
  while (true) {
    xModel->xArcade(
      controller.getAnalog(ControllerAnalog::rightX),
      controller.getAnalog(ControllerAnalog::rightY),
      controller.getAnalog(ControllerAnalog::leftX));
    pros::delay(20);
  }
}

Note: The model pointer stuff is currently necessary to use the xArcade method of the chassis controller.

Okapi does not implement field-centric drive, it is up to you to measure the heading of the robot and do math yourself.

For your last question, those are PID gains. If you do not know what PID is, you should really find out.
The first one is the PID gains for moving forward, and the second is for turning.

With okapi v3, you are able to omit those gains and instead use the V5 motor’s built-in PID. With the okapi v4 example I showed above, it uses integrated by default.
It is only when you apply custom gains that the chassis controller switches to use custom, okapi PID controllers